using System.ComponentModel.DataAnnotations.Schema;

namespace Kynareth.Models;

public class ApiToken
{
	[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
	public Guid Id { get; set; }
	public ulong ClientId { get; set; }
	public string Token { get; set; }
	public string OwnerEmail { get; set; }
	public string Description { get; set; }
	public bool IsValid { get; set; }

	public long TotalAPICalls => ApiCalls.LongCount();

	public virtual ICollection<ApiCall> ApiCalls { get; set; }
}