package com.ho.business.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ho.common.tools.constant.CommonConstant;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName elec_template
 */
@Data
public class ElecTemplate implements Serializable {

    Integer id;
    /**
     * 电站id
     */
    @ApiModelProperty(value = "电站id")
    private Integer stationId;

    /**
     * 集团id
     */
    @ApiModelProperty(value = "集团id")
    private Integer groupId;

    /**
     * 模板编号
     */
    @ApiModelProperty(value = "模板编号")
    private String templateNo;

    /**
     * 模板名称
     */
    @ApiModelProperty(value = "模板名称")
    @ExcelProperty
    @Length(max = 50,message = "模板名称不能超过50个字符")
    private String templateName;

    /**
     * 是否启动(启用:1,禁用:0)
     */
    @ApiModelProperty(value = "是否启动(启用:1,禁用:0)")
    private Integer isEnable;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = CommonConstant.DATE)
    @ExcelProperty
    private Date createTime;

    /**
     * 修改时间
     */
    @JsonFormat(pattern = CommonConstant.DATE)
    @ExcelProperty
    private Date updateTime;

    @ApiModelProperty(value = "模板类型（0：电网代购电价格 1：售电价格）")
    private Integer templateType;

    /**
     * 价格
     */
    @ApiModelProperty(value = "电价曲线类型(1: 储能 2：光伏 3：充电桩)")
    private String elecType;

    @ApiModelProperty(value="模板有效期开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date validityStartTime;

    @ApiModelProperty(value="模板有效期结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date validityEndTime;

    @ApiModelProperty(value="电价折扣")
    private Double discount;

}