admin-module ERD
Tables (10)
inquiries (문의)
- inquiry_id (Key) — Primary key — NOT NULL
- user_id (유저 아이디) — Foreign key → users.user_id — NOT NULL
- category (Field2)
- title (Field3)
- content (Field4)
- status (Field5)
- created_at (Field6)
- updated_at (Field7)
inquiry_replies (문의 답변)
- inquiry_reply_id (Key) — Primary key — NOT NULL
- inquiry_id (Key2) — Foreign key → inquiries.inquiry_id — NOT NULL
- admin_user_id (Field2)
- content (Field3)
- created_at (Field4)
- updated_at (Field5)
membership_plans (멤버십 플랜)
- membership_plan_id (Key) — Primary key — NOT NULL
- grade_name (Field)
- discount_rate (Field2)
notices (공지사항)
- notice_id (Key) — Primary key — NOT NULL
- created_by_user_id (유저 아이디) — Foreign key → users.user_id — NOT NULL
- title (Field)
- content (Field2)
- created_at (Field4)
- updated_at (Field5)
roles (권한)
- role_id (Key) — Primary key — NOT NULL
- name (Field)
user_memberships (사용자 멤버십/구독 내역)
- user_membership_id (Key) — Primary key — NOT NULL
- membership_plan_id (Key2) — Foreign key → membership_plans.membership_plan_id — NOT NULL
- admin_user_id (유저 아이디) — Foreign key → users.user_id — NOT NULL
- user_id (Field)
- start_at (Field3)
- end_at (Field4)
- status (Field5)
user_roles (사용자-권한 매핑)
- user_Id (users.id) — Foreign key → users.user_id — NOT NULL
- role_id (roles.id) — Foreign key → roles.role_id — NOT NULL
users (사용자(회원/관리자))
- user_id (유저 아이디) — Primary key — NOT NULL
- name (Field3)
- email (Field)
- password_hash (Field2)
- status (Field4)
- created_at (Field5)
- updated_at (Field6)
- deleted_at (Field7)
wallet_transactions (지갑 거래내역/충전,차감 이력)
- wallet_transaction_Id (Key) — Primary key — NOT NULL
- admin_user_id (유저 아이디) — Foreign key → users.user_id — NOT NULL
- user_id (Field8)
- created_at (Field6)
- amount (Field3)
- balance_before (Field)
- balance_after (Field7)
wallets (지갑/충전금 잔액)
- user_id (유저 아이디) — Foreign key → users.user_id — NOT NULL
- balance (Field)
- updated_at (Field2)