using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AipGateway.API.Domain.Entities
{
    [Table("TB_LINKED_API_KEY")]
    public class TbLinkedApiKey
    {
        [Key]
        [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
        public required int Id { get; set; }
        public required int ServerId { get; set; }

        [StringLength(64)]
        public required string ApiKey { get; set; }
        public required bool policyLookupYn { get; set; }
        public required bool fileInfoLookupYn { get; set; }
        public required bool applyLabelYn { get; set; }
        public required bool releaseLabelYn { get; set; }
        public required bool encryptionFileYn { get; set; }
        public required bool decryptionFileYn { get; set; }
        public required DateTime ExpiredAt { get; set; }
        public required DateTime CreatedAt { get; set; }
        public required bool UseYn { get; set; }
        
        public DateTime? DeletedAt { get; set; }

        public override string ToString()
        {
            return "TbLinkedApiKey{ Id: " + Id + ", ServerId: " + ServerId + ", ApiKey: " + ApiKey + ", ExpiredAt: " + ExpiredAt + ", CreatedAt: " + CreatedAt + "}";
        }
    }
}
