ㅁㄴㅇ

Tables (8)

Assistant

  • Assistant_id — INT
  • Name — VARCHAR(20) — NOT NULL
  • Rank — ENUM('점장', '직원', '알바') — NOT NULL

Customers

  • Customer_id — INT
  • Name — VARCHAR(20) — NOT NULL
  • Birth — DATE
  • Phone — VARCHAR(15) — NOT NULL
  • Email — VARCHAR(50) — NOT NULL
  • Address — VARCHAR(100)
  • Grade — ENUM('Bronze', 'Silver', 'Gold', 'VIP')
  • Costs — INT

Daily_Account

  • Date — DATE — NOT NULL
  • Sales — INT
  • Costs — INT
  • Funds — INT

Order_Detail

  • Order_id — INT — Foreign key → Orders.Order_id — NOT NULL
  • Product_id — INT — Foreign key → Products.Product_id — NOT NULL
  • Price — INT — NOT NULL
  • Quantity — INT

Orders

  • Order_id — INT
  • Customer_id — INT — Foreign key → Customers.Customer_id — NOT NULL
  • Total_Price — INT
  • Assistant_id — INT — Foreign key → Assistant.Assistant_id — NOT NULL
  • Date — DATE — Foreign key → Daily_Account.Date — NOT NULL

Place_Order_Detail

  • Place_id — INT — Foreign key → Place_orders.Place_id — NOT NULL
  • Product_id — INT — Foreign key → Products.Product_id — NOT NULL
  • Quantity — INT

Place_orders

  • Place_id — INT
  • Assistant_id — INT — Foreign key → Assistant.Assistant_id — NOT NULL
  • Total_Price — INT
  • Date — DATE — Foreign key → Daily_Account.Date — NOT NULL

Products

  • Product_id — INT
  • Product_name — VARCHAR(50) — NOT NULL
  • Barcode — VARCHAR(13)
  • Price — INT — NOT NULL
  • Quantity — INT
  • Expiration_date — DATE