This commit is contained in:
2021-03-27 15:17:45 +00:00
parent e33460d25f
commit c40c4f01a4
11 changed files with 102 additions and 9 deletions

View File

@@ -86,6 +86,7 @@ namespace AyaNova.Models
public virtual DbSet<WorkOrderItemTask> WorkOrderItemTask { get; set; }
public virtual DbSet<WorkOrderItemTravel> WorkOrderItemTravel { get; set; }
public virtual DbSet<WorkOrderItemUnit> WorkOrderItemUnit { get; set; }
public virtual DbSet<WorkOrderItemOutsideService> WorkOrderItemOutsideService { get; set; }
public virtual DbSet<WorkOrderStatus> WorkOrderStatus { get; set; }
//WorkOrderTemplate

View File

@@ -1,4 +1,3 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;

View File

@@ -0,0 +1,60 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
using AyaNova.Biz;
namespace AyaNova.Models
{
public class WorkOrderItemOutsideService : ICoreBizObjectModel
{
public long Id { get; set; }
public uint Concurrency { get; set; }
public string Notes { get; set; }
public long? UnitId { get; set; }
public long? VendorSentToId { get; set; }
public long? VendorSentViaId { get; set; }
public string RMANumber { get; set; }
public string TrackingNumber { get; set; }
public decimal RepairCost { get; set; }
public decimal ShippingCost { get; set; }
public decimal ShippingPrice { get; set; }
public DateTime? SentDate { get; set; }
public DateTime? ETADate { get; set; }
public DateTime? ReturnDate { get; set; }
[Required]
public long WorkOrderItemId { get; set; }
[JsonIgnore]
public WorkOrderItem WorkOrderItem { get; set; }
[NotMapped, JsonIgnore]
public AyaType AyaType { get => AyaType.WorkOrderItemOutsideService; }
}//eoc
}//eons
/*
CREATE TABLE [dbo].[AWORKORDERITEMOUTSIDESERVICE](
[AID] [uniqueidentifier] NOT NULL,
[AWORKORDERITEMID] [uniqueidentifier] NOT NULL,
[ACREATOR] [uniqueidentifier] NOT NULL,
[AMODIFIER] [uniqueidentifier] NOT NULL,
[ACREATED] [datetime] NOT NULL,
[AMODIFIED] [datetime] NOT NULL,
[ANOTES] [ntext] NULL,
[AVENDORSENTTOID] [uniqueidentifier] NULL,
[AVENDORSENTVIAID] [uniqueidentifier] NULL,
[ARMANUMBER] [nvarchar](255) NULL,
[ATRACKINGNUMBER] [nvarchar](255) NULL,
[AREPAIRCOST] [decimal](19, 5) NULL,
[AREPAIRPRICE] [decimal](19, 5) NULL,
[ASHIPPINGCOST] [decimal](19, 5) NULL,
[ASHIPPINGPRICE] [decimal](19, 5) NULL,
[ADATESENT] [datetime] NULL,
[ASENDERUSERID] [uniqueidentifier] NULL,
[ADATEETA] [datetime] NULL,
[ADATERETURNED] [datetime] NUL
*/

View File

@@ -8,12 +8,18 @@ namespace AyaNova.Models
{
public class WorkOrderItemUnit : ICoreBizObjectModel
{
public long Id { get; set; }
public uint Concurrency { get; set; }
public string Notes { get; set; }
//after much to and fro just code this as planned but definitely consider custom fields adn tags for this and possibly all other grandchildren as well?
public string Wiki { get; set; }
public string CustomFields { get; set; }
public List<string> Tags { get; set; } = new List<string>();
[Required]
public long UnitId { get; set; }
[Required]
public long WorkOrderItemId { get; set; }
[JsonIgnore]
@@ -41,7 +47,7 @@ CREATE TABLE [dbo].[AWORKORDERITEM](
[ASUMMARY] [nvarchar](255) NULL,
[ATYPEID] [uniqueidentifier] NULL,
[AUNITID] [uniqueidentifier] NULL,//<--------UNIT
[AWORKORDERITEMUNITSERVICETYPEID] [uniqueidentifier] NULL,//<--------UNIT
[AWORKORDERITEMUNITSERVICETYPEID] [uniqueidentifier] NULL,//<--------UNIT//NOW TAGS HMMM
[AWARRANTYSERVICE] [bit] NOT NULL,
[ACUSTOM1] [ntext] NULL,
[ACUSTOM2] [ntext] NULL,