수강신청

테이블 (10)

Class

  • Id (Key) — int — 기본 키 — NOT NULL
  • Total (Field) — int

Enrollment

  • Id (Key) — int — 기본 키 — NOT NULL
  • ClassId (Key2) — int — 외래 키 → Class.Id — NOT NULL
  • StudentId (Key3) — string — 외래 키 → Student.Id — NOT NULL

Orders

  • Id (Key) — string — 기본 키 — NOT NULL
  • UserId (Key2) — string — 외래 키 → User.Id — NOT NULL
  • Products (Field2) — Product[]
  • CreateTime (Field3) — DateTime
  • Payment (Field4) — int

Payments

  • Id (Key) — string — 기본 키 — NOT NULL
  • OrderId (Field1) — string — 외래 키 → Orders.Id — NOT NULL
  • UserId (Field2) — string — 외래 키 → Orders.UserId — NOT NULL
  • Time (Field3) — DateTime

Product

  • Id (Key) — int — 기본 키 — NOT NULL
  • Name (Field) — string
  • Price (Field2) — int

Rank (Best)

  • Time (Key2) — DateTime — 기본 키
  • Id (Key) — int — 외래 키 → Product.Id — NOT NULL
  • Quantity (Field) — int

RemainStock

  • ProductId (Key) — int — 외래 키 → Product.Id — NOT NULL
  • OrderId (Field1) — string — 외래 키 → Orders.Id — NOT NULL
  • Quantity (Field2) — int

Stock

  • Id (Key2) — int — 외래 키 → Product.Id — NOT NULL
  • Quantity (Field) — int

Student

  • Id (Key) — string — 기본 키 — NOT NULL

User

  • Id (Key) — string — 기본 키 — NOT NULL
  • point (Field) — int