package com.zhitan.engine.entity; import lombok.Data; import org.hibernate.annotations.GenericGenerator; import javax.persistence.*; import java.math.BigDecimal; import java.time.LocalDateTime; import java.time.LocalTime; /** * 尖峰平谷电价设置实体类 * 对应数据库中的electricity_price表 */ @Data @Entity @Table(name = "electricity_price") public class ElectricityPrice { private static final long serialVersionUID = 1L; @Id @GenericGenerator(name = "uuid", strategy = "uuid2") @GeneratedValue(generator = "uuid") @Column(name = "id", length = 36) private String id; /** * 父级id,关联electricity_price_date表的id */ @Column(name = "parent_id", length = 36, nullable = false) private String parentId; /** * 用电类型(尖、峰、平、谷、深谷) * SHARP: 尖 * PEAK: 峰 * FLAT: 平 * VALLEY: 谷 * DEEP: 深谷 */ @Column(name = "type", length = 36) private String type; /** * 时段开始时间 */ @Column(name = "start_time") private LocalTime startTime; /** * 时段结束时间 */ @Column(name = "stop_time") private LocalTime stopTime; /** * 电价 */ @Column(name = "effecticity_price", precision = 12, scale = 2) private BigDecimal effecticityPrice; @Column(name = "create_by", length = 64) private String createBy; @Column(name = "create_time") private LocalDateTime createTime; @Column(name = "update_by", length = 64) private String updateBy; @Column(name = "update_time") private LocalDateTime updateTime; @Column(name = "remark", length = 255) private String remark; }