using AyCode.Interfaces.Users;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;

namespace AyCode.Entities.Users;

[Table("UserToken")]
public abstract class AcUserTokenBase : IAcUserTokenBase
{
    [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
    public int Id { get; set; }

    [Required] public Guid UserId { get; set; }
    [Required] public bool IsActive { get; set; }

    [Required, MaxLength(32)]
    public string Token { get; set; }
    public DateTime? TokenSent { get; set; }
    public DateTime? TokenExpiration { get; set; }

    public DateTime Created { get; set; }
    public DateTime Modified { get; set; }
}