sattlement

Tables (8)

expense_allocations (Untitled5)

  • allocation_id (Key) — BIGINT — Primary key — NOT NULL
  • group_id (Key5) — BIGINT — Foreign key → group.group_id — NOT NULL
  • expense_id (Key6) — BIGINT — Foreign key → expenses.expense_id — NOT NULL
  • item_id (Key3) — BIGINT — Foreign key → expense_items.item_id — NOT NULL
  • sender_id (Key2) — BIGINT — Foreign key → user.user_id — NOT NULL — 송금자
  • receiver_id (Key4) — BIGINT — Foreign key → user.user_id — NOT NULL — 수금자
  • share_amount (Field) — INT — NOT NULL — 이 멤버가 부담할 금액
  • status (Field3) — SettlementSatus — 정산 상태
  • created_at (Field2) — DATETIME — NOT NULL

expense_items (Untitled2)

  • item_id (Key) — BIGINT — Primary key — NOT NULL
  • expense_id (Key2) — BIGINT — Foreign key → expenses.expense_id — NOT NULL
  • item_name (Field3) — VARCHAR(200) — NOT NULL — 영수증 내부의 구매 항목명
  • line_amount (Field6) — INT — NOT NULL — 줄 금액
  • created_at (Field7) — DATETIME — NOT NULL — CURRENT_TIMESTAMP
  • updated_at (Field) — DATETIME — CURRENT_TIMESTAMP

expense_items_participant (Untitled7)

  • id (Key) — Primary key — NOT NULL
  • user_id (Key2) — BIGINT — Foreign key → user.user_id — NOT NULL
  • item_id (Key3) — BIGINT — Foreign key → expense_items.item_id — NOT NULL

expense_participant (Untitled3)

  • id (Key) — Primary key — NOT NULL
  • expense_id (Key2) — BIGINT — Foreign key → expenses.expense_id — NOT NULL
  • user_id (Key3) — BIGINT — Foreign key → user.user_id — NOT NULL

expenses (Untitled)

  • expense_id (Key) — BIGINT — Primary key — NOT NULL
  • group_id (Key2) — BIGINT — Foreign key → group.group_id — NOT NULL
  • payer_user_id (Key3) — BIGINT — Foreign key → user.user_id — NOT NULL — 결제자
  • receipt_image_id (Key4) — Foreign key → receipts.id — 영수증 이미지
  • spent_at (Field2) — DATETIME — NOT NULL
  • title (Field3) — VARCHAR(100)
  • total_amount (Field4) — INT — 영수증의 모든 항목을 합친 총합
  • settlement_type (Field) — NOT NULL — 정산 타입
  • created_at (Field6) — DATETIME — NOT NULL — CURRENT_TIMESTAMP
  • updated_at (Field7) — DATETIME — NOT NULL — CURRENT_TIMESTAMP

group (Untitled6)

  • group_id (Key) — BIGINT — Primary key — NOT NULL

receipts (Untitled8)

  • id (Key) — Primary key — NOT NULL
  • image (Field) — 영수증 이미지
  • ocr_status (Field2) — VARCHAR(20) — NOT NULL — OCR 진행상태
  • ocr_result (Field3) — NOT NULL — OCR 결과

user (Untitled4)

  • user_id (Key) — BIGINT — Primary key — NOT NULL