package com.willalp.control.domain;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.sql.Time;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.willalp.common.annotation.Excel;
import com.willalp.common.core.domain.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 设备定时任务对象 hs_control_timing
 *
 * @author willalp
 * @date 2022-02-16
 */

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

    /** 主键 */
    @TableId
    private Long timingId;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 控制设备ID */
    @Excel(name = "使用号口ID")
    private Long useNoId;

    /**
     * 周期
     */
    @Excel(name = "周期")
    private String cycle;

    /** 开始时间 */
    @Excel(name = "开始时间", width = 30)
    private Time startTime;

    /** 结束时间 */
    @Excel(name = "结束时间", width = 30)
    private Time endTime;

    /** 当前状态（0=启用，1=停用） */
    @Excel(name = "当前状态", readConverterExp = "0=启用,1=停用")
    private Integer state;

    /** 是否删除（0.未删除；1.已删除） */
    private Integer isDelete;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("timingId", getTimingId())
            .append("userId", getUserId())
            .append("useNoId", getUseNoId())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("cycle", getCycle())
            .append("state", getState())
            .append("isDelete", getIsDelete())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
