Files
2023-09-06 09:10:34 +02:00

108 lines
2.9 KiB
C#

using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
#nullable disable
namespace SHERPA.BBM.CORE.DbModels
{
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
public partial class vOrderDataModel
{
[Key, Column("OrdId", Order = 0)]
public int OrdId { get; set; }
[Column("BasketId")]
public int BasketId { get; set; } = 0;
[Column("CodBasket"), MaxLength(50)]
public string CodBasket { get; set; } = "EGW.B.0000.0000";
[Column("BaskDescript")]
public string BaskDescript { get; set; } = "";
[Column("CustomerId")]
public int CustomerId { get; set; } = 0;
[Column("RagSoc")]
public string RagSoc { get; set; } = "";
[Column("NegotiationId")]
public int NegotiationId { get; set; } = 0;
[Column("CodNegotiation"), MaxLength(50)]
public string CodNegotiation { get; set; } = "EGW.N.0000.0000.00";
[Column("NegotDescript"), MaxLength(500)]
public string NegotDescript { get; set; } = "";
[Column("CodDoc"), MaxLength(50)]
public string CodDoc { get; set; } = "EGW.O.0000.0000.00";
[Column("YearRef")]
public int YearRef { get; set; } = DateTime.Today.Year;
/// <summary>
/// temporaneo per replica dati... fixme eliminare
/// </summary>
[Column("DocId")]
public int DocId { get; set; } = 0;
[Column("Num")]
public int Num { get; set; } = 0;
[Column("Descript"), MaxLength(250)]
public string Descript { get; set; } = "";
[Column("DateIns")]
public DateTime DateIns { get; set; } = DateTime.Now;
[Column("OrdStatus")]
public BbmOrdStatus OrdStatus { get; set; } = BbmOrdStatus.ND;
[Column("OrdType")]
public BbmOrdBType OrdType { get; set; } = BbmOrdBType.ND;
[Column("CodMType"), MaxLength(50)]
public string CodMType { get; set; } = "";
[Column("Note"), MaxLength(500)]
public string Note { get; set; } = "";
[Column("AmountTot"), Precision(18, 6)]
public decimal AmountTot { get; set; } = 0;
[Column("BillTot"), Precision(18, 6)]
public decimal BillTot { get; set; } = 0;
[Column("PaidTot"), Precision(18, 6)]
public decimal PaidTot { get; set; } = 0;
[Column("HasBill")]
public bool HasBill { get; set; } = false;
[Column("MovOpen")]
public bool MovOpen { get; set; } = false;
[NotMapped]
public decimal AmountReq
{
get => OrdStatus != BbmOrdStatus.Stornato ? AmountTot : 0;
}
[NotMapped]
public decimal AmountOpen
{
get => AmountReq - BillTot;
}
}
}