dㅁㄴㅇ
Tables (8)
Benefit
- Key — INT — Primary key — NOT NULL
- membership_level — VARCHAR(50) — NOT NULL
- description — TEXT
- discount_rate — INT
- points_reward — INT
- free_shipping — BOOLEAN
- priority_support — BOOLEAN
- created_at — TIMESTAMP
- updated_at — TIMESTAMP
Benefit_Usage_Logs
- usage_id — INT — Primary key — NOT NULL — 사용 로그 ID
- usage_date — TIMESTAMP — 사용 일시
- Key — INT — Foreign key → Benefit.Key — NOT NULL
- customer_id — INT — Foreign key → Customers.customer_id — NOT NULL
- log_id2 — INT — Foreign key → Logs.log_id — NOT NULL
Customers
- customer_id — INT — Primary key — NOT NULL
- name — VARCHAR(15) — NOT NULL
- phone — CHAR(11) — NOT NULL
- gender — ENUM('M', 'F', 'O') — NOT NULL
- join_date — DATE — NOT NULL
Grade_Tiers
- tier_id — INT — Primary key — NOT NULL
- grade_name — VARCHAR(10) — NOT NULL
- Key — INT — Foreign key → Staff.Key — NOT NULL
Grades
- customer_id — INT — Foreign key → Customers.customer_id — NOT NULL
- sum_account — INT — NOT NULL
- grade_name — VARCHAR(10) — NOT NULL
- update_date — TIMESTAMP
Logs
- log_id — INT — Primary key — NOT NULL
- customer_id — INT — Foreign key → Customers.customer_id — NOT NULL
- purchase_date — TIMESTAMP
- account — INT — NOT NULL
- store_name — VARCHAR(50) — NOT NULL
Staff
- Key — INT — Primary key — NOT NULL
- staff_name — CHAR(4)
- staff_phone — CHAR(11)
- staff_address — VARCHAR(70)
- staff_gender — ENUM('M', 'F', 'O')
- staff_position — VARCHAR(10)
- staff_age — INT
- store_id — INT — NOT NULL
Stores
- store_id — INT — Primary key — NOT NULL
- store_name — VARCHAR(50) — Primary key — NOT NULL
- location — VARCHAR(100)