This commit is contained in:
2021-03-25 18:26:49 +00:00
parent 58d2772593
commit 53c3aa192d

View File

@@ -1,3 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
@@ -6,8 +7,6 @@ using AyaNova.Biz;
namespace AyaNova.Models
{
/*
@@ -29,23 +28,47 @@ namespace AyaNova.Models
[Required]
public long Serial { get; set; }
public bool Active { get; set; }
public string Notes { get; set; }
public string Notes { get; set; }//WAS "SUMMARY"
public string Wiki { get; set; }
public string CustomFields { get; set; }
public List<string> Tags { get; set; } = new List<string>();
// [Required]
// public long CustomerId {get;set;}
[Required]
public long CustomerId { get; set; }
public long ProjectId { get; set; }
public string InternalReferenceNumber { get; set; }
public string CustomerReferenceNumber { get; set; }
public string CustomerContactName { get; set; }
public long FromQuoteId { get; set; }
public long FromPMId { get; set; }
public long FromCSRId { get; set; }
public DateTime ServiceDate { get; set; }
public DateTime CompleteByDate { get; set; }
public string InvoiceNumber { get; set; }
public string CustomerSignature { get; set; }
public string CustomerSignatureName { get; set; }
public DateTime CustomerSignatureCaptured { get; set; }
//"SERVICE ADDRESS"
//POSTAL ADDRESS
public string PostAddress { get; set; }
public string PostCity { get; set; }
public string PostRegion { get; set; }
public string PostCountry { get; set; }
public string PostCode { get; set; }
//PHYSICAL ADDRESS
public string Address { get; set; }
public string City { get; set; }
public string Region { get; set; }
public string Country { get; set; }
public decimal? Latitude { get; set; }
public decimal? Longitude { get; set; }
public List<WorkOrderItem> Items { get; set; } = new List<WorkOrderItem>();
public List<WorkOrderState> States { get; set; } = new List<WorkOrderState>();
[NotMapped, JsonIgnore]
public AyaType AyaType { get => AyaType.WorkOrder; }
}//eoc
@@ -69,14 +92,14 @@ CREATE TABLE [dbo].[AWORKORDER](
[AREGIONID] [uniqueidentifier] NULL,
[AWORKORDERTYPE] [smallint] NULL,
[AFORMLAYOUTID] [uniqueidentifier] NULL,//### DROP NOT PORTED
[ASUMMARY] [nvarchar](255) NULL,
[AWORKORDERCATEGORYID] [uniqueidentifier] NULL,
[ACLOSED] [bit] NOT NULL,
[ASERVICECOMPLETED] [bit] NOT NULL,
[ASUMMARY] [nvarchar](255) NULL, //### NOW NOTES
[AWORKORDERCATEGORYID] [uniqueidentifier] NULL,//## DROP NOW TAGS
[ACLOSED] [bit] NOT NULL,//## DROP now this is via status flagged completed
[ASERVICECOMPLETED] [bit] NOT NULL,//## DROP now this is via status with LOCKED flagged
[AFROMQUOTEID] [uniqueidentifier] NULL,
[AFROMPMID] [uniqueidentifier] NULL,
[ATEMPLATEDESCRIPTION] [nvarchar](255) NULL,
[ATEMPLATEFRESHPRICE] [bit] NOT NULL,//?? DO NOT PORT??
[ATEMPLATEDESCRIPTION] [nvarchar](255) NULL,//### FOR TEMPLATE ONLY? SEPARATE OBJECT NOT NEEDED HERE
[ATEMPLATEFRESHPRICE] [bit] NOT NULL,//### FOR TEMPLATE ONLY? SEPARATE OBJECT NOT NEEDED HERE
@@ -87,16 +110,16 @@ CREATE TABLE [dbo].[AWORKORDER](
[AMODIFIER] [uniqueidentifier] NOT NULL,
[ACREATED] [datetime] NOT NULL,
[AMODIFIED] [datetime] NOT NULL,
[AWORKORDERSTATUSID] [uniqueidentifier] NULL,
[AWORKORDERSTATUSID] [uniqueidentifier] NULL,//## Replaced by workorderstate collection
[ASERVICEDATE] [datetime] NULL,
[AINVOICENUMBER] [nvarchar](255) NULL,
[ASERVICENUMBER] [int] IDENTITY(1,1) NOT NULL,
[ASERVICENUMBER] [int] IDENTITY(1,1) NOT NULL,//## replaced by Serial field
[AQUOTEWORKORDERID] [uniqueidentifier] NULL,
[ACLIENTREQUESTID] [uniqueidentifier] NULL,
[ACLIENTREQUESTID] [uniqueidentifier] NULL,//# now FromCSRId
[APREVENTIVEMAINTENANCEID] [uniqueidentifier] NULL,
[ACLOSEBYDATE] [datetime] NULL,
[ASIGNATURE] [ntext] NULL,
[ASIGNED] [datetime] NULL,
[ACLOSEBYDATE] [datetime] NULL,//## Now CompleteByDate
[ASIGNATURE] [ntext] NULL,//# now customersignature (more sig types coming)
[ASIGNED] [datetime] NULL,//# now CustomerSignatureCaptured
*/
@@ -115,26 +138,3 @@ CREATE TABLE [dbo].[AWORKORDER](
// }
// //Data transfer no child collections
// public class dtWorkOrder : ICoreBizObjectModel
// {
// public dtWorkOrder()
// {
// Tags = new List<string>();
// }
// public long Id { get; set; }
// public uint Concurrency { get; set; }
// [Required]
// public long Serial { get; set; }
// public bool Active { get; set; }
// public string Notes { get; set; }
// public string Wiki { get; set; }
// public string CustomFields { get; set; }
// public List<string> Tags { get; set; }
// [NotMapped, JsonIgnore]
// public AyaType AyaType { get => AyaType.WorkOrder; }
// }//eoc