123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153 |
- package com.sysu.admin.controller.crop;
- import com.alibaba.fastjson.annotation.JSONField;
- import com.sysu.admin.controller.crop.images.CropImage;
- import lombok.Data;
- import lombok.EqualsAndHashCode;
- import lombok.experimental.Accessors;
- import lombok.experimental.FieldNameConstants;
- import org.hibernate.annotations.DynamicInsert;
- import org.hibernate.annotations.DynamicUpdate;
- import org.locationtech.jts.geom.MultiPolygon;
- import org.locationtech.jts.geom.Point;
- import javax.persistence.*;
- import java.util.Date;
- @Data
- @Accessors(chain = true)
- @EqualsAndHashCode(callSuper = false)
- @FieldNameConstants(innerTypeName = "FIELDS")
- @Table(name = "p_crop")
- @Entity
- @DynamicInsert
- @DynamicUpdate
- public class CropLand {
- public CropLand(){
- }
- public CropLand(Long id, Integer cropType, Integer growingPeriod, Integer confirm, Integer district, String name, String address, String desc) {
- this.id = id;
- this.cropType = cropType;
- this.growingPeriod = growingPeriod;
- this.confirm = confirm;
- this.district = district;
- this.name = name;
- this.address = address;
- this.desc = desc;
- }
- /**
- * 主键
- */
- @Id
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- private Long id;
- @Column(name = "gridcode")
- private Long gridcode;
- @JSONField(serialize = false)
- @Column(columnDefinition = "geom")
- private MultiPolygon geom;
- @JSONField(serialize = false)
- @Column(columnDefinition = "center_point")
- private Point centerPoint;
- @Transient
- private String wkt;
- @Transient
- private String geojson;
- /**
- * 耕地类型
- */
- @Column
- private Integer cropType;
- /**
- * 生长期
- */
- @Column
- private Integer growingPeriod;
- /**
- * 采集经度
- */
- @Column
- private Double pickLongitude;
- /**
- * 采集纬度
- */
- @Column
- private Double pickLatitude;
- /**
- * 产量
- */
- @Column
- private Integer yield;
- @Column(nullable = false)
- private Date createDate;
- @Column(nullable = false)
- private Date updateDate;
- @Column(nullable = false)
- private Date receiveDate;
- @Column(nullable = false)
- private Long receiver;
- @Column(nullable = false)
- private Date pickDate;
- /**
- * 创建人
- */
- @Column( nullable = false)
- private Long creator;
- /**
- */
- @Column(nullable = false)
- private Long executor;
- /**
- * 状态
- */
- @Column
- private Integer status;
- @Column
- private Integer confirm;
- /**
- * 描述
- */
- @Column(name = "\"desc\"")
- private String desc;
- @Transient
- private CropImage fay;
- @Transient
- private CropImage center;
- @Transient
- private CropImage near;
- @Column
- private Integer province;
- @Column
- private Integer city;
- @Column
- private Integer district;
- @Column
- private String name;
- @Column
- private String address;
- }
|