lifestyle.ERD
Tables (12)
Admins (관리자)
- Admin_ID (admin_id) — int — Primary key — NOT NULL
- Email (email) — varchar(255)
- NickName (nickname) — varchar(32)
- Password_Hash (password_hash) — varchar(255)
- Created_AT (created_at) — timestamptz
Chat_Sessions (채팅방)
- Chat_Sessions_ID (chat_sessions_id) — int — Primary key — NOT NULL
- User_ID (user_id) — int — Foreign key → Secretary.User_ID — NOT NULL
- Title (title) — varchar(128)
- Created_AT (created_at) — timestamptz
- Updated_AT (updated_at) — timestamptz
Closet (옷장(선호도 설정 및 추천))
- Closet_ID (Closet_id) — int — Primary key — NOT NULL
- User_ID (user_id) — int — Foreign key → Secretary.User_ID — NOT NULL
- Gender_Preset (gender_preset) — varchar(16)
- Style_Tags (style_tags) — json
- Temperature_Sensitivity (temperature_sensitivity) — varchar(16)
- Created_AT (created_at) — timestamptz
- Update_AT (updated_at) — timestamptz
Closet_Items (보유의류(날씨 맞춤))
- Closet_Items_ID (closet_items_id) — int — Primary key — NOT NULL
- Closet_ID (Closet_id) — int — Foreign key → Closet.Closet_ID — NOT NULL
- User_ID (user_id) — int — Foreign key → Closet.User_ID — NOT NULL
- Name (name) — varchar(64)
- Category (category) — varchar(32)
- Warmth (warmth) — varchar(16)
- Color (color) — varchar()
- Note (note) — varchar(128)
- Created_AT (created_at) — timestamptz
Messages (메시지)
- Messages_ID (messages_id) — int — Primary key — NOT NULL
- Chat_Sessions_ID (chat_sessions_id) — int — Foreign key → Chat_Sessions.Chat_Sessions_ID — NOT NULL
- User_ID (user_id) — int — Foreign key → Chat_Sessions.User_ID — NOT NULL
- Role (role) — varchar()
- Content (content) — TEXT()
- Created_AT (created_at) — timestamptz
Music (선호도(장르) 및 추천)
- Music_ID (music_id) — int — Primary key — NOT NULL
- User_ID (user_id) — int — Foreign key → Secretary.User_ID — NOT NULL
- Genre_Tags (genre_tags) — json
- Mood_Tags (mood_tags) — json
- Created_AT (created_at) — timestamptz
- Update_AT (updated_at) — timestamptz
Music_Items (저장곡)
- Music_Items_ID (musi_items_id) — int — Primary key — NOT NULL
- Music_ID (music_id) — int — Foreign key → Music.Music_ID — NOT NULL
- User_ID (user_id) — int — Foreign key → Music.User_ID — NOT NULL
- Title (title) — verchar(128)
- Artist (artist) — verchar(64)
- Scene (scene) — verchar(16)
- Note (note) — varchar(128)
- Created_AT (created_at) — timestamptz
Refrigerator (냉장고(선호 음식 및 기피음식))
- Refrigerator_ID (refrigerator_id) — int — Primary key — NOT NULL
- User_ID (user_id) — int — Foreign key → Secretary.User_ID — NOT NULL
- Avoided_Ingredients (avoided_ingredients) — json
- Cooking_Preference_Tags (cooking_preference_tags) — json
- Created_AT (created_at) — timestamptz
- Updated_AT (updated_at) — timestamptz
Refrigerator_Items (재고 및 유통기한)
- Refrigerator_Items_ID (refrigerator_items_id) — int — Primary key — NOT NULL
- Refrigerator_ID (refrigerator_id) — int — Foreign key → Refrigerator.Refrigerator_ID — NOT NULL
- User_ID (user_id) — int — Foreign key → Refrigerator.User_ID — NOT NULL
- Name (name) — varchar(64)
- Quantity (quantity) — varchar(32)
- Expiry_Date (expiry_date) — DATE()
- Category (category) — varchar(32)
- Note (note) — varchar(128)
- Created_AT (created_at) — timestamptz
Secretary (비서(유저))
- User_ID (user_id) — int — Primary key — NOT NULL
- Email (email) — varchar(255)
- Nickname (nickname) — varchar(32)
- Role (role) — enum
- Password_Hash (password_hash) — varchar(255)
- Created_At (created_at) — timestamptz
- Profile_Image_URL (profile_image_url) — varchar(512)
User_Settings (마이페이지 및 AI 설정)
- User_Settings_ID (user_settings_id) — int — Primary key — NOT NULL
- User_ID (user_id) — int — Foreign key → Secretary.User_ID — NOT NULL
- Language (language) — varchar(16)
- Preferred_Model (preferred_model) — varchar(64)
- Created_AT (created_at) — timestamptz
- Updated_AT (updated_at) — timestamptz
Warnings (경고)
- Warnings_ID (warnings_id) — int — Primary key — NOT NULL
- User_ID (user_id) — int — Foreign key → Secretary.User_ID — NOT NULL
- Admin_ID (admin_id) — int — Foreign key → Admins.Admin_ID — NOT NULL
- Message (message) — text(2000)
- Created_AT (created_at) — timestamptz