package org.dromara.elevator.domain.bo;

import org.dromara.elevator.domain.ERelevancyCode;
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 java.time.LocalDate;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 电梯二维码关联信息;业务对象 e_relevancy_code
 *
 * @author zy
 * @date 2024-07-31
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = ERelevancyCode.class, reverseConvertGenerate = false)
public class ERelevancyCodeBo extends BaseEntity {

    /**
     * 主键id
     */
    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 qrCode;

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

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

    /**
     * 关联日期起
     */
    @NotNull(message = "关联日期起不能为空", groups = { AddGroup.class, EditGroup.class })
    private LocalDate startTime;

    /**
     * 关联日期止
     */
    @NotNull(message = "关联日期止不能为空", groups = { AddGroup.class, EditGroup.class })
    private LocalDate endTime;

    /**
     * 项目
     */
    private String projectId;

    /**
     * 项目名称
     */
    private String projectName;

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

    /**
     * 联系方式
     */
    @NotBlank(message = "联系方式不能为空", groups = { AddGroup.class, EditGroup.class })
    private String contactsPhone;

    /**
     * 关联账号
     */
    private String relevancyAccount;

    /**
     * 是否关联二维码;1：是    0：否
     */
    private Integer isRelevancy;

    /**
     * 部门id
     */
    private Long deptId;

    /**
     * 二维码 Url
     */
    private String qrCodeUrl;
}
