90 lines
3.1 KiB
C#
90 lines
3.1 KiB
C#
using Marco.Pms.Model.Collection;
|
|
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.PurchaseInvoice
|
|
{
|
|
/// <summary>
|
|
/// Represents a payment made against a purchase invoice.
|
|
/// It is a subclass of TenantRelation, indicating that it is a relation between a tenant and the Marco PMS system.
|
|
/// </summary>
|
|
public class PurchaseInvoicePayment : TenantRelation
|
|
{
|
|
/// <summary>
|
|
/// Gets or sets the unique identifier of the payment.
|
|
/// </summary>
|
|
public Guid Id { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the unique identifier of the associated purchase invoice.
|
|
/// </summary>
|
|
public Guid InvoiceId { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the associated purchase invoice.
|
|
/// This is a navigation property that allows access to the associated PurchaseInvoiceDetails object.
|
|
/// </summary>
|
|
[ValidateNever]
|
|
[ForeignKey("InvoiceId")]
|
|
public PurchaseInvoiceDetails? Invoice { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the date the payment was received.
|
|
/// </summary>
|
|
public DateTime PaymentReceivedDate { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the transaction ID of the payment.
|
|
/// </summary>
|
|
public string TransactionId { get; set; } = default!;
|
|
|
|
/// <summary>
|
|
/// Gets or sets the amount of the payment.
|
|
/// </summary>
|
|
public double Amount { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets a comment about the payment.
|
|
/// </summary>
|
|
public string Comment { get; set; } = default!;
|
|
|
|
/// <summary>
|
|
/// Gets or sets a value indicating whether the payment is active.
|
|
/// </summary>
|
|
public bool IsActive { get; set; } = true;
|
|
|
|
/// <summary>
|
|
/// Gets or sets the unique identifier of the payment adjustment head.
|
|
/// </summary>
|
|
public Guid PaymentAdjustmentHeadId { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the associated payment adjustment head.
|
|
/// This is a navigation property that allows access to the associated PaymentAdjustmentHead object.
|
|
/// </summary>
|
|
[ValidateNever]
|
|
[ForeignKey("PaymentAdjustmentHeadId")]
|
|
public PaymentAdjustmentHead? PaymentAdjustmentHead { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the date and time the record was created.
|
|
/// </summary>
|
|
public DateTime CreatedAt { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the unique identifier of the user who created the record.
|
|
/// </summary>
|
|
public Guid CreatedById { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the user who created the record.
|
|
/// This is a navigation property that allows access to the associated Employee object.
|
|
/// </summary>
|
|
[ValidateNever]
|
|
[ForeignKey("CreatedById")]
|
|
public Employee? CreatedBy { get; set; }
|
|
}
|
|
}
|