2021-05-02 16:37:03 +01:00
|
|
|
using System;
|
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
|
|
2021-07-05 12:55:52 +01:00
|
|
|
namespace isn.Data.ApiKeys
|
2021-05-02 16:37:03 +01:00
|
|
|
{
|
|
|
|
|
public class ApiKey
|
|
|
|
|
{
|
|
|
|
|
[Required][Key][DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
|
|
|
public string Id { get; set; }
|
|
|
|
|
|
|
|
|
|
[Required][ForeignKey("User")]
|
|
|
|
|
public string UserId { get; set; }
|
|
|
|
|
|
|
|
|
|
public virtual ApplicationUser User { get; set; }
|
|
|
|
|
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
|
|
|
|
|
public int ValidityPeriodInDays{ get; set; }
|
|
|
|
|
|
|
|
|
|
public DateTime CreationDate { get; set; }
|
|
|
|
|
}
|
|
|
|
|
}
|