DeliveryCalcWB

Tables (7)

Account (account)

  • id — int — Primary key — NOT NULL
  • tarif_id — int — NOT NULL
  • balance — float
  • curency — varchar(5)
  • state — int2
  • token — varchar(50)
  • params — json
  • description — varchar(500)
  • created_at — datetime
  • updated_at — datetime

Filial (filial)

  • id — int — Primary key — NOT NULL
  • account_id — int — Foreign key → Account.id — NOT NULL
  • title — varchar(100)
  • addr — json
  • loc — point
  • ord — int
  • created_at — datetime
  • updated_at — datetime
  • deleted_at — datetime

Price (price)

  • id — int — Primary key — NOT NULL
  • account_id — int — Foreign key → Account.id — NOT NULL
  • dist_min — float
  • dist_max — float
  • cost — float
  • created_at — datetime
  • updated_at (updatetd_at) — datetime

Price Filial Zone (price_filial_zone)

  • id (Key) — Primary key — NOT NULL
  • account_id — int — Foreign key → Account.id — NOT NULL
  • filial_id — int — Foreign key → Filial.id — NOT NULL
  • zone_id — int — Foreign key → Zone.id — NOT NULL
  • cost — float
  • created_at — int

User (usr)

  • id — int — Primary key — NOT NULL
  • first_name — varchar(100)
  • last_name — varchar(100)
  • email — varchar(100)
  • phone — varchar(50)
  • role — int
  • password — varchar(100)
  • status — int
  • created_at — datetime
  • updated_at — datetime
  • deleted_at — datetime

User to acount (usr_x_account)

  • id — int — Primary key — NOT NULL
  • user_id — int — Foreign key → User.id — NOT NULL
  • account_id — int — Foreign key → Account.id — NOT NULL
  • is_master — boolean
  • status — status
  • created_at — datetime
  • updated_at — datetime

Zone (zone)

  • id — int — Primary key — NOT NULL
  • account_id — int — Foreign key → Account.id — NOT NULL
  • title — varchar(100)
  • zone — geometry
  • ord — int
  • created_at — datetime
  • updated_at — datetime
  • deleted_at — datettime