3
Tables (9)
Admin_Account
- adminId — BIGINT — Primary key — NOT NULL
- email — VARCHAR(100) — NOT NULL
- passwordHash — VARCHAR(255) — NOT NULL
- name — VARCHAR(50) — NOT NULL
- role — ENUM('ADMIN', 'OPERATOR') — NOT NULL
- status — ENUM('ACTIVE', 'INACTIVE') — NOT NULL
- lastLoginAt — DATETIME
- createTime — DATETIME — NOT NULL
- updateTime — DATETIME — NOT NULL
Ingredient_Master
- ingredientId — BIGINT — Primary key — NOT NULL
- ingredientName — VARCHAR(100) — NOT NULL
- category — VARCHAR(50)
- storageType — VARCHAR(20)
- baseUnit — VARCHAR(20)
- createTime — DATETIME — NOT NULL
- updateTime — DATETIME — NOT NULL
Ingredients
- inventoryId — BIGINT — Primary key — NOT NULL
- userId — BIGINT — Foreign key → User.userId — NOT NULL
- ingredientId — BIGINT — Foreign key → Ingredient_Master.ingredientId — NOT NULL
- quantity — DECIMAL(10,2) — NOT NULL
- unit — VARCHAR(20)
- purchaseDate — DATE
- expirationDate — DATE
- status — ENUM('IN_FRIDGE', 'USED', 'SHARED', 'EXPIRED', 'DELETED') — NOT NULL
- createTime — DATETIME — NOT NULL
- updateTime — DATETIME — NOT NULL
Location
- locationId — BIGINT — Primary key — NOT NULL
- userId — BIGINT — Foreign key → User.userId — NOT NULL
- latitude — DOUBLE
- longitude — DOUBLE
- fullAddress — VARCHAR(255)
- displayAddress — VARCHAR(100)
- createTime — DATETIME — NOT NULL
- updateTime — DATETIME — NOT NULL
Recipe
- recipeId — BIGINT — Primary key — NOT NULL
- name — VARCHAR(100) — NOT NULL
- category — VARCHAR(50)
- cookingMethod — VARCHAR(50)
- calories — INT
- imageUrl — VARCHAR(255)
- createTime — DATETIME — NOT NULL
- updateTime — DATETIME — NOT NULL
Recipe_Ingredient
- riId — BIGINT — Primary key — NOT NULL
- recipeId — BIGINT — Foreign key → Recipe.recipeId — NOT NULL
- ingredientId — BIGINT — Foreign key → Ingredient_Master.ingredientId — NOT NULL
- amount — DECIMAL(10,2)
- unit — VARCHAR(20)
Recipe_Step
- rsId — BIGINT — NOT NULL
- recipeId — BIGINT — NOT NULL
- stepOrder — INT — NOT NULL
- description — TEXT — NOT NULL
- createTime — DATETIME — NOT NULL
User
- userId — BIGINT — Primary key — NOT NULL
- email — VARCHAR(100) — NOT NULL
- passwordHash — VARCHAR(255)
- nickName — VARCHAR(50) — NOT NULL
- address — VARCHAR(255)
- authProvider — ENUM('local', 'kakao', 'google', 'apple') — NOT NULL
- createTime — DATETIME — NOT NULL
- updateTime — DATETIME — NOT NULL
User_Preference
- prefId — BIGINT — Primary key — NOT NULL
- userId — BIGINT — Foreign key → User.userId — NOT NULL
- ingredientId — BIGINT — Foreign key → Ingredient_Master.ingredientId
- preferenceType — ENUM('ALLERGY', 'FAVORITE', 'DISLIKE') — NOT NULL
- preferenceValue — VARCHAR(100) — NOT NULL
- createTime — DATETIME — NOT NULL