package org.dromara.elevator.domain.bo;

import org.dromara.elevator.domain.EWorkOperationRecord;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 工作操作记录业务对象 e_work_operation_record
 *
 * @author ym
 * @date 2024-09-11
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = EWorkOperationRecord.class, reverseConvertGenerate = false)
public class EWorkOperationRecordBo extends BaseEntity {

    /**
     * 主键id
     */
    @NotNull(message = "主键id不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 操作人
     */
    @NotBlank(message = "操作人不能为空", groups = { AddGroup.class, EditGroup.class })
    private String operator;

    /**
     * 操作时间
     */
    @NotBlank(message = "操作时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date operationTime;

    /**
     * 电梯编号
     */
    @NotBlank(message = "电梯编号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String elevatorNum;

    /**
     * 工作数据id
     */
    @NotNull(message = "工作数据id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long workId;

    /**
     * 工作类型,1.救援 2.维修 3.维保
     */
    @NotNull(message = "工作类型,1.救援 2.维修 3.维保不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer workType;

    /**
     * 操作状态
     */
    @NotNull(message = "操作状态不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer operationState;

    /**
     * 预期时间
     */
    @NotBlank(message = "预期时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date expectTime;

    /**
     * 经度
     */
    @NotNull(message = "经度不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal lng;

    /**
     * 纬度
     */
    @NotNull(message = "纬度不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal lat;

    /**
     * 地址
     */
    @NotBlank(message = "地址不能为空", groups = { AddGroup.class, EditGroup.class })
    private String address;

    /**
     * 维保单位id
     */
    @NotNull(message = "维保单位id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long maintenanceId;

    /**
     * 维保计划id
     */
    @NotNull(message = "维保计划id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long maintenancePlanId;

    /**
     * 物业id
     */
    @NotNull(message = "物业id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long tenementId;

    /**
     * 操作人id
     */
    @NotNull(message = "操作人id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long operatorId;

    /**
     * 操作内容
     */
    @NotBlank(message = "操作内容不能为空", groups = { AddGroup.class, EditGroup.class })
    private String operationContent;

    /**
     * 部门id
     */
    @NotNull(message = "部门id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long deptId;

    /**
     * 电梯编号列表
     */
    private List<String> elevatorNumList;

    /**
     * 维保ids
     */
    private List<Long> maintenanceIds;

    /**
     * 物业ids
     */
    private List<Long> tenementIds;

    /**
     * 状态列表
     */
    private List<Integer> stateList;

    /**
     * 工作类型列表
     */
    private List<Integer> workTypes;

    /**
     * 开始时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    /**
     * 结束时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;
}
