Skip to content

Table Docs

LastCoder_NAM edited this page Apr 24, 2025 · 14 revisions

1. 사용자 테이블 (users)

필드명 데이터 타입 설명
user_id BIGINT (PK) 사용자 ID (기본키)
username VARCHAR(50) 사용자 이름
password VARCHAR(255) 암호화된 비밀번호
email VARCHAR(100) 이메일 주소
phone_number VARCHAR(20) 전화번호
user_role ENUM('ROLE_USER', 'ROLE_ADMIN') 사용자 역할
trust_score FLOAT 신뢰도 점수

2. 사용자 프로필 테이블 (user_profiles)

필드명 데이터 타입 설명
profile_id BIGINT (PK) 프로필 ID (기본키)
user_id BIGINT (FK) 사용자 ID (외래키)
nickname VARCHAR(10) 사용자 닉네임ㅋㅋ
help_services TEXT 제공 가능한 서비스 유형
need_services TEXT 필요한 서비스 유형
location VARCHAR(255) 위치 정보
introduction TEXT 자기소개

3. 시간 포인트 관리 테이블 (time_accounts)

필드명 데이터 타입 설명
account_id BIGINT (PK) 계정 ID (기본키)
user_id BIGINT (FK) 사용자 ID (외래키)
total_points INT 총 보유 포인트
available_points INT 사용 가능한 포인트
held_points INT 임시 차감된 포인트

4. 포인트 거래 내역 테이블 (point_transactions)

필드명 데이터 타입 설명
transaction_id BIGINT (PK) 거래 ID (기본키)
account_id BIGINT (FK) 계정 ID (외래키)
transaction_type ENUM('CREDIT', 'DEBIT', 'HOLD', 'RELEASE') 거래 유형
amount INT 거래 포인트 수량
transaction_reason VARCHAR(255) 거래 이유 (예: 가입 보너스)
related_transaction_id BIGINT (FK, NULLABLE) 관련 거래 ID

5. 도움 요청 글 테이블 (help_requests)

필드명 데이터 타입 설명
request_id BIGINT(PK) 요청 ID (기본키)
requester_id BIGINT 요청자 ID
title VARCHAR(255) 요청 제목
description TEXT 요청 설명
required_time INT 필요한 시간 (단위: 분)
location VARCHAR(255) 요청 장소
scheduled_datetime DATETIME 요청 예정 시간
requested_points INT 가격
status ENUM('OPEN', 'IN_PROGRESS', 'COMPLETED', 'CANCELLED') 요청 상태

6. 서비스 신청자 테이블 (helper)

필드명 데이터 타입 설명
helper_id BIGINT (PK) 신청 ID (기본키)
user_id BIGINT (FK) 요청 ID (외래키)
help_requests_id BIGINT (FK) 작성글 ID (외래키)
status ENUM('APPLIED', 'ACCEPTED', 'DECLINED', 'CANCELLED') 신청 상태

7. 서비스 실제 거래 테이블 (help_trading)

필드명 데이터 타입 설명
transaction_id BIGINT(PK) 거래 ID (기본키)
request_id BIGINT 요청 ID
requester_id BIGINT 요청자 ID
helper_id BIGINT 제공자 ID
start_time DATETIME 서비스 시작 시간
end_time DATETIME 서비스 종료 시간
actual_points INT 실제 정산된 포인트
requester_approval BOOLEAN 요청자 승인 여부
provider_approval BOOLEAN 제공자 확인 여부
status ENUM('IN_PROGRESS', 'COMPLETED', 'DISPUTED', 'CANCELLED') 거래 상태

8. 리뷰 및 평점 테이블 (reviews)

필드명 데이터 타입 설명
review_id BIGINT (PK) 리뷰 ID (기본키)
transaction_id BIGINT (FK) 거래 ID (외래키)
reviewer_id BIGINT (FK) 리뷰 작성자 ID (외래키)
reviewee_id BIGINT (FK) 리뷰 대상 ID (외래키)
rating TINYINT (1~5) 평점 (1~5점)
comment TEXT 리뷰 내용

9. 알림 테이블 (notifications)

필드명 데이터 타입 설명
notification_id BIGINT (PK) 알림 ID (기본키)
recipient_id BIGINT (FK) 수신자 ID (외래키)
sender_id BIGINT (FK, NULLABLE) 발신자 ID (외래키, 시스템 알림일 경우 NULL)
notification_type ENUM('SERVICE_REQUEST', 'TRANSACTION_UPDATE', 'POINT_UPDATE', 'ADMIN_NOTICE') 알림 유형
message TEXT 알림 메시지
is_read BOOLEAN 읽음 여부

Clone this wiki locally