西藏巴青项目

biz_grassland_usage_record.sql 1.3KB

12345678910111213141516171819202122232425
  1. -- 草场使用记录
  2. CREATE TABLE IF NOT EXISTS `biz_grassland_usage_record` (
  3. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  4. `grassland_id` bigint(20) NOT NULL COMMENT '草场ID biz_grassland',
  5. `pasture_id` bigint(20) NOT NULL COMMENT '养殖主体ID biz_pasture',
  6. `usage_area_mu` decimal(12,2) NOT NULL COMMENT '使用面积(亩)',
  7. `use_start_date` date NOT NULL COMMENT '开始使用日期',
  8. `use_end_date` date NOT NULL COMMENT '结束使用日期',
  9. `actual_use_days` int(11) NOT NULL COMMENT '实际使用天数',
  10. `grazing_head_count` int(11) NOT NULL COMMENT '放牧数量(头)',
  11. `grazing_method` tinyint(4) NOT NULL COMMENT '放牧方式1轮牧2自由3季节',
  12. `del_flag` char(1) NOT NULL DEFAULT '0' COMMENT '0存在 2删除',
  13. `create_by` varchar(64) DEFAULT '' COMMENT '创建者',
  14. `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  15. `update_by` varchar(64) DEFAULT '' COMMENT '更新者',
  16. `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  17. `remark` varchar(500) DEFAULT NULL COMMENT '备注',
  18. PRIMARY KEY (`id`),
  19. KEY `idx_grassland_id` (`grassland_id`),
  20. KEY `idx_pasture_id` (`pasture_id`),
  21. KEY `idx_create_time` (`create_time`),
  22. KEY `idx_del_flag` (`del_flag`),
  23. KEY `idx_use_start` (`use_start_date`)
  24. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='草场使用记录';