ShippingDocumentToFiles fix;

This commit is contained in:
Loretta 2025-10-19 15:08:02 +02:00
parent aa8f9e21d2
commit e54612f923
2 changed files with 13 additions and 4 deletions

View File

@ -1,6 +1,6 @@
namespace FruitBank.Common;
public enum DocumentType : byte
public enum DocumentType : int
{
NotSet = 0,
Unknown = 5,

View File

@ -1,16 +1,25 @@
using FruitBank.Common.Interfaces;
using System.ComponentModel.DataAnnotations.Schema;
using FruitBank.Common.Interfaces;
using LinqToDB.Mapping;
using Mango.Nop.Core.Entities;
namespace FruitBank.Common.Entities;
[Table(Name = FruitBankConstClient.ShippingDocumentToFilesDbTableName)]
[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 DocumentType DocumentType { get; set; }
public int DocumentTypeId { get; set; }
[NotColumn, NotMapped]
public DocumentType DocumentType
{
get => (DocumentType)DocumentTypeId;
set => DocumentTypeId = (int)value;
}
[Association(ThisKey = nameof(FilesId), OtherKey = nameof(Files.Id), CanBeNull = true)]