提交 0349e220 作者: 涂茂林

feat:围栏entity

上级 caa2e86a
/* (C) 2022 YiRing, Inc. */
package com.yiring.app.domain.fence;
import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;
import javax.persistence.*;
import lombok.*;
import lombok.experimental.FieldNameConstants;
import org.hibernate.annotations.Comment;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Where;
import org.hibernate.snowflake.SnowflakeId;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
/**
* @author tml
* @version 1.0
* @date 2022/4/28 9:27
*/
@Getter
@Setter
@ToString
@Builder
@NoArgsConstructor
@AllArgsConstructor
@FieldNameConstants
@Entity
@Where(clause = "deleted = false")
@Table(name = "BS_Fence")
@Comment("电子围栏信息")
@EntityListeners(AuditingEntityListener.class)
public class Fence implements Serializable {
@Serial
private static final long serialVersionUID = -3665747044184158014L;
@Id
@Comment("主键id")
@GeneratedValue(generator = SnowflakeId.GENERATOR)
@GenericGenerator(name = SnowflakeId.GENERATOR, strategy = SnowflakeId.Strategy.LONG)
private Long id;
private String name;
private Integer fenceType;
@Comment("消抖阈值(秒)")
private Integer debouncingDuration;
@Comment("滞留时间(秒)")
private Integer residenceTime;
@Comment("创建时间")
@CreatedDate
@Column(nullable = false)
private LocalDateTime createTime;
@Comment("最后修改时间")
@LastModifiedDate
@Column(nullable = false)
private LocalDateTime lastUpdateTime;
@Comment(value = "是否删除")
@Column(nullable = false)
Boolean deleted;
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论