package com.example.demo.model;

import io.swagger.v3.oas.annotations.media.Schema;

/**
 * 用户实体。
 * <p>对应数据库 user 表，存储系统用户基本信息。</p>
 */
@Schema(description = "用户实体")
public class User {

    @Schema(description = "用户ID", example = "1")
    private Long userId;

    @Schema(description = "用户名", example = "admin")
    private String username;

    @Schema(description = "密码（加密存储）", example = "encrypted_password")
    private String password;

    @Schema(description = "真实姓名", example = "张三")
    private String realName;

    @Schema(description = "邮箱", example = "zhangsan@example.com")
    private String email;

    @Schema(description = "手机号", example = "13800138000")
    private String phone;

    @Schema(description = "部门ID", example = "1")
    private Long deptId;

    @Schema(description = "状态：0-停用，1-启用", example = "1")
    private Integer status;

    @Schema(description = "创建时间", example = "2024-01-01 00:00:00")
    private String createTime;

    @Schema(description = "更新时间", example = "2024-01-01 00:00:00")
    private String updateTime;

    @Schema(description = "最后登录IP", example = "192.168.1.1")
    private String lastLoginIp;

    @Schema(description = "备注", example = "系统管理员")
    private String remark;

    public User() {}

    public User(Long userId, String username, String password, String realName,
                String email, String phone, Long deptId, Integer status,
                String createTime, String updateTime, String lastLoginIp, String remark) {
        this.userId = userId;
        this.username = username;
        this.password = password;
        this.realName = realName;
        this.email = email;
        this.phone = phone;
        this.deptId = deptId;
        this.status = status;
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.lastLoginIp = lastLoginIp;
        this.remark = remark;
    }

    public Long getUserId() { return userId; }
    public void setUserId(Long userId) { this.userId = userId; }
    public String getUsername() { return username; }
    public void setUsername(String username) { this.username = username; }
    public String getPassword() { return password; }
    public void setPassword(String password) { this.password = password; }
    public String getRealName() { return realName; }
    public void setRealName(String realName) { this.realName = realName; }
    public String getEmail() { return email; }
    public void setEmail(String email) { this.email = email; }
    public String getPhone() { return phone; }
    public void setPhone(String phone) { this.phone = phone; }
    public Long getDeptId() { return deptId; }
    public void setDeptId(Long deptId) { this.deptId = deptId; }
    public Integer getStatus() { return status; }
    public void setStatus(Integer status) { this.status = status; }
    public String getCreateTime() { return createTime; }
    public void setCreateTime(String createTime) { this.createTime = createTime; }
    public String getUpdateTime() { return updateTime; }
    public void setUpdateTime(String updateTime) { this.updateTime = updateTime; }
    public String getLastLoginIp() { return lastLoginIp; }
    public void setLastLoginIp(String lastLoginIp) { this.lastLoginIp = lastLoginIp; }
    public String getRemark() { return remark; }
    public void setRemark(String remark) { this.remark = remark; }
}
