cvs3
Tables (9)
Benefit
- Key — INT — Primary key — NOT NULL
- membership_level — VARCHAR(50) — NOT NULL
- description — TEXT
- discount_rate — DECIMAL(5,2)
- 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 — DATETIME — NOT NULL — 사용 일시
- customer_id — INT — NOT NULL
- Key — INT — NOT NULL
- log_id — INT — 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 — NOT NULL
Grades
- customer_id — INT — Foreign key → Customers.customer_id — NOT NULL
- sum_account — DECIMAL(10,) — NOT NULL
- grade_name — VARCHAR(10) — NOT NULL
- update_date — DATETIME — NOT NULL
- last_calculated_at — TIMESTAMP — NOT NULL
Logs
- log_id — INT — Primary key — NOT NULL
- customer_id — INT — NOT NULL
- purchase_date — DATETIME — NOT NULL
- account — DECIMAL(10,) — NOT NULL
- store_id — INT — NOT NULL
- store_name — VARCHAR(50) — NOT NULL
Staff
- Key — INT — Primary key — NOT NULL
- staff_name — CHAR((4)
- staff_phone — INT(11)
- staff_address — VARCHAR(70)
- staff_gender — ENUM('M', 'F', 'O')
- staff_position — VARCHAR(10)
- staff_age — INT(2)
- store_name — VARCHAR(50) — NOT NULL
Stores
- store_id — INT — Primary key — NOT NULL
- store_name — VARCHAR(50) — Primary key — NOT NULL
- location — VARCHAR(100)
benefit
- staff_position — VARCHAR(20) — Primary key — NOT NULL
- staff_benefit — VARCHAR(255)