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

namespace Marco.Pms.Model.Collection
{
    public class ReceivedInvoicePayment : TenantRelation
    {
        public Guid Id { get; set; }
        public Guid InvoiceId { get; set; }

        [ValidateNever]
        [ForeignKey("InvoiceId")]
        public Invoice? Invoice { get; set; }
        public DateTime PaymentReceivedDate { get; set; }
        public string TransactionId { get; set; } = default!;
        public double Amount { get; set; }
        public string Comment { get; set; } = default!;
        public bool IsActive { get; set; } = true;
        public Guid PaymentAdjustmentHeadId { get; set; }

        [ValidateNever]
        [ForeignKey("PaymentAdjustmentHeadId")]
        public PaymentAdjustmentHead? PaymentAdjustmentHead { get; set; }
        public DateTime CreatedAt { get; set; }
        public Guid CreatedById { get; set; }

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