sambo

Tables (13)

Measurement (Untitled9)

  • id — number — Primary key — NOT NULL
  • name — string
  • range — string
  • unit — string

Place (Untitled8)

  • id — number — Primary key — NOT NULL
  • name — string

Place-User (Untitled13)

  • id — number — Primary key — NOT NULL
  • user_id — number — Foreign key → User.id — NOT NULL
  • place_id — number — Foreign key → Place.id — NOT NULL

Project (Untitled2)

  • id — string — Primary key — NOT NULL
  • name — string(unique)
  • thumb_nail — string

Project-Resource (Untitled7)

  • id — number — Primary key — NOT NULL
  • project_id — string — Foreign key → Project.id — NOT NULL
  • resource_id — number — Foreign key → Resources.id — NOT NULL

Resources (Untitled6)

  • id — number — Primary key — NOT NULL
  • status — enum(string)
  • name — string
  • rtsp_url — Optional(string)
  • place — string — Foreign key → Place.id — NOT NULL
  • measurement — array(number) — Foreign key → Measurement.id — NOT NULL
  • category — string — Foreign key → Sensor_Category.id — NOT NULL

Safety_Category (Untitled11)

  • id — number — Primary key — NOT NULL
  • name — string

Sensor_Category (Untitled10)

  • id — number — Primary key — NOT NULL
  • name — string

Setting (Untitled12)

  • id — numbe — Primary key — NOT NULL
  • path — string
  • full_capacity (full_capcity) — string
  • current_capacity — string
  • remain_capacity — string
  • storage_date — timestamp
  • project_name — string — Foreign key → Project.id — NOT NULL

User (Untitled)

  • id — number — Primary key — NOT NULL
  • email — string
  • password — string
  • name — string
  • phone — string
  • device_token — string
  • thumb_nail — string
  • department — string
  • role — enum(string)
  • created_at — timestamp
  • updated_at — timestamp
  • deleted_at — timestamp

User-Project (Untitled3)

  • id — number — Primary key — NOT NULL
  • project_id — number — Foreign key → Project.id — NOT NULL
  • user_id — number — Foreign key → User.id — NOT NULL

User-Safety (Untitled5)

  • id — number — Primary key — NOT NULL
  • user_id — number — Foreign key → User.id — NOT NULL
  • safety_id — number — Foreign key → safety_check.id — NOT NULL

safety_check (Untitled4)

  • id — number — Primary key — NOT NULL
  • status — enum(stirng)
  • create_at (created_at) — timestamp
  • updated_at — timestamp
  • description — string
  • place — string — Foreign key → Place.id — NOT NULL
  • category — string — Foreign key → Safety_Category.id — NOT NULL