MOAMOA

Tables (8)

Coupon

  • id — BIGINT — Primary key — NOT NULL
  • storeId — BIGINT — Foreign key → store.id — NOT NULL
  • name — VARCHAR(255)
  • description — VARCHAR(255)
  • pointCost — INTEGER
  • validUntil — DATETIME

Feedback

  • id — BIGINT — Primary key — NOT NULL
  • userId — BIGINT — Foreign key → user.id — NOT NULL
  • storeId — BIGINT — Foreign key → store.id — NOT NULL
  • rating — INTEGER
  • content — TEXT

Receipt

  • id — BIGINT — Primary key — NOT NULL
  • Field
  • userId — BIGINT — Foreign key → user.id — NOT NULL
  • storeId — BIGINT — Foreign key → store.id — NOT NULL
  • isUsed — BOOLEAN
  • totalPrice — INTEGER

StoreAnnouncement

  • id — BIGINT — Primary key — NOT NULL
  • storeId — BIGINT — Foreign key → store.id — NOT NULL
  • feedbackId — BIGINT — Foreign key → Feedback.id — NOT NULL
  • content — TEXT

UserCoupon

  • id — BIGINT — Primary key — NOT NULL
  • userId — BIGINT — Foreign key → user.id — NOT NULL
  • couponId — BIGINT — Foreign key → Coupon.id — NOT NULL
  • isUsed — BOOLEAN

product

  • id — BIGINT — Primary key — NOT NULL
  • storeId — BIGINT — Foreign key → store.id — NOT NULL
  • name — VARCHAR(255)
  • description — VARCHAR(255)
  • price — INT
  • imageUrl — VARCHAR(512)

store

  • id — BIGINT — Primary key — NOT NULL
  • userId — BIGINT — Foreign key → user.id — NOT NULL
  • name (Field) — VARCHAR(32)
  • address — VARCHAR(255)
  • description — VARCHAR(255)
  • category — VARCHAR(255)
  • imageUrl — VARCHAR(512)

user

  • id — BIGINT — Primary key — NOT NULL
  • email — VARCHAR(255)
  • password — VARCHAR(16)
  • nickname — VARCHAR(16)
  • role — ENUM('CUSTOMER', 'OWNER'))
  • points — INTEGER