erdsec

Tables (7)

Account

  • id — BIGINT
  • product_code — VARCHAR(50)
  • account_number — VARCHAR(50) — NOT NULL
  • bank_code — VARCHAR(10)
  • student_union_id — BIGINT — NOT NULL
  • created_at — DATETIME

Ledger

  • id — BIGINT
  • student_union_id — BIGINT — NOT NULL
  • month — VARCHAR(7) — NOT NULL
  • total_income — DECIMAL(15,2)
  • total_expense — DECIMAL(15,2)
  • created_at — DATETIME

LedgerDetail

  • id — BIGINT
  • ledger_id — BIGINT — NOT NULL
  • transaction_type — ENUM('DEPOSIT', 'WITHDRAWAL') — NOT NULL
  • transaction_id — BIGINT — NOT NULL
  • description — VARCHAR(500)
  • amount — DECIMAL(15,2) — NOT NULL

StudentUnion

  • id — BIGINT
  • name — VARCHAR(200) — NOT NULL
  • description — TEXT
  • president_id — BIGINT
  • created_at — DATETIME

Transaction

  • id — BIGINT
  • account_id — BIGINT — NOT NULL
  • student_union_id — BIGINT — NOT NULL
  • user_id — BIGINT
  • type — ENUM('DEPOSIT', 'WITHDRAWAL') — NOT NULL
  • amount — DECIMAL(15,2) — NOT NULL
  • purpose — VARCHAR(500)
  • receipt_url — VARCHAR(1000)
  • memo — TEXT
  • transaction_date — DATETIME — NOT NULL
  • created_at — DATETIME

TransactionMemo

  • id — BIGINT
  • transaction_type — ENUM('DEPOSIT', 'WITHDRAWAL') — NOT NULL
  • transaction_id — BIGINT — NOT NULL
  • content — TEXT — NOT NULL
  • created_at — DATETIME

User

  • id — BIGINT
  • name — VARCHAR(100) — NOT NULL
  • phone_number — VARCHAR(20)
  • email — VARCHAR(100)
  • created_at — DATETIME