1

Tables (14)

ChatMessage

  • chatMessageId — BIGINT — Primary key — NOT NULL
  • userId — BIGINT — Foreign key → User.userId — NOT NULL
  • chatRoomId — BIGINT — Foreign key → ChatRoom.chatRoomId — NOT NULL
  • type — VARCHAR(20) — NOT NULL
  • detailMessage — TEXT — NOT NULL
  • createTime — DATETIME
  • isRead — BOOLEAN

ChatRoom

  • chatRoomId — BIGINT — Primary key — NOT NULL
  • shareId — BIGINT — Foreign key → Share.shareId — NOT NULL
  • buyerId — BIGINT — Foreign key → User.userId — NOT NULL
  • createTime — DATETIME
  • updateTime — DATETIME

ChatRoomParticipant

  • chatRoomId — BIGINT — Foreign key → ChatRoom.chatRoomId — NOT NULL
  • userId — BIGINT — Foreign key → User.userId — NOT NULL
  • createTime — DATETIME

Ingredient_Master

  • ingredientId — BIGINT — Primary key — NOT NULL
  • ingredientName — VARCHAR(100) — NOT NULL
  • category — VARCHAR(50)
  • storageType — VARCHAR(20)
  • baseUnit — VARCHAR(20)
  • createTime — DATETIME
  • updateTime — DATETIME

Ingredients

  • gloId — BIGINT — Primary key — NOT NULL
  • userId — BIGINT — Foreign key → User.userId — NOT NULL
  • ingredientId — BIGINT — Foreign key → Ingredient_Master.ingredientId — NOT NULL
  • count — BIGINT
  • purchaseDate — DATE
  • expirationDate — DATE
  • status — VARCHAR(20)
  • createTime — DATETIME
  • updateTime — DATETIME

Location

  • locationId — BIGINT — Primary key — NOT NULL
  • userId — BIGINT — Foreign key → User.userId — NOT NULL
  • latitude — DOUBLE
  • longitude — DOUBLE
  • fullAddress — VARCHAR(100)
  • displayAddress — VARCHAR(50)

Recipe

  • recipeId — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(100)
  • category — VARCHAR(50)
  • cookingMethod — VARCHAR(50)
  • calories — BIGINT
  • imageUrl — VARCHAR(255)
  • createTime — DATETIME

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 — DOUBLE
  • unit — VARCHAR(20)

Recipe_Step

  • rsId — BIGINT — Primary key — NOT NULL
  • recipeId — BIGINT — Foreign key → Recipe.recipeId — NOT NULL
  • stepOrder — INT
  • description — TEXT
  • createTime — DATETIME

Report

  • reportId — BIGINT — Primary key — NOT NULL
  • reporterId — BIGINT — Foreign key → User.userId — NOT NULL
  • shareId — BIGINT — Foreign key → Share.shareId — NOT NULL
  • reason — TEXT — NOT NULL
  • createTime — DATETIME

Share

  • shareId — BIGINT — Primary key — NOT NULL
  • userId — BIGINT — Foreign key → User.userId — NOT NULL
  • gloId — BIGINT — Foreign key → Ingredients.gloId — NOT NULL
  • title — VARCHAR(255) — NOT NULL
  • content — TEXT
  • status — VARCHAR(20)
  • createTime — DATETIME
  • updateTime — DATETIME

Share_Picture

  • spId — BIGINT — Primary key — NOT NULL
  • shareId — BIGINT — Foreign key → Share.shareId — NOT NULL
  • pictureUrl — VARCHAR(255) — NOT NULL
  • createTime — DATETIME

User

  • userId — BIGINT — Primary key — NOT NULL
  • email — VARCHAR(50) — NOT NULL
  • password — VARCHAR(100)
  • nickName — VARCHAR(50) — NOT NULL
  • address — VARCHAR(255)
  • firstLogin — VARCHAR(20)
  • createTime — DATETIME
  • updateTime — DATETIME

User_Preference

  • prefId — BIGINT — Primary key — NOT NULL
  • userId — BIGINT — Foreign key → User.userId — NOT NULL
  • ingredientId — BIGINT — Foreign key → Ingredient_Master.ingredientId
  • type — VARCHAR(50)