95 lines
3.4 KiB
C#
95 lines
3.4 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 QuoteItem : ICoreBizObjectModel
|
|
{
|
|
[NotMapped, JsonIgnore]
|
|
public AyaType AyaType { get => AyaType.QuoteItem; }
|
|
|
|
|
|
public long Id { get; set; }
|
|
public uint Concurrency { get; set; }
|
|
public string Notes { get; set; }//"Summary" field
|
|
public string Wiki { get; set; }
|
|
public string CustomFields { get; set; }
|
|
public List<string> Tags { get; set; } = new List<string>();
|
|
|
|
[Required]
|
|
public long QuoteId { get; set; }
|
|
public string TechNotes { get; set; }
|
|
public long? WorkOrderItemStatusId { get; set; }
|
|
[NotMapped]
|
|
public string WorkOrderItemStatusNameViz { get; set; }
|
|
[NotMapped]
|
|
public string WorkOrderItemStatusColorViz { get; set; }
|
|
public long? WorkOrderItemPriorityId { get; set; }
|
|
[NotMapped]
|
|
public string WorkOrderItemPriorityNameViz { get; set; }
|
|
[NotMapped]
|
|
public string WorkOrderItemPriorityColorViz { get; set; }
|
|
|
|
public DateTime? RequestDate { get; set; }
|
|
public bool WarrantyService { get; set; } = false;
|
|
public int Sequence { get; set; }
|
|
|
|
//workaround for notification
|
|
[NotMapped, JsonIgnore]
|
|
public string Name { get; set; }
|
|
|
|
//Principle
|
|
[JsonIgnore]
|
|
public Quote Quote { get; set; }
|
|
//dependents
|
|
public List<QuoteItemExpense> Expenses { get; set; } = new List<QuoteItemExpense>();
|
|
public List<QuoteItemLabor> Labors { get; set; } = new List<QuoteItemLabor>();
|
|
public List<QuoteItemLoan> Loans { get; set; } = new List<QuoteItemLoan>();
|
|
public List<QuoteItemPart> Parts { get; set; } = new List<QuoteItemPart>();
|
|
public List<QuoteItemScheduledUser> ScheduledUsers { get; set; } = new List<QuoteItemScheduledUser>();
|
|
public List<QuoteItemTask> Tasks { get; set; } = new List<QuoteItemTask>();
|
|
public List<QuoteItemTravel> Travels { get; set; } = new List<QuoteItemTravel>();
|
|
public List<QuoteItemUnit> Units { get; set; } = new List<QuoteItemUnit>();
|
|
public List<QuoteItemOutsideService> OutsideServices { get; set; } = new List<QuoteItemOutsideService>();
|
|
|
|
}//eoc
|
|
|
|
}//eons
|
|
|
|
|
|
/*
|
|
|
|
CREATE TABLE [dbo].[AQuoteITEM](
|
|
[AID] [uniqueidentifier] NOT NULL,
|
|
[AQuoteID] [uniqueidentifier] NOT NULL,
|
|
[ACREATOR] [uniqueidentifier] NOT NULL,
|
|
[AMODIFIER] [uniqueidentifier] NOT NULL,
|
|
[ACREATED] [datetime] NOT NULL,
|
|
[AMODIFIED] [datetime] NOT NULL,
|
|
[ATECHNOTES] [ntext] NULL,
|
|
[AQuoteSTATUSID] [uniqueidentifier] NULL,
|
|
[APRIORITYID] [uniqueidentifier] NULL,
|
|
[AREQUESTDATE] [datetime] NULL,
|
|
[ASUMMARY] [nvarchar](255) NULL,//Now Notes
|
|
[ATYPEID] [uniqueidentifier] NULL,//Now a tag
|
|
[AUNITID] [uniqueidentifier] NULL,//MOVED TO WOITEMUNITS COLLECTION
|
|
[AQuoteITEMUNITSERVICETYPEID] [uniqueidentifier] NULL,//MOVE TO WOITEMUNITS COLLECTION?
|
|
[AWARRANTYSERVICE] [bit] NOT NULL,
|
|
[ACUSTOM1] [ntext] NULL,
|
|
[ACUSTOM2] [ntext] NULL,
|
|
[ACUSTOM3] [ntext] NULL,
|
|
[ACUSTOM4] [ntext] NULL,
|
|
[ACUSTOM5] [ntext] NULL,
|
|
[ACUSTOM6] [ntext] NULL,
|
|
[ACUSTOM7] [ntext] NULL,
|
|
[ACUSTOM8] [ntext] NULL,
|
|
[ACUSTOM9] [ntext] NULL,
|
|
[ACUSTOM0] [ntext] NULL
|
|
|
|
*/ |