This commit is contained in:
2020-07-17 00:38:08 +00:00
parent 338f61628e
commit c249fd5400
34 changed files with 294 additions and 165 deletions

View File

@@ -1,5 +1,7 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using AyaNova.Biz;
using Newtonsoft.Json;
namespace AyaNova.Models
@@ -13,19 +15,22 @@ namespace AyaNova.Models
public uint Concurrency { get; set; }
[Required]
public string Name { get; set; }
public bool Active { get; set; }
public string Notes { get; set; }
public string Wiki {get;set;}
public string Name { 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; }
public Contract()
{
Tags = new List<string>();
}
[NotMapped]
public AyaType AyaType { get => AyaType.Contract; }
}//eoc
}//eons

View File

@@ -2,32 +2,36 @@ using System;
using System.Collections.Generic;
using AyaNova.Biz;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
namespace AyaNova.Models
{
//NOTE: Any non required field (nullable in DB) sb nullable here, i.e. decimal? not decimal,
//otherwise the server will call it an invalid record if the field isn't sent from client
public class Customer : ICoreBizObjectModel
{
public long Id { get; set; }
public uint Concurrency { get; set; }
[Required]
public string Name { get; set; }
public bool Active { get; set; }
public string Notes { get; set; }
public string Wiki {get;set;}
public string Name { 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; }
public Customer()
{
Tags = new List<string>();
}
[NotMapped]
public AyaType AyaType { get => AyaType.Customer; }
}//eoc
}//eons

View File

@@ -2,32 +2,36 @@ using System;
using System.Collections.Generic;
using AyaNova.Biz;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
namespace AyaNova.Models
{
//NOTE: Any non required field (nullable in DB) sb nullable here, i.e. decimal? not decimal,
//otherwise the server will call it an invalid record if the field isn't sent from client
public class HeadOffice : ICoreBizObjectModel
{
public long Id { get; set; }
public uint Concurrency { get; set; }
[Required]
public string Name { get; set; }
public bool Active { get; set; }
public string Notes { get; set; }
public string Wiki {get;set;}
public string Name { 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; }
public HeadOffice()
{
Tags = new List<string>();
}
[NotMapped]
public AyaType AyaType { get => AyaType.HeadOffice; }
}//eoc
}//eons

View File

@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
namespace AyaNova.Models
{
/// <summary>
@@ -12,11 +13,13 @@ namespace AyaNova.Models
//didn't want to end up with a zillion interfaces for all manner of stuff
public long Id { get; set; }
public uint Concurrency { get; set; }
public string Name { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); }
public bool? Active { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); }
public string Name { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); }
public bool? Active { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); }
public string Wiki { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); }
public string CustomFields { get; set; }
public List<string> Tags { get; set; }
[NotMapped]
public AyaNova.Biz.AyaType AyaType { get;}
}

View File

@@ -2,32 +2,36 @@ using System;
using System.Collections.Generic;
using AyaNova.Biz;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
namespace AyaNova.Models
{
//NOTE: Any non required field (nullable in DB) sb nullable here, i.e. decimal? not decimal,
//otherwise the server will call it an invalid record if the field isn't sent from client
public class LoanUnit : ICoreBizObjectModel
{
public long Id { get; set; }
public uint Concurrency { get; set; }
[Required]
public string Name { get; set; }
public bool Active { get; set; }
public string Notes { get; set; }
public string Wiki {get;set;}
public string Name { 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; }
public LoanUnit()
{
Tags = new List<string>();
}
[NotMapped]
public AyaType AyaType { get => AyaType.LoanUnit; }
}//eoc
}//eons

View File

@@ -2,6 +2,7 @@ using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
using AyaNova.Biz;
namespace AyaNova.Models
@@ -32,13 +33,8 @@ namespace AyaNova.Models
PMItems = new List<PMItem>();
}
//Not persisted business properties
//NOTE: this could be a common class applied to everything for common biz rule stuff
//i.e. specific rights in situations based on rules, like candelete, canedit etc
[NotMapped]
public bool NonDataBaseExampleColumn { get; set; }//example of how to add a property that is not persisted but is used by both ends dynamically, should come up with a naming scheme so can see them at a glance
public AyaType AyaType { get => AyaType.PM; }
}//eoc

View File

@@ -2,25 +2,26 @@ using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
using AyaNova.Biz;
namespace AyaNova.Models
{
//NOTE: Any non required field (nullable in DB) sb nullable here, i.e. decimal? not decimal,
//otherwise the server will call it an invalid record if the field isn't sent from client
public class PMItem : ICoreBizObjectModel
{
public long Id { get; set; }
public uint Concurrency { get; set; }
[Required]
public string Name { get; set; }
public bool Active { get; set; }
public string Notes { get; set; }
public string Wiki {get;set;}
public string Name { 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; }
//Principle
[Required]//this required annotation should cause a cascade delete to happen automatically when wo is deleted, need to test that
public long PMId { get; set; }//fk
@@ -33,12 +34,8 @@ namespace AyaNova.Models
Tags = new List<string>();
}
//Not persisted business properties
//NOTE: this could be a common class applied to everything for common biz rule stuff
//i.e. specific rights in situations based on rules, like candelete, canedit etc
[NotMapped]
public bool NonDataBaseExampleColumn { get; set; }//example of how to add a property that is not persisted but is used by both ends dynamically, should come up with a naming scheme so can see them at a glance
public AyaType AyaType { get => AyaType.PMItem; }
}//eoc

View File

@@ -2,32 +2,36 @@ using System;
using System.Collections.Generic;
using AyaNova.Biz;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
namespace AyaNova.Models
{
//NOTE: Any non required field (nullable in DB) sb nullable here, i.e. decimal? not decimal,
//otherwise the server will call it an invalid record if the field isn't sent from client
public class PMTemplate : ICoreBizObjectModel
{
public long Id { get; set; }
public uint Concurrency { get; set; }
[Required]
public string Name { get; set; }
public bool Active { get; set; }
public string Notes { get; set; }
public string Wiki {get;set;}
public string Name { 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; }
public PMTemplate()
{
Tags = new List<string>();
}
[NotMapped]
public AyaType AyaType { get => AyaType.PMTemplate; }
}//eoc
}//eons

View File

@@ -2,32 +2,36 @@ using System;
using System.Collections.Generic;
using AyaNova.Biz;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
namespace AyaNova.Models
{
//NOTE: Any non required field (nullable in DB) sb nullable here, i.e. decimal? not decimal,
//otherwise the server will call it an invalid record if the field isn't sent from client
public class PMTemplateItem : ICoreBizObjectModel
{
public long Id { get; set; }
public uint Concurrency { get; set; }
[Required]
public string Name { get; set; }
public bool Active { get; set; }
public string Notes { get; set; }
public string Wiki {get;set;}
public string Name { 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; }
public PMTemplateItem()
{
Tags = new List<string>();
}
[NotMapped]
public AyaType AyaType { get => AyaType.PMTemplateItem; }
}//eoc
}//eons

View File

@@ -2,32 +2,36 @@ using System;
using System.Collections.Generic;
using AyaNova.Biz;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
namespace AyaNova.Models
{
//NOTE: Any non required field (nullable in DB) sb nullable here, i.e. decimal? not decimal,
//otherwise the server will call it an invalid record if the field isn't sent from client
public class Part : ICoreBizObjectModel
{
public long Id { get; set; }
public uint Concurrency { get; set; }
[Required]
public string Name { get; set; }
public bool Active { get; set; }
public string Notes { get; set; }
public string Wiki {get;set;}
public string Name { 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; }
public Part()
{
Tags = new List<string>();
}
[NotMapped]
public AyaType AyaType { get => AyaType.Part; }
}//eoc
}//eons

View File

@@ -1,33 +1,36 @@
using System;
using System.Collections.Generic;
using AyaNova.Biz;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
using AyaNova.Biz;
namespace AyaNova.Models
{
//NOTE: Any non required field (nullable in DB) sb nullable here, i.e. decimal? not decimal,
//otherwise the server will call it an invalid record if the field isn't sent from client
public class Project : ICoreBizObjectModel
{
public long Id { get; set; }
public uint Concurrency { get; set; }
[Required]
public string Name { get; set; }
public bool Active { get; set; }
public string Notes { get; set; }
public string Wiki {get;set;}
public string Name { 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; }
public Project()
{
Tags = new List<string>();
}
[NotMapped]
public AyaType AyaType { get => AyaType.Project; }
}//eoc
}//eons

View File

@@ -2,32 +2,36 @@ using System;
using System.Collections.Generic;
using AyaNova.Biz;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
namespace AyaNova.Models
{
//NOTE: Any non required field (nullable in DB) sb nullable here, i.e. decimal? not decimal,
//otherwise the server will call it an invalid record if the field isn't sent from client
public class PurchaseOrder : ICoreBizObjectModel
{
public long Id { get; set; }
public uint Concurrency { get; set; }
[Required]
public string Name { get; set; }
public bool Active { get; set; }
public string Notes { get; set; }
public string Wiki {get;set;}
public string Name { 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; }
public PurchaseOrder()
{
Tags = new List<string>();
}
[NotMapped]
public AyaType AyaType { get => AyaType.PurchaseOrder; }
}//eoc
}//eons

View File

@@ -2,6 +2,7 @@ using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
using AyaNova.Biz;
namespace AyaNova.Models
{
@@ -32,12 +33,8 @@ namespace AyaNova.Models
}
//Not persisted business properties
//NOTE: this could be a common class applied to everything for common biz rule stuff
//i.e. specific rights in situations based on rules, like candelete, canedit etc
[NotMapped]
public bool NonDataBaseExampleColumn { get; set; }//example of how to add a property that is not persisted but is used by both ends dynamically, should come up with a naming scheme so can see them at a glance
public AyaType AyaType { get => AyaType.Quote; }
}//eoc

View File

@@ -2,6 +2,7 @@ using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
using AyaNova.Biz;
namespace AyaNova.Models
{
@@ -33,11 +34,8 @@ namespace AyaNova.Models
Tags = new List<string>();
}
//Not persisted business properties
//NOTE: this could be a common class applied to everything for common biz rule stuff
//i.e. specific rights in situations based on rules, like candelete, canedit etc
[NotMapped]
public bool NonDataBaseExampleColumn { get; set; }//example of how to add a property that is not persisted but is used by both ends dynamically, should come up with a naming scheme so can see them at a glance
[NotMapped]
public AyaType AyaType { get => AyaType.QuoteItem; }
}//eoc

View File

@@ -2,32 +2,36 @@ using System;
using System.Collections.Generic;
using AyaNova.Biz;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
namespace AyaNova.Models
{
//NOTE: Any non required field (nullable in DB) sb nullable here, i.e. decimal? not decimal,
//otherwise the server will call it an invalid record if the field isn't sent from client
public class QuoteTemplate : ICoreBizObjectModel
{
public long Id { get; set; }
public uint Concurrency { get; set; }
[Required]
public string Name { get; set; }
public bool Active { get; set; }
public string Notes { get; set; }
public string Wiki {get;set;}
public string Name { 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; }
public QuoteTemplate()
{
Tags = new List<string>();
}
[NotMapped]
public AyaType AyaType { get => AyaType.QuoteTemplate; }
}//eoc
}//eons

View File

@@ -2,32 +2,36 @@ using System;
using System.Collections.Generic;
using AyaNova.Biz;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
namespace AyaNova.Models
{
//NOTE: Any non required field (nullable in DB) sb nullable here, i.e. decimal? not decimal,
//otherwise the server will call it an invalid record if the field isn't sent from client
public class QuoteTemplateItem : ICoreBizObjectModel
{
public long Id { get; set; }
public uint Concurrency { get; set; }
[Required]
public string Name { get; set; }
public bool Active { get; set; }
public string Notes { get; set; }
public string Wiki {get;set;}
public string Name { 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; }
public QuoteTemplateItem()
{
Tags = new List<string>();
}
[NotMapped]
public AyaType AyaType { get => AyaType.QuoteTemplateItem; }
}//eoc
}//eons

View File

@@ -2,32 +2,36 @@ using System;
using System.Collections.Generic;
using AyaNova.Biz;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
namespace AyaNova.Models
{
//NOTE: Any non required field (nullable in DB) sb nullable here, i.e. decimal? not decimal,
//otherwise the server will call it an invalid record if the field isn't sent from client
public class Unit : ICoreBizObjectModel
{
public long Id { get; set; }
public uint Concurrency { get; set; }
[Required]
public string Name { get; set; }
public bool Active { get; set; }
public string Notes { get; set; }
public string Wiki {get;set;}
public string Name { 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; }
public Unit()
{
Tags = new List<string>();
}
[NotMapped]
public AyaType AyaType { get => AyaType.Unit; }
}//eoc
}//eons

View File

@@ -2,32 +2,36 @@ using System;
using System.Collections.Generic;
using AyaNova.Biz;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
namespace AyaNova.Models
{
//NOTE: Any non required field (nullable in DB) sb nullable here, i.e. decimal? not decimal,
//otherwise the server will call it an invalid record if the field isn't sent from client
public class UnitModel : ICoreBizObjectModel
{
public long Id { get; set; }
public uint Concurrency { get; set; }
[Required]
public string Name { get; set; }
public bool Active { get; set; }
public string Notes { get; set; }
public string Wiki {get;set;}
public string Name { 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; }
public UnitModel()
{
Tags = new List<string>();
}
[NotMapped]
public AyaType AyaType { get => AyaType.UnitModel; }
}//eoc
}//eons

View File

@@ -2,6 +2,7 @@ using System;
using System.Collections.Generic;
using AyaNova.Biz;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
namespace AyaNova.Models
{
@@ -11,7 +12,7 @@ namespace AyaNova.Models
public dtUser()
{
Tags = new List<string>();
}
public long Id { get; set; }
public uint Concurrency { get; set; }
@@ -30,6 +31,9 @@ namespace AyaNova.Models
public List<string> Tags { get; set; }
public DateTime? LastLogin { get; set; }
[NotMapped]
public AyaType AyaType { get => AyaType.User; }
}//eoc
public class User : ICoreBizObjectModel
@@ -82,7 +86,7 @@ namespace AyaNova.Models
public User()
{
Tags = new List<string>();
}
public bool IsTech
@@ -93,5 +97,8 @@ namespace AyaNova.Models
}
}
[NotMapped]
public AyaType AyaType { get => AyaType.User; }
}//eoc
}

View File

@@ -2,32 +2,36 @@ using System;
using System.Collections.Generic;
using AyaNova.Biz;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
namespace AyaNova.Models
{
//NOTE: Any non required field (nullable in DB) sb nullable here, i.e. decimal? not decimal,
//otherwise the server will call it an invalid record if the field isn't sent from client
public class Vendor : ICoreBizObjectModel
{
public long Id { get; set; }
public uint Concurrency { get; set; }
[Required]
public string Name { get; set; }
public bool Active { get; set; }
public string Notes { get; set; }
public string Wiki {get;set;}
public string Name { 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; }
public Vendor()
{
Tags = new List<string>();
}
[NotMapped]
public AyaType AyaType { get => AyaType.Vendor; }
}//eoc
}//eons

View File

@@ -2,6 +2,7 @@ using System;
using System.Collections.Generic;
using AyaNova.Biz;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
namespace AyaNova.Models
@@ -24,7 +25,7 @@ namespace AyaNova.Models
public DateTime? EndDate { get; set; }
public string Notes { get; set; }
public int? Count { get; set; }
public string Wiki {get;set;}
public string Wiki { get; set; }
public string CustomFields { get; set; }
public List<string> Tags { get; set; }
//relations
@@ -39,6 +40,9 @@ namespace AyaNova.Models
Tags = new List<string>();
}
[NotMapped]
public AyaType AyaType { get => AyaType.Widget; }
}
}

View File

@@ -2,6 +2,7 @@ using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
using AyaNova.Biz;
namespace AyaNova.Models
{
@@ -25,6 +26,9 @@ namespace AyaNova.Models
public string CustomFields { get; set; }
public List<string> Tags { get; set; }
[NotMapped]
public AyaType AyaType { get => AyaType.WorkOrder; }
}//eoc
public class WorkOrder : ICoreBizObjectModel
@@ -61,6 +65,9 @@ namespace AyaNova.Models
return this.Serial.ToString();
}
}
[NotMapped]
public AyaType AyaType { get => AyaType.WorkOrder; }
}//eoc
}//eons

View File

@@ -2,6 +2,8 @@ using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
using AyaNova.Biz;
namespace AyaNova.Models
{
@@ -21,6 +23,9 @@ namespace AyaNova.Models
//Principle
[Required]
public long WorkOrderId { get; set; }
[NotMapped]
public AyaType AyaType { get => AyaType.WorkOrderItem; }
}//eoc
public class WorkOrderItem : ICoreBizObjectModel
@@ -62,6 +67,9 @@ namespace AyaNova.Models
public List<WorkOrderItemTask> Tasks { get; set; }
public List<WorkOrderItemTravel> Travels { get; set; }
public List<WorkOrderItemUnit> Units { get; set; }
[NotMapped]
public AyaType AyaType { get => AyaType.WorkOrderItem; }
}//eoc
}//eons

View File

@@ -1,25 +1,30 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
using AyaNova.Biz;
namespace AyaNova.Models
{
public class WorkOrderItemExpense : ICoreBizObjectModel
{
public WorkOrderItemExpense()
public WorkOrderItemExpense()
{
Tags = new List<string>();
}
public long Id { get; set; }
public uint Concurrency { get; set; }
public uint Concurrency { get; set; }
public string Notes { get; set; }
public string CustomFields { get; set; }
public List<string> Tags { get; set; }
public List<string> Tags { get; set; }
[Required]
public long WorkOrderItemId { get; set; }
public long WorkOrderItemId { get; set; }
[JsonIgnore]
public WorkOrderItem WorkOrderItem { get; set; }
[NotMapped]
public AyaType AyaType { get => AyaType.WorkOrderItemExpense; }
}//eoc
}//eons

View File

@@ -1,12 +1,14 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
using AyaNova.Biz;
namespace AyaNova.Models
{
public class WorkOrderItemLabor : ICoreBizObjectModel
{
public WorkOrderItemLabor()
public WorkOrderItemLabor()
{
Tags = new List<string>();
}
@@ -16,9 +18,12 @@ namespace AyaNova.Models
public string CustomFields { get; set; }
public List<string> Tags { get; set; }
[Required]
public long WorkOrderItemId { get; set; }
public long WorkOrderItemId { get; set; }
[JsonIgnore]
public WorkOrderItem WorkOrderItem { get; set; }
[NotMapped]
public AyaType AyaType { get => AyaType.WorkOrderItemLabor; }
}//eoc
}//eons

View File

@@ -1,24 +1,30 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
using AyaNova.Biz;
namespace AyaNova.Models
{
public class WorkOrderItemLoan : ICoreBizObjectModel
{
public WorkOrderItemLoan()
public WorkOrderItemLoan()
{
Tags = new List<string>();
}
public long Id { get; set; }
public uint Concurrency { get; set; }
public uint Concurrency { get; set; }
public string Notes { get; set; }
public string CustomFields { get; set; }
public List<string> Tags { get; set; }
public List<string> Tags { get; set; }
[Required]
public long WorkOrderItemId { get; set; }
public long WorkOrderItemId { get; set; }
[JsonIgnore]
public WorkOrderItem WorkOrderItem { get; set; }
[NotMapped]
public AyaType AyaType { get => AyaType.WorkOrderItemLoan; }
}//eoc
}//eons

View File

@@ -1,24 +1,29 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
using AyaNova.Biz;
namespace AyaNova.Models
{
public class WorkOrderItemPart : ICoreBizObjectModel
{
public WorkOrderItemPart()
public WorkOrderItemPart()
{
Tags = new List<string>();
}
public long Id { get; set; }
public uint Concurrency { get; set; }
public uint Concurrency { get; set; }
public string Notes { get; set; }
public string CustomFields { get; set; }
public List<string> Tags { get; set; }
public List<string> Tags { get; set; }
[Required]
public long WorkOrderItemId { get; set; }
public long WorkOrderItemId { get; set; }
[JsonIgnore]
public WorkOrderItem WorkOrderItem { get; set; }
[NotMapped]
public AyaType AyaType { get => AyaType.WorkOrderItemPart; }
}//eoc
}//eons

View File

@@ -1,6 +1,8 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
using AyaNova.Biz;
namespace AyaNova.Models
{
@@ -19,6 +21,9 @@ namespace AyaNova.Models
public long WorkOrderItemId { get; set; }
[JsonIgnore]
public WorkOrderItem WorkOrderItem { get; set; }
[NotMapped]
public AyaType AyaType { get => AyaType.WorkOrderItemPartRequest; }
}//eoc
}//eons

View File

@@ -1,24 +1,30 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
using AyaNova.Biz;
namespace AyaNova.Models
{
public class WorkOrderItemScheduledUser : ICoreBizObjectModel
{
public WorkOrderItemScheduledUser()
public WorkOrderItemScheduledUser()
{
Tags = new List<string>();
}
public long Id { get; set; }
public uint Concurrency { get; set; }
public uint Concurrency { get; set; }
public string Notes { get; set; }
public string CustomFields { get; set; }
public List<string> Tags { get; set; }
public List<string> Tags { get; set; }
[Required]
public long WorkOrderItemId { get; set; }
public long WorkOrderItemId { get; set; }
[JsonIgnore]
public WorkOrderItem WorkOrderItem { get; set; }
[NotMapped]
[JsonIgnore]
public AyaType AyaType { get => AyaType.WorkOrderItemScheduledUser; }
}//eoc
}//eons

View File

@@ -1,24 +1,30 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
using AyaNova.Biz;
namespace AyaNova.Models
{
public class WorkOrderItemTask : ICoreBizObjectModel
{
public WorkOrderItemTask()
public WorkOrderItemTask()
{
Tags = new List<string>();
}
public long Id { get; set; }
public uint Concurrency { get; set; }
public uint Concurrency { get; set; }
public string Notes { get; set; }
public string CustomFields { get; set; }
public List<string> Tags { get; set; }
public List<string> Tags { get; set; }
[Required]
public long WorkOrderItemId { get; set; }
public long WorkOrderItemId { get; set; }
[JsonIgnore]
public WorkOrderItem WorkOrderItem { get; set; }
[NotMapped]
[JsonIgnore]
public AyaType AyaType { get => AyaType.WorkOrderItemTask; }
}//eoc
}//eons

View File

@@ -1,24 +1,29 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
using AyaNova.Biz;
namespace AyaNova.Models
{
public class WorkOrderItemTravel : ICoreBizObjectModel
{
public WorkOrderItemTravel()
public WorkOrderItemTravel()
{
Tags = new List<string>();
}
public long Id { get; set; }
public uint Concurrency { get; set; }
public uint Concurrency { get; set; }
public string Notes { get; set; }
public string CustomFields { get; set; }
public List<string> Tags { get; set; }
public List<string> Tags { get; set; }
[Required]
public long WorkOrderItemId { get; set; }
public long WorkOrderItemId { get; set; }
[JsonIgnore]
public WorkOrderItem WorkOrderItem { get; set; }
[NotMapped]
public AyaType AyaType { get => AyaType.WorkOrderItemTravel; }
}//eoc
}//eons

View File

@@ -1,6 +1,8 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
using AyaNova.Biz;
namespace AyaNova.Models
{
@@ -19,6 +21,9 @@ namespace AyaNova.Models
public long WorkOrderItemId { get; set; }
[JsonIgnore]
public WorkOrderItem WorkOrderItem { get; set; }
[NotMapped]
public AyaType AyaType { get => AyaType.WorkOrderItemUnit; }
}//eoc
}//eons

View File

@@ -2,32 +2,36 @@ using System;
using System.Collections.Generic;
using AyaNova.Biz;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
namespace AyaNova.Models
{
//NOTE: Any non required field (nullable in DB) sb nullable here, i.e. decimal? not decimal,
//otherwise the server will call it an invalid record if the field isn't sent from client
public class WorkOrderTemplate : ICoreBizObjectModel
{
public long Id { get; set; }
public uint Concurrency { get; set; }
[Required]
public string Name { get; set; }
public bool Active { get; set; }
public string Notes { get; set; }
public string Wiki {get;set;}
public string Name { 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; }
public WorkOrderTemplate()
{
Tags = new List<string>();
}
[NotMapped]
public AyaType AyaType { get => AyaType.WorkOrderTemplate; }
}//eoc
}//eons

View File

@@ -2,32 +2,36 @@ using System;
using System.Collections.Generic;
using AyaNova.Biz;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
namespace AyaNova.Models
{
//NOTE: Any non required field (nullable in DB) sb nullable here, i.e. decimal? not decimal,
//otherwise the server will call it an invalid record if the field isn't sent from client
public class WorkOrderTemplateItem : ICoreBizObjectModel
{
public long Id { get; set; }
public uint Concurrency { get; set; }
[Required]
public string Name { get; set; }
public bool Active { get; set; }
public string Notes { get; set; }
public string Wiki {get;set;}
public string Name { 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; }
public WorkOrderTemplateItem()
{
Tags = new List<string>();
}
[NotMapped]
public AyaType AyaType { get => AyaType.WorkOrderTemplateItem; }
}//eoc
}//eons