package org.dromara.elevator.domain.bo;

import org.dromara.elevator.domain.EThirdPartyUser;
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.util.Collection;

/**
 * 物业维保等用户信息业务对象 e_third_party_user
 *
 * @author zy
 * @date 2024-09-04
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = EThirdPartyUser.class, reverseConvertGenerate = false)
public class EThirdPartyUserBo extends BaseEntity {

    /**
     * 用户ID
     */
    private Long id;

    /**
     * 第三方单位id
     */
    @NotBlank(message = "第三方单位id不能为空", groups = { AddGroup.class, EditGroup.class })
    private String unitId;

    /**
     * 第三方单位code
     */
    @NotBlank(message = "第三方单位code不能为空", groups = { AddGroup.class, EditGroup.class })
    private String unitCode;

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

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

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

    /**
     * 电子邮箱
     */
    private String mail;

    /**
     * 是否单位管理员
     */
    @NotNull(message = "是否单位管理员不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer isAdmin;

    /**
     * 备注
     */
    private String remark;

    /**
     * 三方ids
     */
    private Collection<String> unitIds;
}
