package com.aircraft.modules.security.service.dto;


import com.aircraft.base.BaseEntity;
import com.aircraft.modules.system.domain.Dept;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 通用的登录用户
 */

@Data
public class LoginUserDto {

    @NotNull(groups = BaseEntity.Update.class)
    @TableId(value = "user_id", type = IdType.AUTO)
    @ApiModelProperty(value = "ID", hidden = true)
    private Long id;


    @ApiModelProperty(value = "用户部门")
    @TableField(exist = false)
    private Dept dept;

    @NotBlank
    @ApiModelProperty(value = "用户名称")
    private String username;

    @NotBlank
    @ApiModelProperty(value = "用户昵称")
    private String nickName;


    @ApiModelProperty(value = "密码")
    private String password;


    @NotNull
    @ApiModelProperty(value = "是否启用")
    private Boolean enabled;

    @ApiModelProperty(value = "是否为admin账号", hidden = true)
    private Boolean isAdmin = false;
}
