coupon API

Tables (6)

Coupon (coupon)

  • id (Key) — Primary key — NOT NULL
  • name (Field) — Char
  • display_name (Field10) — Char
  • type (Key2) — ForeignKey — Foreign key → SwiftCode.Key — NOT NULL
  • is_target (Field2) — Boolean
  • point (Field3) — Decimal
  • content (Field4) — Text
  • point_duration (Field5) — Integer
  • expiry_date (Field6) — DateTime
  • created_time (Field7) — DateTime
  • updated_time (Field8) — DateTime
  • deleted (Field9) — Boolean
  • 발행여부 (Field11) — 사용 가능한지

CouponCode (coupon_code)

  • code (Key3) — Primary key — NOT NULL
  • coupon (Key) — ForeignKey — Foreign key → Coupon.id — NOT NULL
  • is_used (Field2) — Boolean
  • created_time (Field) — DateTime

CouponUsed (coupon_used)

  • id (Key3) — Primary key — NOT NULL
  • coupon (Key) — ForeignKey — Foreign key → Coupon.id — NOT NULL
  • user_email (Key2) — ForeignKey — Foreign key → User.user_email — NOT NULL
  • used_date (Field) — DateTime

SwiftCode (swiftcodes)

  • Key — Primary key — NOT NULL

TargetUser (target_user)

  • id (Key3) — Primary key — NOT NULL
  • coupon (Key) — ForeignKey — Foreign key → Coupon.id — NOT NULL
  • user_email (Key2) — ForeignKey — Foreign key → User.user_email — NOT NULL
  • created_time (Field) — DateTime

User (Untitled)

  • user_email (Key) — Primary key — NOT NULL