This commit is contained in:
2021-01-13 00:42:47 +00:00
parent f3a619f16d
commit fb2fc7adf2
9 changed files with 121 additions and 1 deletions

View File

@@ -40,6 +40,8 @@ namespace AyaNova.Models
public virtual DbSet<Notification> Notification { get; set; }
public virtual DbSet<NotifyDeliveryLog> NotifyDeliveryLog { get; set; }
public virtual DbSet<Part> Part { get; set; }
public virtual DbSet<PartAssembly> PartAssembly { get; set; }
public virtual DbSet<PartAssemblyItem> PartAssemblyItem { get; set; }
public virtual DbSet<PM> PM { get; set; }
public virtual DbSet<PMItem> PMItem { get; set; }
public virtual DbSet<PMTemplate> PMTemplate { get; set; }

View File

@@ -0,0 +1,47 @@
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 PartAssembly : 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 CustomFields { get; set; }
public List<string> Tags { get; set; }
public PartAssembly()
{
Tags = new List<string>();
}
[NotMapped, JsonIgnore]
public AyaType AyaType { get => AyaType.PartAssembly; }
}//eoc
}//eons
// CREATE TABLE [dbo].[APARTASSEMBLY](
// [AID] [uniqueidentifier] NOT NULL,
// [ACREATED] [datetime] NULL,
// [AMODIFIED] [datetime] NULL,
// [AACTIVE] [bit] NOT NULL,
// [ACREATOR] [uniqueidentifier] NULL,
// [AMODIFIER] [uniqueidentifier] NULL,
// [ANAME] [nvarchar](255) NULL,
// [ADESCRIPTION] [nvarchar](255) NULL,

View File

@@ -0,0 +1,35 @@
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 PartAssemblyItem
{
public long Id { get; set; }
public uint Concurrency { get; set; }
//Principle
[Required]
public long PartAssemblyId { get; set; }//fk
// public PartAssembly PartAssembly { get; set; } //FOR NOW COMMENTINGH OUT THESE CONVENIENCE REFERENCES UNCOMMENT IF NEED LATER COULD BE YAGNI
public long PartId { get; set; }//fk
//public Part Part { get; set; }
public PartAssemblyItem()
{
}
}//eoc
}//eons