package com.ld.igds.models; import com.alibaba.fastjson.annotation.JSONField; import com.bstek.dorado.annotation.PropertyDef; import lombok.Data; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; import java.util.Date; /** * 仓内视频图像数据表 */ @Data @Entity @Table(name = "D_SEC_SNAP_DEPOT") public class SecSnapDepot { @Id @Column(name = "ID_", length = 40) @PropertyDef(label = "主键") private String id; @Column(name = "COMPANY_ID_", length = 10) @PropertyDef(label = "组织编码") private String companyId; @Column(name = "DEPT_ID_", length = 30) @PropertyDef(label = "所属分库") private String deptId; @Column(name = "DEPOT_ID_", length = 50) @PropertyDef(label = "所属仓库") private String depotId; @Column(name = "CAMERA_ID_", length = 50) @PropertyDef(label = "关联摄像头") private String cameraId; @Column(name = "RESULT_", length = 30) @PropertyDef(label = "抓拍结果") private String result = "SUCCESS"; @JSONField(format = "yyyy-MM-dd HH:mm:ss") @Column(name = "UPDATE_TIME_") @PropertyDef(label = "抓拍时间") private Date updateTime; @Column(name = "FILE_SUFFIX_", length = 4) @PropertyDef(label = "图像文件后缀名") private String fileSuffix = "jpg"; @Column(name = "FILE_NAME_", length = 100) @PropertyDef(label = "文件名称") private String fileName; @Column(name = "PRESET_ ", length = 4) @PropertyDef(label = "预置位编号") private String preset; public SecSnapDepot() { } public SecSnapDepot(String id, String companyId, String deptId, String depotId, String cameraId, String result, Date updateTime, String fileSuffix, String fileName, String preset) { this.id = id; this.companyId = companyId; this.deptId = deptId; this.depotId = depotId; this.cameraId = cameraId; this.result = result; this.updateTime = updateTime; this.fileSuffix = fileSuffix; this.fileName = fileName; this.preset = preset; } public SecSnapDepot(String tag) { if ("TEST".equals(tag)) { this.id = "TEST"; this.fileName = "./static/images/img-fail.jpg"; this.updateTime = new Date(); } } }