35 lines
1.2 KiB
C#
35 lines
1.2 KiB
C#
using System.ComponentModel.DataAnnotations.Schema;
|
|
using FruitBank.Common.Interfaces;
|
|
using LinqToDB.Mapping;
|
|
using Mango.Nop.Core.Entities;
|
|
using Newtonsoft.Json;
|
|
|
|
namespace FruitBank.Common.Entities;
|
|
|
|
[LinqToDB.Mapping.Table(Name = FruitBankConstClient.ShippingDocumentToFilesDbTableName)]
|
|
[System.ComponentModel.DataAnnotations.Schema.Table(FruitBankConstClient.ShippingDocumentToFilesDbTableName)]
|
|
public class ShippingDocumentToFiles : MgEntityBase, IShippingDocumentToFiles
|
|
{
|
|
public int FilesId { get; set; }
|
|
public int ShippingDocumentId { get; set; }
|
|
|
|
public int DocumentTypeId { get; set; }
|
|
|
|
[NotColumn, NotMapped, JsonIgnore, System.Text.Json.Serialization.JsonIgnore]
|
|
public DocumentType DocumentType
|
|
{
|
|
get => (DocumentType)DocumentTypeId;
|
|
set => DocumentTypeId = (int)value;
|
|
}
|
|
|
|
|
|
[Association(ThisKey = nameof(FilesId), OtherKey = nameof(Files.Id), CanBeNull = true)]
|
|
public Files? ShippingDocumentFile { get; set; }
|
|
|
|
[Association(ThisKey = nameof(ShippingDocumentId), OtherKey = nameof(ShippingDocument.Id), CanBeNull = true)]
|
|
public ShippingDocument? ShippingDocument { get; set; }
|
|
|
|
|
|
[SkipValuesOnUpdate] public DateTime Created { get; set; }
|
|
public DateTime Modified { get; set; }
|
|
} |