오늘의유니폼
테이블 (11)
Untitled (post_likes)
- Key (id) — BIGINT — 기본 키 — NOT NULL
- Key (user_id) — BIGINT — 외래 키 → 사용자.Key — NOT NULL — 사용자 id
- Key (post_id) — BIGINT — 외래 키 → 대여글.Key — NOT NULL — 대여글 id
- Field (created_at) — TIMESTAMP — 생성일시
- Field (updated_at) — TIMESTAMP — 수정일시
Untitled (chat_threads)
- Key (id) — BIGINT — 기본 키 — NOT NULL
- Key2 (rental_id) — BIGINT — 외래 키 → 대여.Key2 — NOT NULL — 대여 id
- Field (created_at) — TIMESTAMP — 생성일시
- Field2 (updated_at) — TIMESTAMP — 수정일시
Untitled (chat_participants)
- Key (id) — BIGINT — 기본 키 — NOT NULL
- Key (thread_id) — BIGINT — 외래 키 → Untitled.Key — NOT NULL — 채팅방 id
- Key (user_id) — BIGINT — 외래 키 → 사용자.Key — NOT NULL — 사용자 id
- Field (role) — role_type — 역할
- Field (last_read_message_id) — BIGINT — 최근 읽은 메세지 id
- Field (created_at) — TIMESTAMP — 생성일시
- Field (updated_at) — TIMESTAMP — 수정일시
Untitled (chat_message)
- Key (id) — BIGINT — 기본 키 — NOT NULL
- Key (thread_id) — BIGINT — 외래 키 → Untitled.Key — NOT NULL — 채팅방 id
- Field (sender_id) — BIGINT — 전송자 id
- Field (content) — TEXT — 본문
- Field2 (created_at) — TIMESTAMP — 생성일시
- Field (type) — message_type — 메시지 타입
- Field (url) — TEXT — 이미지 URL
Untitled (refresh_tokens)
- Key (id) — BIGINT — 기본 키 — NOT NULL
- Key (user_id) — BIGINT — 외래 키 → 사용자.Key — NOT NULL — 사용자 id
- Field (token) — VARCHAR(512) — 토큰값
- Field2 (expires_at) — TIMESTAMP — 만료일시
- Field (created_at) — TIMESTAMP — 생성일시
- Field (revoked_at) — TIMESTAMP — 폐기일시
결제 (payments)
- Key (id) — BIGINT — 기본 키 — NOT NULL
- rental_id — BIGINT — 외래 키 — NOT NULL — 대여 id
- provider — VARCHAR(20) — NOT NULL — PG 식별
- Field (method) — VARCHAR(20) — 결제 수단
- provider_order_id — VARCHAR(100) — NOT NULL — PG 주문 ID
- provider_tx_id — VARCHAR(100) — PG 거래 ID
- Field (idempotency_key) — VARCHAR(72) — 멱등키
- rental_fee — BIGINT — NOT NULL — 대여금
- deposit — BIGINT — NOT NULL — 보증금
- status — payment_status — NOT NULL — 결제 상태
- seller_settlement_status — seller_settlement_status — NOT NULL — 판매자 정산 상태
- deposit_refund_status — deposit_refund_status — NOT NULL — 보증금 환불/몰수 상태
- paid_at — TIMESTAMP — 결제 완료 시각
- settled_at — TIMESTAMP — 판매자 정산 완료 시각
- refunded_at — TIMESTAMP — 환불/부분환불 완료 시각
- created_at — TIMESTAMP — NOT NULL — 생성일시
- updated_at — TIMESTAMP — NOT NULL — 수정일시
- Field (webhook_received_at) — TIMESTAMP — 웹훅 일시
대여 (rentals)
- Key2 (id) — BIGINT — 기본 키 — NOT NULL
- post_id — BIGINT — 외래 키 — NOT NULL — 대여글 id
- buyer_id — BIGINT — 외래 키 — NOT NULL — 구매자 id
- status — rental_status — NOT NULL — 거래 상태
- Field (canceled_by) — BIGINT — 취소자 id
- Field (canceled_at) — TIMESTAMP — 취소일시
- cancel_reason — TEXT — 취소 사유
- created_at — TIMESTAMP — NOT NULL — 생성일시
- updated_at — TIMESTAMP — NOT NULL — 수정일시
- Field (approved_expires_at) — TIMESTAMP — 신청 승인 일시
대여글 (rental_posts)
- Key (id) — BIGINT — 기본 키 — NOT NULL
- seller_id — BIGINT — 외래 키 — NOT NULL — 판매자 id
- title — VARCHAR(80) — NOT NULL — 제목
- description — TEXT — NOT NULL — 상세 설명
- team — team_type — NOT NULL — 팀명
- player — VARCHAR(60) — NOT NULL — 선수명
- size — size_type — NOT NULL — 사이즈
- rental_fee — BIGINT — NOT NULL — 대여금
- deposit — BIGINT — NOT NULL — 보증금
- location (stadium) — stadium_type — 거래 경기장
- status — post_status — NOT NULL — 노출 상태
- created_at — TIMESTAMP — NOT NULL — 생성일시
- updated_at — TIMESTAMP — NOT NULL — 수정일시
대여글 이미지 (post_images)
- Key2 (id) — BIGINT — 기본 키 — NOT NULL
- post_id — BIGINT — 외래 키 — NOT NULL — 대여글 id
- url — TEXT — NOT NULL — 이미지 URL
- sort_order — INTEGER — NOT NULL — 노출 순서
- created_at — TIMESTAMP — NOT NULL — 생성일시
- updated_at — TIMESTAMP — NOT NULL — 수정일시
사용자 (users)
- Key (id) — BIGINT — 기본 키 — NOT NULL
- email — VARCHAR(255) — NOT NULL — 이메일
- password_hash — VARCHAR(255) — NOT NULL — 비밀번호 해시
- display_name — VARCHAR(60) — NOT NULL — 표시 이름
- phone — VARCHAR(30) — 연락처
- is_admin — BOOLEAN — NOT NULL — 관리자 여부
- status — user_status — NOT NULL — 계정 상태
- created_at — TIMESTAMP — NOT NULL — 생성일시
- updated_at — TIMESTAMP — NOT NULL — 수정일시
- Field (is_privacy_agreed) — BOOLEAN — 약관 동의 여부
신고 (post_reports)
- id — BIGINT — 기본 키 — NOT NULL
- Key (post_id) — BIGINT — 외래 키 → 대여글.Key — NOT NULL — 대여글 id
- Key (reporter_id) — BIGINT — 외래 키 → 사용자.Key — NOT NULL — 신고자 id
- type — report_type — NOT NULL — 신고 유형
- description — TEXT — NOT NULL — 신고 상세
- status — report_status — NOT NULL — 처리 상태
- admin_id — BIGINT — 담당 관리자 id
- resolution_note — TEXT — 처리 메모
- created_at — TIMESTAMP — NOT NULL — 생성일시
- updated_at — TIMESTAMP — NOT NULL — 수정일시