package com.willalp.control.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.willalp.common.annotation.Excel;
import com.willalp.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 设备使用统计对象 hs_control_stat
 *
 * @author willalp
 * @date 2022-03-02
 */

@EqualsAndHashCode(callSuper = true)
@Data
@TableName("hs_control_stat")
public class HsControlStat extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId
    private String statId;

    /**
     * 执行口ID
     */
    @Excel(name = "执行口ID")
    private String useNoId;

    /**
     * 用量
     */
    @Excel(name = "用量")
    private String dosage;

    private Date createTime;

    @TableField(exist = false)
    private String createTimeVo;

    /**
     * 统计是否生效
     */
    private int isStat;

    /**
     * 是否删除（0.未删除；1.已删除）
     */
    @Excel(name = "是否删除", readConverterExp = "0=.未删除；1.已删除")
    @TableLogic
    private Integer isDelete;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("statId", getStatId())
                .append("useNoId", getUseNoId())
                .append("dosage", getDosage())
                .append("isDelete", getIsDelete())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .toString();
    }
}
