package com.tievd.jyz.entity; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.extension.activerecord.Model; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.experimental.Accessors; import java.io.Serializable; import java.sql.Time; import java.util.Date; /** *

* 巡查配置表 *

* * @author * @since 2023-08-15 */ @Data @Accessors(chain = true) @TableName("t_patrol_config") @Schema(name = "PatrolConfig", description = "巡查配置表") public class PatrolConfig extends Model { private static final long serialVersionUID = 1L; @TableId(value = "id") private Long id; @Schema(description = "算法") @TableField("algorithm_name") private String algorithmName; @Schema(description = "算法code") @TableField("algorithm_code") private String algorithmCode; @Schema(description = "机构代码") @TableField("org_code") private String orgCode; @Schema(description = "摄像头code") @TableField("camera_code") private String cameraCode; @Schema(description = "分值") @TableField("score") private Byte score; @Schema(description = "巡查时间段") @TableField("time_period") private String timePeriod; @Schema(description = "巡查开始时间") @TableField("time_start") private Time timeStart; @Schema(description = "巡查结束时间") @TableField("time_end") private Time timeEnd; @TableField("create_time") private Date createTime; @Override public Serializable pkVal() { return this.id; } public void generateId() { String code = algorithmCode.substring(algorithmCode.length()-2); id = Long.valueOf(Math.abs((orgCode + cameraCode).hashCode()) + code); } }