quadS
Tables (11)
Children (children)
- children_id — BIGINT — Primary key — NOT NULL
- name — VARCHAR(50) — NOT NULL
- email — VARCHAR(12) — NOT NULL — 자녀 아이디
- hash — VARCHAR(255) — NOT NULL
- childcode (code) — VARCHAR(6)
- created_at — DATETIME
Connection (connection)
- connection_id — BIGINT — Primary key — NOT NULL
- parent_id — BIGINT — Foreign key → Parent.parent_id — NOT NULL — Parents 테이블 참조
- children_id — BIGINT — Foreign key → Children.children_id — NOT NULL — Children 테이블 참조
- connected_at — DATETIME
DaySchedule (day_schedule)
- day_schedule_id — BIGINT — Primary key — NOT NULL
- week_schedule_id — Foreign key → WeekSchedule.week_schedule_id — NOT NULL
- children_id — BIGINT — Foreign key → Children.children_id — NOT NULL
- title — VARCHAR(100)
- day (day_of_week) — ENUM('MON','TUE','WED','THU','FRI','SAT','SUN')
- start (start_time) — TIME
- end (end_time) — TIME
- created_at
- updated_at
Mission (mission)
- mission_id — BIGINT — Primary key — NOT NULL
- parent_id — BIGINT — Foreign key → Parent.parent_id — NOT NULL — 미션을 만든 부모
- children_id — BIGINT — Foreign key → Children.children_id — NOT NULL
- title — VARCHAR(50) — NOT NULL
- created_at
MissionPerformance (mission_performance)
- mission_performance_id — BIGINT — Primary key — NOT NULL
- mission_id — BIGINT — Foreign key → Mission.mission_id — NOT NULL
- child_id — BIGINT — Foreign key → Children.children_id — NOT NULL — 수행한 자녀
- status — ENUM('PENDING', 'ACCEPTED', 'REJECTED')
- proof_url — VARCHAR(500)
- created_at
- updated_at
MissionSetting (mission_setting)
- mission_setting_id — Primary key — NOT NULL
- mission_id — BIGINT — Foreign key → Mission.mission_id — NOT NULL
- category — ENUM
- cycle — ENUM
- check_type — ENUM
- reward — INT
- prompt — VARCHAR(100)
Notification (notification)
- notification_id — BIGINT — Primary key — NOT NULL
- parent_id — BIGINT — Foreign key → Parent.parent_id — 수신자가 부모인 경우 FK
- child_id — BIGINT — Foreign key → Children.children_id — 수신자가 자녀인 경우 FK
- type — ENUM
- content — TEXT — NOT NULL — 알림 메시지 내용
- is_read — TINYINT(1) — 읽음 여부
- created_at — DATETIME
Parent (parent)
- parent_id — BIGINT — Primary key — NOT NULL
- name — VARCHAR(50) — NOT NULL
- email — VARCHAR(12) — NOT NULL — 부모 아이디
- hash — VARCHAR(255) — NOT NULL
- created_at — DATETIME
TimeDistribution (time_distribution)
- time_distribution_id — BIGINT — Primary key — NOT NULL
- policy_id — BIGINT — Foreign key → TimePolicy.time_policy_id — NOT NULL
- target_date — DATE
- minute (planned_min) — INT
- bonus (bonus_min) — INT
- is_completed — TINYINT(1)
TimePolicy (time_policy)
- time_policy_id — BIGINT — Primary key — NOT NULL
- children_id — BIGINT — Foreign key → Children.children_id — NOT NULL
- parent_id — BIGINT — Foreign key → Parent.parent_id — NOT NULL
- target_month — DATE — NOT NULL
- total_time — INT — NOT NULL
WeekSchedule (week_schedule)
- week_schedule_id — Primary key — NOT NULL
- month
- week
- total_time
- created_at
- updated_at