BotSharp/src/Infrastructure/BotSharp.Core/Accounts/UserAuth.cs

37 lines
875 B
C#
Raw Normal View History

2018-08-02 21:14:46 +00:00
using EntityFrameworkCore.BootKit;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;
namespace BotSharp.Core.Accounts
{
/// <summary>
/// User authentication
/// </summary>
[Table("UserAuth")]
public class UserAuth : DbRecord, IDbRecord
{
[StringLength(36)]
2019-03-07 15:25:30 +00:00
public string UserId { get; set; }
2018-08-02 21:14:46 +00:00
[Required]
[StringLength(256)]
[DataType(DataType.Password)]
2019-03-07 15:25:30 +00:00
public string Password { get; set; }
2018-08-02 21:14:46 +00:00
[Required]
[StringLength(64)]
2019-03-07 15:25:30 +00:00
public string Salt { get; set; }
2018-08-02 21:14:46 +00:00
[StringLength(32)]
2019-03-07 15:25:30 +00:00
public string ActivationCode { get; set; }
2018-08-02 21:14:46 +00:00
2019-03-07 15:25:30 +00:00
public bool IsActivated { get; set; }
2018-08-02 21:14:46 +00:00
[ForeignKey("UserId")]
public User User { get; set; }
}
}