This commit is contained in:
@@ -56,6 +56,8 @@ namespace Sockeye.Models
|
||||
public virtual DbSet<IntegrationItem> IntegrationItem { get; set; }
|
||||
public virtual DbSet<IntegrationLog> IntegrationLog { get; set; }
|
||||
|
||||
public virtual DbSet<License> License { 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
|
||||
//and commented out the above on configuring
|
||||
public AyContext(DbContextOptions<AyContext> options) : base(options)
|
||||
@@ -114,7 +116,7 @@ namespace Sockeye.Models
|
||||
//SERIALIZED OBJECTS
|
||||
//
|
||||
|
||||
//modelBuilder.Entity<WorkOrder>().Property(z => z.Serial).UseIdentityByDefaultColumn();
|
||||
modelBuilder.Entity<Case>().Property(z => z.CaseId).UseIdentityByDefaultColumn();
|
||||
//## NOTE: if more added here then must also update globalbizsettingscontroller.seeds and client
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
52
server/models/License.cs
Normal file
52
server/models/License.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Sockeye.Biz;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Sockeye.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 License : ICoreBizObjectModel
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public uint Concurrency { get; set; }
|
||||
|
||||
public DateTime Created { get; set; }
|
||||
public long CustomerId { get; set; }
|
||||
[NotMapped]
|
||||
public string CustomerViz { get; set; }
|
||||
public string RegTo { get; set; }
|
||||
public string Key { get; set; }
|
||||
public string FetchCode { get; set; }
|
||||
public string FetchEmail { get; set; }
|
||||
public DateTime FetchedOn { get; set; }
|
||||
public string DbId { get; set; }
|
||||
public DateTime LicenseExpire { get; set; }
|
||||
public DateTime MaintenanceExpire { get; set; }
|
||||
|
||||
public string Wiki { get; set; }
|
||||
public string CustomFields { get; set; }
|
||||
public List<string> Tags { get; set; }
|
||||
|
||||
|
||||
public License()
|
||||
{
|
||||
Tags = new List<string>();
|
||||
}
|
||||
|
||||
[NotMapped, JsonIgnore]
|
||||
public SockType SType { get => SockType.License; }
|
||||
|
||||
}//eoc
|
||||
|
||||
}//eons
|
||||
/*
|
||||
await ExecQueryAsync("CREATE TABLE alicense (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, created TIMESTAMPTZ NOT NULL, "
|
||||
+ "customerid BIGINT NOT NULL REFERENCES acustomer(id), regto TEXT NOT NULL, key TEXT NOT NULL, fetchcode TEXT, fetchemail TEXT, "
|
||||
+ "fetchedon TIMESTAMPTZ, dbid TEXT, licenseexpire TIMESTAMPTZ, maintenanceexpire TIMESTAMPTZ NOT NULL, "
|
||||
+ "wiki TEXT, customfields TEXT, tags VARCHAR(255) ARRAY )");
|
||||
*/
|
||||
47
server/models/TrialLicenseRequest.cs
Normal file
47
server/models/TrialLicenseRequest.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Sockeye.Biz;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Sockeye.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 TrialLicenseRequest : ICoreBizObjectModel
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public uint Concurrency { get; set; }
|
||||
public string DbId { get; set; }
|
||||
public string CompanyName { get; set; }
|
||||
public string ContactName { get; set; }
|
||||
public string Email { get; set; }
|
||||
public string EmailConfirmCode { get; set; }
|
||||
public bool EmailValidated { get; set; } = false;
|
||||
public DateTime Requested { get; set; }
|
||||
public DateTime? Processed { get; set; }
|
||||
public TrialRequestStatus Status { get; set; } = TrialRequestStatus.NotSet;
|
||||
public string RejectReason { get; set; }
|
||||
public string Key { get; set; }
|
||||
public DateTime FetchedOn { get; set; }
|
||||
public bool Perpetual { get; set; } = false;
|
||||
|
||||
public TrialLicenseRequest()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
[NotMapped, JsonIgnore]
|
||||
public SockType SType { get => SockType.TrialLicenseRequest; }
|
||||
|
||||
}//eoc
|
||||
|
||||
}//eons
|
||||
/*
|
||||
"CREATE TABLE atriallicenserequest (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, dbid TEXT NOT NULL, companyname TEXT NOT NULL, "
|
||||
+ "contactname TEXT NOT NULL, email TEXT NOT NULL, emailconfirmcode TEXT NOT NULL, emailvalidated BOOL DEFAULT false, "
|
||||
+ "requested TIMESTAMPTZ, processed TIMESTAMPTZ, status INTEGER NOT NULL DEFAULT 0, rejectreason TEXT, key TEXT, "
|
||||
+ "fetched TIMESTAMPTZ, perpetual BOOL DEFAULT false NOT NULL )"
|
||||
*/
|
||||
68
server/models/Vendor.cs
Normal file
68
server/models/Vendor.cs
Normal file
@@ -0,0 +1,68 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Sockeye.Biz;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Sockeye.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
|
||||
//#### MIRRORED IN QBI !!
|
||||
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 CustomFields { get; set; }
|
||||
public List<string> Tags { get; set; }
|
||||
|
||||
public string Contact { get; set; }
|
||||
public string ContactNotes { get; set; }
|
||||
public string AlertNotes { get; set; }
|
||||
public string WebAddress { get; set; }
|
||||
public string AccountNumber { get; set; }
|
||||
public string Phone1 { get; set; }
|
||||
public string Phone2 { get; set; }
|
||||
public string Phone3 { get; set; }
|
||||
public string Phone4 { get; set; }
|
||||
public string Phone5 { get; set; }
|
||||
public string EmailAddress { get; set; }
|
||||
|
||||
|
||||
//POSTAL ADDRESS
|
||||
public string PostAddress { get; set; }
|
||||
public string PostCity { get; set; }
|
||||
public string PostRegion { get; set; }
|
||||
public string PostCountry { get; set; }
|
||||
public string PostCode { get; set; }
|
||||
|
||||
//PHYSICAL ADDRESS
|
||||
public string Address { get; set; }
|
||||
public string City { get; set; }
|
||||
public string Region { get; set; }
|
||||
public string Country { get; set; }
|
||||
public string AddressPostal { get; set; }
|
||||
public decimal? Latitude { get; set; }
|
||||
public decimal? Longitude { get; set; }
|
||||
|
||||
|
||||
|
||||
public Vendor()
|
||||
{
|
||||
Tags = new List<string>();
|
||||
}
|
||||
|
||||
[NotMapped, JsonIgnore]
|
||||
public SockType SType { get => SockType.Vendor; }
|
||||
|
||||
}//eoc
|
||||
|
||||
}//eons
|
||||
|
||||
Reference in New Issue
Block a user