using Marco.Pms.Model.Employees;
using Marco.Pms.Model.Master;
using Marco.Pms.Model.PaymentGetway;
using Marco.Pms.Model.Utilities;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
using System.ComponentModel.DataAnnotations.Schema;

namespace Marco.Pms.Model.TenantModels
{
    public class TenantSubscriptions : TenantRelation
    {
        public Guid Id { get; set; }
        public Guid PlanId { get; set; }

        [ForeignKey("PlanId")]
        [ValidateNever]
        public SubscriptionPlanDetails? Plan { get; set; }
        public DateTime StartDate { get; set; }
        public DateTime EndDate { get; set; }
        public bool IsTrial { get; set; }
        public double MaxUsers { get; set; }
        public Guid StatusId { get; set; }

        [ForeignKey("StatusId")]
        [ValidateNever]
        public SubscriptionStatus? Status { get; set; }
        public Guid CurrencyId { get; set; }

        [ForeignKey("CurrencyId")]
        [ValidateNever]
        public CurrencyMaster? Currency { get; set; }
        public DateTime NextBillingDate { get; set; }
        public DateTime? CancellationDate { get; set; }
        public bool AutoRenew { get; set; } = true;
        public bool IsCancelled { get; set; } = false;
        public Guid? PaymentDetailId { get; set; }

        [ForeignKey("PaymentDetailId")]
        [ValidateNever]
        public PaymentDetail? PaymentDetail { get; set; }
        public DateTime CreatedAt { get; set; }
        public DateTime? UpdateAt { get; set; }
        public Guid CreatedById { get; set; }

        [ForeignKey("CreatedById")]
        [ValidateNever]
        public Employee? CreatedBy { get; set; }
        public Guid? UpdatedById { get; set; }

        [ForeignKey("UpdatedById")]
        [ValidateNever]
        public Employee? UpdatedBy { get; set; }
    }
}
