using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Abp.Domain.Entities;
namespace IwbZero.Authorization.Base.Users
{
///
/// 用于存储外部登录服务的用户登录名。
///
[Table("Sys_UserLogins")]
public class UserLogin : Entity, IMayHaveTenant
{
///
/// Maximum length of property.
///
public const int MaxLoginProviderLength = 128;
///
/// Maximum length of property.
///
public const int MaxProviderKeyLength = 256;
public virtual int? TenantId { get; set; }
///
/// Id of the User.
///
public virtual long UserId { get; set; }
///
/// Login Provider.
///
[Required]
[StringLength(MaxLoginProviderLength)]
public virtual string LoginProvider { get; set; }
///
/// Key in the .
///
[Required]
[StringLength(MaxProviderKeyLength)]
public virtual string ProviderKey { get; set; }
public UserLogin()
{
}
public UserLogin(int? tenantId, long userId, string loginProvider, string providerKey)
{
TenantId = tenantId;
UserId = userId;
LoginProvider = loginProvider;
ProviderKey = providerKey;
}
}
}