erwtg

Tables (19)

agency

  • user_no — int(11) — Foreign key → user.user_no — NOT NULL
  • name — varchar(20) — NOT NULL
  • created_at — datetime
  • updated_at — datetime
  • addr1 — int(11) — Foreign key → region_city_code.city_no

farm

  • farm_no — int(11) — Primary key — NOT NULL
  • name — varchar(20) — NOT NULL
  • tel — varchar(20) — NOT NULL
  • addr2 — int(11) — NOT NULL
  • created_at — datetime
  • updated_at — datetime
  • addr1 — int(11) — Foreign key → region_city_code.city_no
  • agency_user_no — int(11) — Foreign key → agency.user_no

farm_to_investigator

  • investigator_user_no — int(11) — Foreign key → investigator.user_no — NOT NULL
  • farm_farm_no — int(11) — Foreign key → farm.farm_no — NOT NULL
  • created_at — datetime — NOT NULL
  • updated_at — datetime — NOT NULL

investigator

  • user_no — int(11) — Foreign key → user.user_no — NOT NULL
  • created_at — datetime
  • updated_at — datetime
  • addr1 — int(11) — Foreign key → region_city_code.city_no

investigator_to_agency

  • investigator_user_no — int(11) — Foreign key → investigator.user_no — NOT NULL
  • agency_user_no — int(11) — Foreign key → agency.user_no — NOT NULL
  • created_at — datetime — NOT NULL
  • updated_at — datetime — NOT NULL

login

  • id — int(11) — Primary key — NOT NULL
  • token — varchar(200) — NOT NULL
  • refreshToken — varchar(200) — NOT NULL
  • created_at — datetime — NOT NULL
  • updated_at — datetime — NOT NULL
  • user_user_no — int(11) — Foreign key → user.user_no

money

  • money_no — int(11) — Primary key — NOT NULL
  • date — datetime — NOT NULL
  • value — bigint(11) — NOT NULL
  • proxy_no — int(11)
  • up_user_id — varchar(50) — NOT NULL
  • product_no — int(11) — NOT NULL
  • created_at — datetime
  • updated_at — datetime
  • money_code_money_cd — varchar(10) — Foreign key → money_code.money_cd
  • proxy_proxy_no — int(11) — Foreign key → proxy.proxy_no

money_code

  • money_cd — varchar(10) — Primary key — NOT NULL
  • name — varchar(20) — NOT NULL
  • type — varchar(10) — NOT NULL
  • created_at — datetime
  • updated_at — datetime

product

  • product_no — int(11) — Primary key — NOT NULL
  • created_at — datetime
  • updated_at — datetime
  • farm_farm_no — int(11) — Foreign key → farm.farm_no
  • product_code_product_code_no — int(11) — Foreign key → product_code.product_code_no

product_category

  • category_cd — varchar(10) — Primary key — NOT NULL
  • name — varchar(45) — NOT NULL
  • created_at — datetime
  • updated_at — datetime

product_code

  • product_code_no — int(11) — Primary key — NOT NULL
  • name — varchar(20) — NOT NULL
  • created_at — datetime
  • updated_at — datetime
  • product_category_category_cd — varchar(10) — Foreign key → product_category.category_cd

proxy

  • proxy_no — int(11) — Primary key — NOT NULL
  • created_at — datetime
  • updated_at — datetime
  • farm_no — int(11) — Foreign key → farm.farm_no
  • reg_user_no — int(11) — Foreign key → user.user_no
  • up_user_no — int(11) — Foreign key → user.user_no

region_city_code

  • city_no — int(11) — Primary key — NOT NULL
  • name — varchar(45)
  • created_at — datetime
  • updated_at — datetime
  • region_code_region_cd — varchar(10) — Foreign key → region_code.region_cd

region_code

  • region_cd — varchar(10) — Primary key — NOT NULL
  • name — varchar(20)
  • created_at — datetime
  • updated_at — datetime

season

  • season_no — int(11) — Primary key — NOT NULL
  • name — varchar(20) — NOT NULL
  • start_dt — datetime — NOT NULL
  • end_dt — datetime — NOT NULL
  • product_no — int(11) — NOT NULL
  • created_at — datetime
  • updated_at — datetime
  • product_product_no — int(11) — Foreign key → product.product_no

stat_income

  • stat_no — int(11) — Primary key — NOT NULL
  • year — datetime — NOT NULL
  • value — int(11) — NOT NULL
  • created_at — datetime
  • updated_at — datetime
  • money_code_money_cd — varchar(10) — Foreign key → money_code.money_cd
  • region_city_code_city_no — int(11) — Foreign key → region_city_code.city_no
  • product_code_product_code_no — int(11) — Foreign key → product_code.product_code_no

stat_place

  • stat_no — int(11) — Primary key — NOT NULL
  • value — int(11)
  • date — datetime
  • created_at — datetime
  • updated_at — datetime
  • region_city_code_city_no — int(11) — Foreign key → region_city_code.city_no
  • product_code_product_code_no — int(11) — Foreign key → product_code.product_code_no

user

  • user_no — int(11) — Primary key — NOT NULL
  • uid — varchar(50) — NOT NULL
  • password — varchar(50) — NOT NULL
  • name — varchar(20) — NOT NULL
  • tel — varchar(20) — NOT NULL
  • desc — text
  • created_at — datetime
  • updated_at — datetime
  • user_grade_grade_cd — varchar(20) — Foreign key → user_grade.grade_cd

user_grade

  • grade_cd — varchar(20) — Primary key — NOT NULL
  • name — varchar(20) — NOT NULL
  • created_at — datetime
  • updated_at — datetime