/**
 * Copyright (c) 2020 fumeiai All rights reserved.
 *
 *
 *
 * 版权所有，侵权必究！
 */

package com.lz.modules.sys.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.lz.common.validator.group.AddGroup;
import com.lz.common.validator.group.UpdateGroup;
import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 系统用户
 *
 * @author Mark sunlightcs@gmail.com
 */
@Data
@TableName("sys_user")
public class SysUserEntityDto implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 用户ID
	 */
	@TableId
	private Long userId;

	/**
	 * 员工姓名
	 */
	@NotBlank(message="员工姓名不能为空", groups = {AddGroup.class, UpdateGroup.class})
	private String realName;

	/**
	 * 员工工号
	 */
	@NotBlank(message="工号不能为空", groups = AddGroup.class)
	private String userNo;

	/**
	 * 头像
	 */
	@TableField(exist = false)
	private String avatar;

	/**
	 * 用户名
	 */
	@NotBlank(message="账号不能为空", groups = {AddGroup.class, UpdateGroup.class})
	private String username;



	/**
	 * 手机号
	 */
	@NotBlank(message="手机号不能为空", groups = {AddGroup.class, UpdateGroup.class})
	private String mobile;


//	/**
//	 * 邮箱
//	 */
//	@NotBlank(message="邮箱不能为空", groups = {AddGroup.class, UpdateGroup.class})
	@Email(message="邮箱格式不正确", groups = {AddGroup.class, UpdateGroup.class})
	private String email;



	/**
	 * 状态  0：禁用   1：正常
	 */
	private Integer status;


	private int type ;// 0  表示系统用户，1 表示普通员工

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}
}
