package com.xunmei.system.domain;

import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.xunmei.common.core.web.domain.BaseEntity;

/**
 * 作息设置对象 sys_work_time_set
 *
 * @author xunmei
 * @date 2023-08-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_work_time_set")
@ApiModel(value = "SysWorkTimeSet对象", description = "作息设置")
public class SysWorkTimeSet extends BaseEntity {
    private static final long serialVersionUID = 1L;
    @TableField(exist = false)
    private List<SysWorkTimeSetDayofweek> dayOfWeeks;
    /**
     * ID
     */
    @ApiModelProperty("是否覆盖手动添加的作息数据")
    @TableField(exist = false)
    private Integer checkDataResult;
    @TableField(exist = false)
    private List<Long> orgIds;
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    @ApiModelProperty("工作日")
    @TableField(exist = false)
    private String workDay;
    @TableField(exist = false)
    private Integer timeCheck;
    /**
     * 机构 ID
     */
    @ApiModelProperty(value = "机构 ID")
    private Long orgId;
    @TableField(exist = false)
    private Date[] range;
    /**
     * 机构 名称
     */
    @ApiModelProperty(value = "机构 名称")
    private String orgName;

    /**
     * 0: 关闭，1：开启
     */
    @ApiModelProperty(value = "0: 关闭，1：开启")
    private Long monthEnable;

    /**
     * 0: 关闭，1：开启
     */
    @ApiModelProperty(value = "0: 关闭，1：开启")
    private Long monday;

    /**
     * 0: 关闭，1：开启
     */
    @ApiModelProperty(value = "0: 关闭，1：开启")
    private Long tuesday;

    /**
     * 0: 关闭，1：开启
     */
    @ApiModelProperty(value = "0: 关闭，1：开启")
    private Long wednesday;

    /**
     * 0: 关闭，1：开启
     */
    @ApiModelProperty(value = "0: 关闭，1：开启")
    private Long thursday;

    /**
     * 0: 关闭，1：开启
     */
    @ApiModelProperty(value = "0: 关闭，1：开启")
    private Long friday;

    /**
     * 0: 关闭，1：开启
     */
    @ApiModelProperty(value = "0: 关闭，1：开启")
    private Long saturday;

    /**
     * 0: 关闭，1：开启
     */
    @ApiModelProperty(value = "0: 关闭，1：开启")
    private Long sunday;

    /**
     * 上班时间
     */
    @ApiModelProperty(value = "上班时间")
    private String workTime;

    /**
     * 营业时间
     */
    @ApiModelProperty(value = "营业时间")
    private String openTime;

    /**
     * 午休开始
     */
    @ApiModelProperty(value = "午休开始")
    private String noonbreakStart;

    /**
     * 午休结束
     */
    @ApiModelProperty(value = "午休结束")
    private String noonbreakEnd;

    /**
     * 营业终了
     */
    @ApiModelProperty(value = "营业终了")
    private String closeTime;

    /**
     * 下班时间
     */
    @ApiModelProperty(value = "下班时间")
    private String workOffTime;

    /**
     * 最后修改人id
     */
    @ApiModelProperty(value = "最后修改人id")
    private Long modifiedId;

    /**
     * 修改人名称
     */
    @ApiModelProperty(value = "修改人名称")
    private String modifiedName;

    /**
     * 年份
     */
    @ApiModelProperty(value = "年份")
    private Long year;

    /**
     * 是否删除
     */
    @ApiModelProperty(value = "是否删除")
    private Long deleted;

    /**
     * 生效日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "生效日期")
    private Date effectiveDate;


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)


                .append("id", getId())


                .append("orgId", getOrgId())


                .append("orgName", getOrgName())


                .append("monthEnable", getMonthEnable())


                .append("monday", getMonday())


                .append("tuesday", getTuesday())


                .append("wednesday", getWednesday())


                .append("thursday", getThursday())


                .append("friday", getFriday())


                .append("saturday", getSaturday())


                .append("sunday", getSunday())


                .append("workTime", getWorkTime())


                .append("openTime", getOpenTime())


                .append("noonbreakStart", getNoonbreakStart())


                .append("noonbreakEnd", getNoonbreakEnd())


                .append("closeTime", getCloseTime())


                .append("workOffTime", getWorkOffTime())


                .append("createTime", getCreateTime())


                .append("modifiedId", getModifiedId())


                .append("modifiedName", getModifiedName())


                .append("updateTime", getUpdateTime())


                .append("year", getYear())


                .append("deleted", getDeleted())


                .append("effectiveDate", getEffectiveDate())
                .toString();
    }
}
