76 lines
2.5 KiB
C#
76 lines
2.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using Newtonsoft.Json;
|
|
using AyaNova.Biz;
|
|
|
|
namespace AyaNova.Models
|
|
{
|
|
public class WorkOrderItemPartRequest : ICoreBizObjectModel
|
|
{
|
|
|
|
public long Id { get; set; }
|
|
public uint Concurrency { get; set; }
|
|
[Required]
|
|
public long WorkOrderItemId { get; set; }
|
|
[Required]
|
|
public long PartId { get; set; }
|
|
[Required]
|
|
public long PartWarehouseId { get; set; }
|
|
[Required]
|
|
public decimal Quantity { get; set; }
|
|
public long? PurchaseOrderItemId { get; set; }
|
|
public long? RequestedByUserId { get; set; }
|
|
[Required]
|
|
public decimal Received { get; set; }
|
|
|
|
|
|
public DateTime RequestDate { get; set; } = DateTime.UtcNow;
|
|
|
|
|
|
[NotMapped]
|
|
public string PartNameViz { get; set; }
|
|
[NotMapped]
|
|
public string PartDescriptionViz { get; set; }
|
|
[NotMapped]
|
|
public string UpcViz { get; set; }
|
|
[NotMapped]
|
|
public string RequestedByUserViz { get; set; }
|
|
[NotMapped]
|
|
public string PurchaseOrderViz { get; set; }
|
|
[NotMapped]
|
|
public long? PurchaseOrderIdViz { get; set; }
|
|
[NotMapped]
|
|
public DateTime? PurchaseOrderDateViz { get; set; }
|
|
[NotMapped]
|
|
public DateTime? PurchaseOrderExpectedDateViz { get; set; }
|
|
[NotMapped]
|
|
public string PartWarehouseViz { get; set; }
|
|
[JsonIgnore]
|
|
public WorkOrderItem WorkOrderItem { get; set; }
|
|
[NotMapped, JsonIgnore]
|
|
public AyaType AyaType { get => AyaType.WorkOrderItemPartRequest; }
|
|
//workaround for notification
|
|
[NotMapped, JsonIgnore]
|
|
public List<string> Tags { get; set; } = new List<string>();
|
|
[NotMapped, JsonIgnore]
|
|
public string Name { get; set; }
|
|
|
|
}//eoc
|
|
}//eons
|
|
|
|
/*
|
|
CREATE TABLE [dbo].[AWORKORDERITEMPARTREQUEST](
|
|
[AID] [uniqueidentifier] NOT NULL,
|
|
[AWORKORDERITEMID] [uniqueidentifier] NOT NULL,
|
|
[ACREATOR] [uniqueidentifier] NOT NULL,
|
|
[AMODIFIER] [uniqueidentifier] NOT NULL,
|
|
[ACREATED] [datetime] NOT NULL,
|
|
[AMODIFIED] [datetime] NOT NULL,
|
|
[APARTID] [uniqueidentifier] NOT NULL,
|
|
[APARTWAREHOUSEID] [uniqueidentifier] NOT NULL,
|
|
[AQUANTITY] [decimal](19, 5) NOT NULL,
|
|
[APURCHASEORDERITEMID] [uniqueidentifier] NULL,
|
|
[ARECEIVED] [decimal](19, 5)
|
|
*/ |