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.Collections.Generic;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using AyaNova.Biz;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace AyaNova.Models namespace AyaNova.Models
@@ -16,7 +18,7 @@ namespace AyaNova.Models
public string Name { get; set; } public string Name { get; set; }
public bool Active { get; set; } public bool Active { get; set; }
public string Notes { get; set; } public string Notes { get; set; }
public string Wiki {get;set;} public string Wiki { get; set; }
public string CustomFields { get; set; } public string CustomFields { get; set; }
public List<string> Tags { get; set; } public List<string> Tags { get; set; }
@@ -26,6 +28,9 @@ namespace AyaNova.Models
Tags = new List<string>(); Tags = new List<string>();
} }
[NotMapped]
public AyaType AyaType { get => AyaType.Contract; }
}//eoc }//eoc
}//eons }//eons

View File

@@ -2,6 +2,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using AyaNova.Biz; using AyaNova.Biz;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace AyaNova.Models namespace AyaNova.Models
@@ -18,7 +19,7 @@ namespace AyaNova.Models
public string Name { get; set; } public string Name { get; set; }
public bool Active { get; set; } public bool Active { get; set; }
public string Notes { get; set; } public string Notes { get; set; }
public string Wiki {get;set;} public string Wiki { get; set; }
public string CustomFields { get; set; } public string CustomFields { get; set; }
public List<string> Tags { get; set; } public List<string> Tags { get; set; }
@@ -28,6 +29,9 @@ namespace AyaNova.Models
Tags = new List<string>(); Tags = new List<string>();
} }
[NotMapped]
public AyaType AyaType { get => AyaType.Customer; }
}//eoc }//eoc
}//eons }//eons

View File

@@ -2,6 +2,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using AyaNova.Biz; using AyaNova.Biz;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace AyaNova.Models namespace AyaNova.Models
@@ -18,7 +19,7 @@ namespace AyaNova.Models
public string Name { get; set; } public string Name { get; set; }
public bool Active { get; set; } public bool Active { get; set; }
public string Notes { get; set; } public string Notes { get; set; }
public string Wiki {get;set;} public string Wiki { get; set; }
public string CustomFields { get; set; } public string CustomFields { get; set; }
public List<string> Tags { get; set; } public List<string> Tags { get; set; }
@@ -28,6 +29,9 @@ namespace AyaNova.Models
Tags = new List<string>(); Tags = new List<string>();
} }
[NotMapped]
public AyaType AyaType { get => AyaType.HeadOffice; }
}//eoc }//eoc
}//eons }//eons

View File

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

View File

@@ -2,6 +2,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using AyaNova.Biz; using AyaNova.Biz;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace AyaNova.Models namespace AyaNova.Models
@@ -18,7 +19,7 @@ namespace AyaNova.Models
public string Name { get; set; } public string Name { get; set; }
public bool Active { get; set; } public bool Active { get; set; }
public string Notes { get; set; } public string Notes { get; set; }
public string Wiki {get;set;} public string Wiki { get; set; }
public string CustomFields { get; set; } public string CustomFields { get; set; }
public List<string> Tags { get; set; } public List<string> Tags { get; set; }
@@ -28,6 +29,9 @@ namespace AyaNova.Models
Tags = new List<string>(); Tags = new List<string>();
} }
[NotMapped]
public AyaType AyaType { get => AyaType.LoanUnit; }
}//eoc }//eoc
}//eons }//eons

View File

@@ -2,6 +2,7 @@ using System.Collections.Generic;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json; using Newtonsoft.Json;
using AyaNova.Biz;
namespace AyaNova.Models namespace AyaNova.Models
@@ -32,13 +33,8 @@ namespace AyaNova.Models
PMItems = new List<PMItem>(); 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] [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 }//eoc

View File

@@ -2,6 +2,7 @@ using System.Collections.Generic;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json; using Newtonsoft.Json;
using AyaNova.Biz;
namespace AyaNova.Models namespace AyaNova.Models
{ {
@@ -17,7 +18,7 @@ namespace AyaNova.Models
public string Name { get; set; } public string Name { get; set; }
public bool Active { get; set; } public bool Active { get; set; }
public string Notes { get; set; } public string Notes { get; set; }
public string Wiki {get;set;} public string Wiki { get; set; }
public string CustomFields { get; set; } public string CustomFields { get; set; }
public List<string> Tags { get; set; } public List<string> Tags { get; set; }
@@ -33,12 +34,8 @@ namespace AyaNova.Models
Tags = new List<string>(); 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] [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 }//eoc

View File

@@ -2,6 +2,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using AyaNova.Biz; using AyaNova.Biz;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace AyaNova.Models namespace AyaNova.Models
@@ -18,7 +19,7 @@ namespace AyaNova.Models
public string Name { get; set; } public string Name { get; set; }
public bool Active { get; set; } public bool Active { get; set; }
public string Notes { get; set; } public string Notes { get; set; }
public string Wiki {get;set;} public string Wiki { get; set; }
public string CustomFields { get; set; } public string CustomFields { get; set; }
public List<string> Tags { get; set; } public List<string> Tags { get; set; }
@@ -28,6 +29,9 @@ namespace AyaNova.Models
Tags = new List<string>(); Tags = new List<string>();
} }
[NotMapped]
public AyaType AyaType { get => AyaType.PMTemplate; }
}//eoc }//eoc
}//eons }//eons

View File

@@ -2,6 +2,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using AyaNova.Biz; using AyaNova.Biz;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace AyaNova.Models namespace AyaNova.Models
@@ -18,7 +19,7 @@ namespace AyaNova.Models
public string Name { get; set; } public string Name { get; set; }
public bool Active { get; set; } public bool Active { get; set; }
public string Notes { get; set; } public string Notes { get; set; }
public string Wiki {get;set;} public string Wiki { get; set; }
public string CustomFields { get; set; } public string CustomFields { get; set; }
public List<string> Tags { get; set; } public List<string> Tags { get; set; }
@@ -28,6 +29,9 @@ namespace AyaNova.Models
Tags = new List<string>(); Tags = new List<string>();
} }
[NotMapped]
public AyaType AyaType { get => AyaType.PMTemplateItem; }
}//eoc }//eoc
}//eons }//eons

View File

@@ -2,6 +2,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using AyaNova.Biz; using AyaNova.Biz;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace AyaNova.Models namespace AyaNova.Models
@@ -18,7 +19,7 @@ namespace AyaNova.Models
public string Name { get; set; } public string Name { get; set; }
public bool Active { get; set; } public bool Active { get; set; }
public string Notes { get; set; } public string Notes { get; set; }
public string Wiki {get;set;} public string Wiki { get; set; }
public string CustomFields { get; set; } public string CustomFields { get; set; }
public List<string> Tags { get; set; } public List<string> Tags { get; set; }
@@ -28,6 +29,9 @@ namespace AyaNova.Models
Tags = new List<string>(); Tags = new List<string>();
} }
[NotMapped]
public AyaType AyaType { get => AyaType.Part; }
}//eoc }//eoc
}//eons }//eons

View File

@@ -1,8 +1,8 @@
using System;
using System.Collections.Generic; using System.Collections.Generic;
using AyaNova.Biz;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json; using Newtonsoft.Json;
using AyaNova.Biz;
namespace AyaNova.Models namespace AyaNova.Models
{ {
@@ -18,7 +18,7 @@ namespace AyaNova.Models
public string Name { get; set; } public string Name { get; set; }
public bool Active { get; set; } public bool Active { get; set; }
public string Notes { get; set; } public string Notes { get; set; }
public string Wiki {get;set;} public string Wiki { get; set; }
public string CustomFields { get; set; } public string CustomFields { get; set; }
public List<string> Tags { get; set; } public List<string> Tags { get; set; }
@@ -28,6 +28,9 @@ namespace AyaNova.Models
Tags = new List<string>(); Tags = new List<string>();
} }
[NotMapped]
public AyaType AyaType { get => AyaType.Project; }
}//eoc }//eoc
}//eons }//eons

View File

@@ -2,6 +2,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using AyaNova.Biz; using AyaNova.Biz;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace AyaNova.Models namespace AyaNova.Models
@@ -18,7 +19,7 @@ namespace AyaNova.Models
public string Name { get; set; } public string Name { get; set; }
public bool Active { get; set; } public bool Active { get; set; }
public string Notes { get; set; } public string Notes { get; set; }
public string Wiki {get;set;} public string Wiki { get; set; }
public string CustomFields { get; set; } public string CustomFields { get; set; }
public List<string> Tags { get; set; } public List<string> Tags { get; set; }
@@ -28,6 +29,9 @@ namespace AyaNova.Models
Tags = new List<string>(); Tags = new List<string>();
} }
[NotMapped]
public AyaType AyaType { get => AyaType.PurchaseOrder; }
}//eoc }//eoc
}//eons }//eons

View File

@@ -2,6 +2,7 @@ using System.Collections.Generic;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json; using Newtonsoft.Json;
using AyaNova.Biz;
namespace AyaNova.Models 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] [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 }//eoc

View File

@@ -2,6 +2,7 @@ using System.Collections.Generic;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json; using Newtonsoft.Json;
using AyaNova.Biz;
namespace AyaNova.Models namespace AyaNova.Models
{ {
@@ -33,11 +34,8 @@ namespace AyaNova.Models
Tags = new List<string>(); Tags = new List<string>();
} }
//Not persisted business properties [NotMapped]
//NOTE: this could be a common class applied to everything for common biz rule stuff public AyaType AyaType { get => AyaType.QuoteItem; }
//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
}//eoc }//eoc

View File

@@ -2,6 +2,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using AyaNova.Biz; using AyaNova.Biz;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace AyaNova.Models namespace AyaNova.Models
@@ -18,7 +19,7 @@ namespace AyaNova.Models
public string Name { get; set; } public string Name { get; set; }
public bool Active { get; set; } public bool Active { get; set; }
public string Notes { get; set; } public string Notes { get; set; }
public string Wiki {get;set;} public string Wiki { get; set; }
public string CustomFields { get; set; } public string CustomFields { get; set; }
public List<string> Tags { get; set; } public List<string> Tags { get; set; }
@@ -28,6 +29,9 @@ namespace AyaNova.Models
Tags = new List<string>(); Tags = new List<string>();
} }
[NotMapped]
public AyaType AyaType { get => AyaType.QuoteTemplate; }
}//eoc }//eoc
}//eons }//eons

View File

@@ -2,6 +2,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using AyaNova.Biz; using AyaNova.Biz;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace AyaNova.Models namespace AyaNova.Models
@@ -18,7 +19,7 @@ namespace AyaNova.Models
public string Name { get; set; } public string Name { get; set; }
public bool Active { get; set; } public bool Active { get; set; }
public string Notes { get; set; } public string Notes { get; set; }
public string Wiki {get;set;} public string Wiki { get; set; }
public string CustomFields { get; set; } public string CustomFields { get; set; }
public List<string> Tags { get; set; } public List<string> Tags { get; set; }
@@ -28,6 +29,9 @@ namespace AyaNova.Models
Tags = new List<string>(); Tags = new List<string>();
} }
[NotMapped]
public AyaType AyaType { get => AyaType.QuoteTemplateItem; }
}//eoc }//eoc
}//eons }//eons

View File

@@ -2,6 +2,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using AyaNova.Biz; using AyaNova.Biz;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace AyaNova.Models namespace AyaNova.Models
@@ -18,7 +19,7 @@ namespace AyaNova.Models
public string Name { get; set; } public string Name { get; set; }
public bool Active { get; set; } public bool Active { get; set; }
public string Notes { get; set; } public string Notes { get; set; }
public string Wiki {get;set;} public string Wiki { get; set; }
public string CustomFields { get; set; } public string CustomFields { get; set; }
public List<string> Tags { get; set; } public List<string> Tags { get; set; }
@@ -28,6 +29,9 @@ namespace AyaNova.Models
Tags = new List<string>(); Tags = new List<string>();
} }
[NotMapped]
public AyaType AyaType { get => AyaType.Unit; }
}//eoc }//eoc
}//eons }//eons

View File

@@ -2,6 +2,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using AyaNova.Biz; using AyaNova.Biz;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace AyaNova.Models namespace AyaNova.Models
@@ -18,7 +19,7 @@ namespace AyaNova.Models
public string Name { get; set; } public string Name { get; set; }
public bool Active { get; set; } public bool Active { get; set; }
public string Notes { get; set; } public string Notes { get; set; }
public string Wiki {get;set;} public string Wiki { get; set; }
public string CustomFields { get; set; } public string CustomFields { get; set; }
public List<string> Tags { get; set; } public List<string> Tags { get; set; }
@@ -28,6 +29,9 @@ namespace AyaNova.Models
Tags = new List<string>(); Tags = new List<string>();
} }
[NotMapped]
public AyaType AyaType { get => AyaType.UnitModel; }
}//eoc }//eoc
}//eons }//eons

View File

@@ -2,6 +2,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using AyaNova.Biz; using AyaNova.Biz;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace AyaNova.Models namespace AyaNova.Models
{ {
@@ -30,6 +31,9 @@ namespace AyaNova.Models
public List<string> Tags { get; set; } public List<string> Tags { get; set; }
public DateTime? LastLogin { get; set; } public DateTime? LastLogin { get; set; }
[NotMapped]
public AyaType AyaType { get => AyaType.User; }
}//eoc }//eoc
public class User : ICoreBizObjectModel public class User : ICoreBizObjectModel
@@ -93,5 +97,8 @@ namespace AyaNova.Models
} }
} }
[NotMapped]
public AyaType AyaType { get => AyaType.User; }
}//eoc }//eoc
} }

View File

@@ -2,6 +2,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using AyaNova.Biz; using AyaNova.Biz;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace AyaNova.Models namespace AyaNova.Models
@@ -18,7 +19,7 @@ namespace AyaNova.Models
public string Name { get; set; } public string Name { get; set; }
public bool Active { get; set; } public bool Active { get; set; }
public string Notes { get; set; } public string Notes { get; set; }
public string Wiki {get;set;} public string Wiki { get; set; }
public string CustomFields { get; set; } public string CustomFields { get; set; }
public List<string> Tags { get; set; } public List<string> Tags { get; set; }
@@ -28,6 +29,9 @@ namespace AyaNova.Models
Tags = new List<string>(); Tags = new List<string>();
} }
[NotMapped]
public AyaType AyaType { get => AyaType.Vendor; }
}//eoc }//eoc
}//eons }//eons

View File

@@ -2,6 +2,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using AyaNova.Biz; using AyaNova.Biz;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace AyaNova.Models namespace AyaNova.Models
@@ -24,7 +25,7 @@ namespace AyaNova.Models
public DateTime? EndDate { get; set; } public DateTime? EndDate { get; set; }
public string Notes { get; set; } public string Notes { get; set; }
public int? Count { get; set; } public int? Count { get; set; }
public string Wiki {get;set;} public string Wiki { get; set; }
public string CustomFields { get; set; } public string CustomFields { get; set; }
public List<string> Tags { get; set; } public List<string> Tags { get; set; }
//relations //relations
@@ -39,6 +40,9 @@ namespace AyaNova.Models
Tags = new List<string>(); 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;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json; using Newtonsoft.Json;
using AyaNova.Biz;
namespace AyaNova.Models namespace AyaNova.Models
{ {
@@ -25,6 +26,9 @@ namespace AyaNova.Models
public string CustomFields { get; set; } public string CustomFields { get; set; }
public List<string> Tags { get; set; } public List<string> Tags { get; set; }
[NotMapped]
public AyaType AyaType { get => AyaType.WorkOrder; }
}//eoc }//eoc
public class WorkOrder : ICoreBizObjectModel public class WorkOrder : ICoreBizObjectModel
@@ -61,6 +65,9 @@ namespace AyaNova.Models
return this.Serial.ToString(); return this.Serial.ToString();
} }
} }
[NotMapped]
public AyaType AyaType { get => AyaType.WorkOrder; }
}//eoc }//eoc
}//eons }//eons

View File

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

View File

@@ -1,12 +1,14 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json; using Newtonsoft.Json;
using AyaNova.Biz;
namespace AyaNova.Models namespace AyaNova.Models
{ {
public class WorkOrderItemExpense : ICoreBizObjectModel public class WorkOrderItemExpense : ICoreBizObjectModel
{ {
public WorkOrderItemExpense() public WorkOrderItemExpense()
{ {
Tags = new List<string>(); Tags = new List<string>();
} }
@@ -21,5 +23,8 @@ namespace AyaNova.Models
public WorkOrderItem WorkOrderItem { get; set; } public WorkOrderItem WorkOrderItem { get; set; }
[NotMapped]
public AyaType AyaType { get => AyaType.WorkOrderItemExpense; }
}//eoc }//eoc
}//eons }//eons

View File

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

View File

@@ -1,12 +1,15 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json; using Newtonsoft.Json;
using AyaNova.Biz;
namespace AyaNova.Models namespace AyaNova.Models
{ {
public class WorkOrderItemLoan : ICoreBizObjectModel public class WorkOrderItemLoan : ICoreBizObjectModel
{ {
public WorkOrderItemLoan() public WorkOrderItemLoan()
{ {
Tags = new List<string>(); Tags = new List<string>();
} }
@@ -20,5 +23,8 @@ namespace AyaNova.Models
[JsonIgnore] [JsonIgnore]
public WorkOrderItem WorkOrderItem { get; set; } public WorkOrderItem WorkOrderItem { get; set; }
[NotMapped]
public AyaType AyaType { get => AyaType.WorkOrderItemLoan; }
}//eoc }//eoc
}//eons }//eons

View File

@@ -1,12 +1,14 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json; using Newtonsoft.Json;
using AyaNova.Biz;
namespace AyaNova.Models namespace AyaNova.Models
{ {
public class WorkOrderItemPart : ICoreBizObjectModel public class WorkOrderItemPart : ICoreBizObjectModel
{ {
public WorkOrderItemPart() public WorkOrderItemPart()
{ {
Tags = new List<string>(); Tags = new List<string>();
} }
@@ -20,5 +22,8 @@ namespace AyaNova.Models
[JsonIgnore] [JsonIgnore]
public WorkOrderItem WorkOrderItem { get; set; } public WorkOrderItem WorkOrderItem { get; set; }
[NotMapped]
public AyaType AyaType { get => AyaType.WorkOrderItemPart; }
}//eoc }//eoc
}//eons }//eons

View File

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

View File

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

View File

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

View File

@@ -1,12 +1,14 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json; using Newtonsoft.Json;
using AyaNova.Biz;
namespace AyaNova.Models namespace AyaNova.Models
{ {
public class WorkOrderItemTravel : ICoreBizObjectModel public class WorkOrderItemTravel : ICoreBizObjectModel
{ {
public WorkOrderItemTravel() public WorkOrderItemTravel()
{ {
Tags = new List<string>(); Tags = new List<string>();
} }
@@ -20,5 +22,8 @@ namespace AyaNova.Models
[JsonIgnore] [JsonIgnore]
public WorkOrderItem WorkOrderItem { get; set; } public WorkOrderItem WorkOrderItem { get; set; }
[NotMapped]
public AyaType AyaType { get => AyaType.WorkOrderItemTravel; }
}//eoc }//eoc
}//eons }//eons

View File

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

View File

@@ -2,6 +2,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using AyaNova.Biz; using AyaNova.Biz;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace AyaNova.Models namespace AyaNova.Models
@@ -18,7 +19,7 @@ namespace AyaNova.Models
public string Name { get; set; } public string Name { get; set; }
public bool Active { get; set; } public bool Active { get; set; }
public string Notes { get; set; } public string Notes { get; set; }
public string Wiki {get;set;} public string Wiki { get; set; }
public string CustomFields { get; set; } public string CustomFields { get; set; }
public List<string> Tags { get; set; } public List<string> Tags { get; set; }
@@ -28,6 +29,9 @@ namespace AyaNova.Models
Tags = new List<string>(); Tags = new List<string>();
} }
[NotMapped]
public AyaType AyaType { get => AyaType.WorkOrderTemplate; }
}//eoc }//eoc
}//eons }//eons

View File

@@ -2,6 +2,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using AyaNova.Biz; using AyaNova.Biz;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace AyaNova.Models namespace AyaNova.Models
@@ -18,7 +19,7 @@ namespace AyaNova.Models
public string Name { get; set; } public string Name { get; set; }
public bool Active { get; set; } public bool Active { get; set; }
public string Notes { get; set; } public string Notes { get; set; }
public string Wiki {get;set;} public string Wiki { get; set; }
public string CustomFields { get; set; } public string CustomFields { get; set; }
public List<string> Tags { get; set; } public List<string> Tags { get; set; }
@@ -28,6 +29,9 @@ namespace AyaNova.Models
Tags = new List<string>(); Tags = new List<string>();
} }
[NotMapped]
public AyaType AyaType { get => AyaType.WorkOrderTemplateItem; }
}//eoc }//eoc
}//eons }//eons