package com.app.dto.platform;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * 账户dto
 *
 */
@ApiModel("账户dto")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class AccountDto {
    @ApiModelProperty("标识")
    private String id;

    @ApiModelProperty("用户名")
    private String identifier;

    @ApiModelProperty("密码")
    private String credential;

    @ApiModelProperty("昵称")
    private String nickname;

    @ApiModelProperty("部门")
    private String deptId;

    @ApiModelProperty("性别")
    private Integer gender = 0;

    @ApiModelProperty("是否锁定")
    private Boolean isLocked;

    @ApiModelProperty("岗位ids")
    private List<String> jobIds;

    @ApiModelProperty("角色ids")
    private List<String> roleIds;

    @ApiModelProperty("过期时间")
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date endDateTime;

    @ApiModelProperty("账号类型")
    private Integer type;
}
