cloverky

Tables (6)

CATEGORIES (카테고리)

  • int (id) — 일련번호 — Primary key — NOT NULL
  • varchar (name) — 카테고리명
  • int (sort_order) — 정렬순서
  • timestamptz (created_at) — 생성일시

FOODS (식재료)

  • int (id) — 일련번호 — Primary key — NOT NULL
  • int (category_id) — 사용자ID — Foreign key → CATEGORIES.int — NOT NULL
  • varchar (name) — 품목명
  • text (description) — 상세설명
  • varchar (default_unit) — 기본 단위
  • timestamptz (created_at) — 생성일시
  • timestamptz (updated_at) — 수정일시

INVENTORY (인벤토리)

  • int (id) — 일련번호 — Primary key — NOT NULL
  • int (quantity) — 수량
  • varchar (unit) — 단위
  • date (expiry_date) — 소비기한
  • date (purchased_date) — 구매일자
  • bool (expiry_is_estimated) — 소비기한 추정 여부
  • varchar (storage) — 보관방법
  • timestamptz (created_at) — 생성일시
  • timestamptz (updated_at) — 수정일시
  • int (user_id) — 사용자 일련번호 — Foreign key → USERS.int — NOT NULL
  • int (food_id) — 음식 품목 일련번호 — Foreign key → FOODS.int — NOT NULL

RECEIPTS (영수증)

  • int (id) — 일련번호 — Primary key — NOT NULL
  • int (user_id) — 사용자ID — Foreign key → USERS.int — NOT NULL
  • varchar (store_name) — 매장명
  • date (purchased_date) — 구매일자
  • varchar (status) — 처리 상태
  • timestamptz (created_at) — 생성일시

RECEIPT_LINES (영수증 상세 품목)

  • int (id) — 일련번호 — Primary key — NOT NULL
  • int (receipt_id) — 영수증 일련번호 — Foreign key → RECEIPTS.int — NOT NULL
  • varchar (line_name) — 품목 표기명
  • int (quantity) — 수량
  • varchar (unit) — 단위
  • text (raw_text) — 인식된 원문 텍스트

USERS (사용자)

  • int (id) — 일련번호 — Primary key — NOT NULL
  • varchar (username) — 사용자명
  • varchar (name) — 이름
  • int (age) — 나이
  • varchar (email) — 이메일
  • varchar (password_hash) — 비밀번호
  • varchar (role) — 권한
  • bool (Fieldagree_terms) — 약관동의여부
  • varchar (default_storage) — 기본_보관장소
  • timestamptz (created_at) — 생성일시