package com.xunhong.erp.turbo.user.infrastructure.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.xunhong.erp.turbo.api.user.dto.enums.SocialTypeEnum;
import com.xunhong.erp.turbo.datasource.domain.entity.BaseDO;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author shenyifei
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "user_auth")
public class UserAuthDO extends BaseDO<UserAuthDO> {

	/**
	 * 用户认证id
	 */
	@TableId(value = "user_auth_id", type = IdType.ASSIGN_ID)
	private Long userAuthId;

	/**
	 * 用户id
	 */
	@TableField(value = "user_id", updateStrategy = FieldStrategy.NEVER)
	private Long userId;

	/**
	 * 账户
	 */
	@TableField(value = "username")
	private String username;

	/**
	 * 密码
	 */
	@TableField(value = "password")
	private String password;

	/**
	 * 认证类型
	 */
	@TableField(value = "social_type")
	private SocialTypeEnum socialType;

	/**
	 * 状态 1.启用 2.禁用
	 */
	@TableField(value = "state")
	private Integer state;

	@TableField(exist = false)
	private UserDO userDO;
}
