This commit is contained in:
mmrbnjd
2024-07-08 22:51:59 +03:30
parent 488f2257f7
commit 414e52f19d
5 changed files with 24 additions and 14 deletions

View File

@@ -1,5 +1,6 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json.Serialization;
using Back.Common;
using Shared.DTOs;
namespace Back.Data.Models
@@ -72,7 +73,7 @@ namespace Back.Data.Models
//اریخ کوتاژ اظهارنامه گمرکی
// Unix Time => from fild CottageDateOfCustomsDeclaration
[MaxLength(5)]
public long? cdcd { get { return new DateTimeOffset(CottageDateOfCustomsDeclaration.Trim().ToMiladi()).ToUnixTimeMilliseconds(); } }
public long? cdcd { get { return string.IsNullOrEmpty(CottageDateOfCustomsDeclaration) ? null : new DateTimeOffset(CottageDateOfCustomsDeclaration.Trim().ToMiladi()).ToUnixTimeMilliseconds(); } }
//کد پستی خریدار
[MaxLength(10)]
public string? bpc { get { return Customer.ZipCode; } }
@@ -175,6 +176,7 @@ namespace Back.Data.Models
[ForeignKey("PatternID")]
public virtual Pattern? pattern { get; set; }
[ForeignKey("CompanyID")]
[JsonIgnore]
public virtual Company? company { get; set; }
#endregion
}