西藏巴青项目

biz_yak_outbound_report.sql 1.9KB

1234567891011121314151617181920212223242526272829
  1. -- 牦牛出栏数据填报(物理删除,无 del_flag)
  2. CREATE TABLE IF NOT EXISTS `biz_yak_outbound_report` (
  3. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  4. `stat_year` int(11) NOT NULL COMMENT '所属年份',
  5. `stat_month` int(11) NOT NULL COMMENT '所属月份(1-12)',
  6. `town_dept_id` bigint(20) NOT NULL COMMENT '所属乡镇dept_id',
  7. `town_name` varchar(64) NOT NULL COMMENT '乡镇名称',
  8. `farmer_household_count` int(11) DEFAULT NULL COMMENT '农牧户户数',
  9. `farmer_population_count` int(11) DEFAULT NULL COMMENT '农牧户人数',
  10. `yak_outbound_count` int(11) DEFAULT NULL COMMENT '牦牛出栏数(头)',
  11. `cattle_outbound_count` int(11) DEFAULT NULL COMMENT '黄牛/奶牛/犏牛出栏数(头)',
  12. `sheep_outbound_count` int(11) DEFAULT NULL COMMENT '绵羊出栏数(只)',
  13. `goat_outbound_count` int(11) DEFAULT NULL COMMENT '山羊出栏数(只)',
  14. `horse_mule_outbound_count` int(11) DEFAULT NULL COMMENT '马骡出栏数(匹)',
  15. `donkey_outbound_count` int(11) DEFAULT NULL COMMENT '驴出栏数(头)',
  16. `self_consumption_cattle_count` int(11) DEFAULT NULL COMMENT '自食牛头数(头)',
  17. `self_consumption_sheep_count` int(11) DEFAULT NULL COMMENT '自食绵羊只数(只)',
  18. `self_consumption_goat_count` int(11) DEFAULT NULL COMMENT '自食山羊只数(只)',
  19. `create_by` varchar(64) DEFAULT '' COMMENT '创建者',
  20. `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  21. `update_by` varchar(64) DEFAULT '' COMMENT '更新者',
  22. `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  23. `remark` varchar(500) DEFAULT NULL COMMENT '备注',
  24. PRIMARY KEY (`id`),
  25. UNIQUE KEY `uk_year_month_town` (`stat_year`, `stat_month`, `town_dept_id`),
  26. KEY `idx_stat_year_month` (`stat_year`, `stat_month`),
  27. KEY `idx_town_dept_id` (`town_dept_id`)
  28. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='牦牛出栏数据填报';