package com.nbport.zgwl.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;

@Data
@TableName(value = "sys_user")
@EqualsAndHashCode(callSuper = true)
public class SysUserEntity extends BaseEntity<SysUserEntity> {

    @Serial
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.INPUT)
    private Long id;

    @TableField("username")
    private String username;

    @TableField("mobile_phone")
    private String mobilePhone;

    @TableField("email")
    private String email;

    /**
     * 当前登录人的所属组织
     *
     * 这里不映射数据库字段，只用于业务代码里取组织信息。
     */
    @TableField(exist = false)
    private SysOrgEntity sysOrgEntity;
}
