STUB remaining v7 corebizobjects

This commit is contained in:
2020-05-01 21:54:03 +00:00
parent 894b06c5ec
commit eaeb30cf9f
23 changed files with 716 additions and 6 deletions

View File

@@ -5,12 +5,11 @@ namespace AyaNova.Models
{
public partial class AyContext : DbContext
{
public virtual DbSet<Widget> Widget { get; set; }
public virtual DbSet<GlobalBizSettings> GlobalBizSettings { get; set; }
public virtual DbSet<Event> Event { get; set; }
public virtual DbSet<SearchDictionary> SearchDictionary { get; set; }
public virtual DbSet<SearchKey> SearchKey { get; set; }
public virtual DbSet<UserOptions> UserOptions { get; set; }
public virtual DbSet<License> License { get; set; }
public virtual DbSet<SearchKey> SearchKey { get; set; }
public virtual DbSet<FileAttachment> FileAttachment { get; set; }
public virtual DbSet<OpsJob> OpsJob { get; set; }
public virtual DbSet<OpsJobLog> OpsJobLog { get; set; }
@@ -20,10 +19,31 @@ namespace AyaNova.Models
public virtual DbSet<Tag> Tag { get; set; }
public virtual DbSet<FormCustom> FormCustom { get; set; }
public virtual DbSet<PickListTemplate> PickListTemplate { get; set; }
public virtual DbSet<Widget> Widget { get; set; }
public virtual DbSet<User> User { get; set; }
public virtual DbSet<UserOptions> UserOptions { get; set; }
public virtual DbSet<License> License { get; set; }
public virtual DbSet<Customer> Customer { get; set; }
public virtual DbSet<Contract> Contract { get; set; }
public virtual DbSet<HeadOffice> HeadOffice { get; set; }
public virtual DbSet<LoanUnit> LoanUnit { get; set; }
public virtual DbSet<Part> Part { get; set; }
public virtual DbSet<PM> PM { get; set; }
public virtual DbSet<PMItem> PMItem { get; set; }
public virtual DbSet<PMTemplate> PMTemplate { get; set; }
public virtual DbSet<PMTemplateItem> PMTemplateItem { get; set; }
public virtual DbSet<Project> Project { get; set; }
public virtual DbSet<PurchaseOrder> PurchaseOrder { get; set; }
public virtual DbSet<Quote> Quote { get; set; }
public virtual DbSet<QuoteItem> QuoteItem { get; set; }
public virtual DbSet<QuoteTemplate> QuoteTemplate { get; set; }
public virtual DbSet<QuoteTemplateItem> QuoteTemplateItem { get; set; }
public virtual DbSet<Unit> Unit { get; set; }
public virtual DbSet<UnitModel> UnitModel { get; set; }
public virtual DbSet<Vendor> Vendor { get; set; }
public virtual DbSet<WorkOrder> WorkOrder { get; set; }
public virtual DbSet<WorkOrderItem> WorkOrderItem { get; set; }
public virtual DbSet<WorkOrderTemplate> WorkOrderTemplate { get; set; }
public virtual DbSet<WorkOrderTemplateItem> WorkOrderTemplateItem { get; set; }
//Note: had to add this constructor to work with the code in startup.cs that gets the connection string from the appsettings.json file

View File

@@ -0,0 +1,31 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
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 partial class Contract
{
public long Id { get; set; }
public uint ConcurrencyToken { 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 Contract()
{
Tags = new List<string>();
}
}//eoc
}//eons

View File

@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using AyaNova.Biz;
using System.ComponentModel.DataAnnotations;
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 partial class HeadOffice
{
public long Id { get; set; }
public uint ConcurrencyToken { 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 HeadOffice()
{
Tags = new List<string>();
}
}//eoc
}//eons

View File

@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using AyaNova.Biz;
using System.ComponentModel.DataAnnotations;
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 partial class LoanUnit
{
public long Id { get; set; }
public uint ConcurrencyToken { 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 LoanUnit()
{
Tags = new List<string>();
}
}//eoc
}//eons

View File

@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using AyaNova.Biz;
using System.ComponentModel.DataAnnotations;
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 partial class PM
{
public long Id { get; set; }
public uint ConcurrencyToken { 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 PM()
{
Tags = new List<string>();
}
}//eoc
}//eons

View File

@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using AyaNova.Biz;
using System.ComponentModel.DataAnnotations;
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 partial class PMItem
{
public long Id { get; set; }
public uint ConcurrencyToken { 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 PMItem()
{
Tags = new List<string>();
}
}//eoc
}//eons

View File

@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using AyaNova.Biz;
using System.ComponentModel.DataAnnotations;
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 partial class PMTemplate
{
public long Id { get; set; }
public uint ConcurrencyToken { 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 PMTemplate()
{
Tags = new List<string>();
}
}//eoc
}//eons

View File

@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using AyaNova.Biz;
using System.ComponentModel.DataAnnotations;
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 partial class PMTemplateItem
{
public long Id { get; set; }
public uint ConcurrencyToken { 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 PMTemplateItem()
{
Tags = new List<string>();
}
}//eoc
}//eons

View File

@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using AyaNova.Biz;
using System.ComponentModel.DataAnnotations;
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 partial class Part
{
public long Id { get; set; }
public uint ConcurrencyToken { 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 Part()
{
Tags = new List<string>();
}
}//eoc
}//eons

View File

@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using AyaNova.Biz;
using System.ComponentModel.DataAnnotations;
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 partial class Project
{
public long Id { get; set; }
public uint ConcurrencyToken { 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 Project()
{
Tags = new List<string>();
}
}//eoc
}//eons

View File

@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using AyaNova.Biz;
using System.ComponentModel.DataAnnotations;
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 partial class PurchaseOrder
{
public long Id { get; set; }
public uint ConcurrencyToken { 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 PurchaseOrder()
{
Tags = new List<string>();
}
}//eoc
}//eons

View File

@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using AyaNova.Biz;
using System.ComponentModel.DataAnnotations;
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 partial class Quote
{
public long Id { get; set; }
public uint ConcurrencyToken { 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 Quote()
{
Tags = new List<string>();
}
}//eoc
}//eons

View File

@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using AyaNova.Biz;
using System.ComponentModel.DataAnnotations;
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 partial class QuoteItem
{
public long Id { get; set; }
public uint ConcurrencyToken { 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 QuoteItem()
{
Tags = new List<string>();
}
}//eoc
}//eons

View File

@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using AyaNova.Biz;
using System.ComponentModel.DataAnnotations;
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 partial class QuoteTemplate
{
public long Id { get; set; }
public uint ConcurrencyToken { 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 QuoteTemplate()
{
Tags = new List<string>();
}
}//eoc
}//eons

View File

@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using AyaNova.Biz;
using System.ComponentModel.DataAnnotations;
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 partial class QuoteTemplateItem
{
public long Id { get; set; }
public uint ConcurrencyToken { 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 QuoteTemplateItem()
{
Tags = new List<string>();
}
}//eoc
}//eons

View File

@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using AyaNova.Biz;
using System.ComponentModel.DataAnnotations;
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 partial class Unit
{
public long Id { get; set; }
public uint ConcurrencyToken { 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 Unit()
{
Tags = new List<string>();
}
}//eoc
}//eons

View File

@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using AyaNova.Biz;
using System.ComponentModel.DataAnnotations;
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 partial class UnitModel
{
public long Id { get; set; }
public uint ConcurrencyToken { 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 UnitModel()
{
Tags = new List<string>();
}
}//eoc
}//eons

View File

@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using AyaNova.Biz;
using System.ComponentModel.DataAnnotations;
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 partial class Vendor
{
public long Id { get; set; }
public uint ConcurrencyToken { 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 Vendor()
{
Tags = new List<string>();
}
}//eoc
}//eons

View File

@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using AyaNova.Biz;
using System.ComponentModel.DataAnnotations;
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 partial class WorkOrder
{
public long Id { get; set; }
public uint ConcurrencyToken { 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 WorkOrder()
{
Tags = new List<string>();
}
}//eoc
}//eons

View File

@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using AyaNova.Biz;
using System.ComponentModel.DataAnnotations;
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 partial class WorkOrderItem
{
public long Id { get; set; }
public uint ConcurrencyToken { 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 WorkOrderItem()
{
Tags = new List<string>();
}
}//eoc
}//eons

View File

@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using AyaNova.Biz;
using System.ComponentModel.DataAnnotations;
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 partial class WorkOrderTemplate
{
public long Id { get; set; }
public uint ConcurrencyToken { 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 WorkOrderTemplate()
{
Tags = new List<string>();
}
}//eoc
}//eons

View File

@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using AyaNova.Biz;
using System.ComponentModel.DataAnnotations;
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 partial class WorkOrderTemplateItem
{
public long Id { get; set; }
public uint ConcurrencyToken { 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 WorkOrderTemplateItem()
{
Tags = new List<string>();
}
}//eoc
}//eons

View File

@@ -334,7 +334,6 @@ namespace AyaNova.Util
await ExecQueryAsync("CREATE UNIQUE INDEX acontract_name_id_idx ON acontract (id, name);");
await ExecQueryAsync("CREATE INDEX acontract_tags ON acontract using GIN(tags)");
//HEADOFFICE
await ExecQueryAsync("CREATE TABLE aheadoffice (id BIGSERIAL PRIMARY KEY, name varchar(255) not null unique, active bool, " +
"notes text NULL, wiki text null, customfields text NULL, tags varchar(255) ARRAY NULL)");