23 lines
593 B
C#
23 lines
593 B
C#
using System;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace nuget_host.Models.ApiKeys
|
|
{
|
|
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; }
|
|
}
|
|
} |