package org.dromara.elevator.domain.bo;

import org.dromara.elevator.domain.EBehaviorStatistics;
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.time.LocalDate;
import java.util.Date;
import java.util.List;

/**
 * 电梯运行统计业务对象 e_behavior_statistics
 *
 * @author ym
 * @date 2024-09-06
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = EBehaviorStatistics.class, reverseConvertGenerate = false)
public class EBehaviorStatisticsBo extends BaseEntity {

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

    /**
     * 注册代码
     */
    @NotBlank(message = "注册代码不能为空", groups = { AddGroup.class, EditGroup.class })
    private String registerCode;

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

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

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

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

    /**
     * 物业单位名称
     */
    @NotBlank(message = "物业单位名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String tenementName;

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

    /**
     * 维保单位名称
     */
    @NotBlank(message = "维保单位名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String maintenanceName;

    /**
     * 行政区域编号
     */
    @NotBlank(message = "行政区域编号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String areaCode;

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

    /**
     * 使用场景;1：住宅  2：办公、3：商场超市 4：宾馆饭店、5：:医院、 6：学校:、7：交通场所:、8：:文娱场馆、9：其他场所
     */
    @NotNull(message = "使用场景;1：住宅  2：办公、3：商场超市 4：宾馆饭店、5：:医院、 6：学校:、7：交通场所:、8：:文娱场馆、9：其他场所不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer useScenario;

    /**
     * 上行次数
     */
    @NotNull(message = "上行次数不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer upNum;

    /**
     * 下行次数
     */
    @NotNull(message = "下行次数不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer downNum;

    /**
     * 里程数
     */
    @NotNull(message = "里程数不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal mileage;

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

    /**
     * 开关门次数
     */
    @NotNull(message = "开关门次数不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer openCloseNum;

    /**
     * 停站次数
     */
    @NotNull(message = "停站次数不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer stopStationNum;

    /**
     * 项目id
     */
    @NotBlank(message = "项目id不能为空", groups = { AddGroup.class, EditGroup.class })
    private String projectId;

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

    /**
     * 楼层统计JSON [{floor:1, stopStationNum10}]
     */
    private String floorStatisticsData;

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

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

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

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

    /**
     * 开始日期
     */
    private LocalDate startDate;

    /**
     * 结束日期
     */
    private LocalDate endDate;

    /**
     * 统计查询类型(1.日查询, 2.周月查询)
     */
    private Integer statisticsType;

}
