This commit is contained in:
@@ -44,7 +44,7 @@ namespace Sockeye.Models
|
||||
public virtual DbSet<Logo> Logo { get; set; }
|
||||
public virtual DbSet<Report> Report { get; set; }
|
||||
public virtual DbSet<DashboardView> DashboardView { get; set; }
|
||||
|
||||
|
||||
|
||||
public virtual DbSet<CustomerNotifySubscription> CustomerNotifySubscription { get; set; }
|
||||
public virtual DbSet<CustomerNotifyEvent> CustomerNotifyEvent { get; set; }
|
||||
@@ -53,10 +53,15 @@ namespace Sockeye.Models
|
||||
|
||||
|
||||
public virtual DbSet<Integration> Integration { get; set; }
|
||||
public virtual DbSet<IntegrationItem> IntegrationItem { get; set; }
|
||||
public virtual DbSet<IntegrationItem> IntegrationItem { get; set; }
|
||||
public virtual DbSet<IntegrationLog> IntegrationLog { get; set; }
|
||||
|
||||
public virtual DbSet<License> License { get; set; }
|
||||
public virtual DbSet<License> License { get; set; }
|
||||
public virtual DbSet<Vendor> Vendor { get; set; }
|
||||
public virtual DbSet<Product> Product { get; set; }
|
||||
public virtual DbSet<Purchase> Purchase { get; set; }
|
||||
public virtual DbSet<TrialLicenseRequest> TrialLicenseRequest { get; set; }
|
||||
public virtual DbSet<GZCase> GZCase { 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
|
||||
@@ -115,8 +120,8 @@ namespace Sockeye.Models
|
||||
///////////////////////////////
|
||||
//SERIALIZED OBJECTS
|
||||
//
|
||||
|
||||
modelBuilder.Entity<Case>().Property(z => z.CaseId).UseIdentityByDefaultColumn();
|
||||
|
||||
modelBuilder.Entity<GZCase>().Property(z => z.CaseId).UseIdentityByDefaultColumn();
|
||||
//## NOTE: if more added here then must also update globalbizsettingscontroller.seeds and client
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
34
server/models/GZCase.cs
Normal file
34
server/models/GZCase.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
using Sockeye.Biz;
|
||||
|
||||
namespace Sockeye.Models
|
||||
{
|
||||
public class GZCase : ICoreBizObjectModel
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public uint Concurrency { get; set; }
|
||||
|
||||
public long CaseId { get; set; }
|
||||
public DateTime Created { get; set; }
|
||||
public DateTime? Closed { get; set; }
|
||||
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
public string Notes { get; set; }
|
||||
public string Wiki { get; set; }
|
||||
public string CustomFields { get; set; }
|
||||
public List<string> Tags { get; set; }
|
||||
|
||||
public GZCase()
|
||||
{
|
||||
Tags = new List<string>();
|
||||
Created = DateTime.UtcNow;
|
||||
}
|
||||
[NotMapped, JsonIgnore]
|
||||
public SockType SType { get => SockType.GZCase; }
|
||||
}//eoc
|
||||
}//eons
|
||||
@@ -32,6 +32,9 @@ namespace Sockeye.Models
|
||||
public string CustomFields { get; set; }
|
||||
public List<string> Tags { get; set; }
|
||||
|
||||
//workaround for notification
|
||||
[NotMapped, JsonIgnore]
|
||||
public string Name { get; set; }
|
||||
|
||||
public License()
|
||||
{
|
||||
|
||||
35
server/models/Product.cs
Normal file
35
server/models/Product.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
using Sockeye.Biz;
|
||||
|
||||
namespace Sockeye.Models
|
||||
{
|
||||
public class Product : ICoreBizObjectModel
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public uint Concurrency { get; set; }
|
||||
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
public bool Active { get; set; }
|
||||
public long VendorId { get; set; }
|
||||
public TimeSpan LicenseInterval { get; set; }
|
||||
public TimeSpan MaintInterval { get; set; }
|
||||
public string VendorCode { get; set; }
|
||||
public string OurCode { get; set; }
|
||||
public string Wiki { get; set; }
|
||||
public string CustomFields { get; set; }
|
||||
public List<string> Tags { get; set; }
|
||||
|
||||
public Product()
|
||||
{
|
||||
Tags = new List<string>();
|
||||
}
|
||||
|
||||
[NotMapped, JsonIgnore]
|
||||
public SockType SType { get => SockType.Product; }
|
||||
}//eoc
|
||||
}//eons
|
||||
43
server/models/Purchase.cs
Normal file
43
server/models/Purchase.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
using Sockeye.Biz;
|
||||
|
||||
namespace Sockeye.Models
|
||||
{
|
||||
public class Purchase : ICoreBizObjectModel
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public uint Concurrency { get; set; }
|
||||
[Required]
|
||||
public long CustomerId { get; set; }
|
||||
[Required]
|
||||
public long VendorId { get; set; }
|
||||
[Required]
|
||||
public long ProductId { get; set; }
|
||||
public string SalesOrderNumber { get; set; }
|
||||
[Required]
|
||||
public DateTime PurchaseDate { get; set; }
|
||||
public DateTime? ExpireDate { get; set; }
|
||||
public DateTime? CancelDate { get; set; }
|
||||
public string CouponCode { get; set; }
|
||||
public string PurchaseNotes { get; set; }
|
||||
public bool RenewNoticeSent { get; set; } = false;
|
||||
public int Quantity { get; set; } = 1;
|
||||
public string VendorData { get; set; }
|
||||
public DateTime? ProcessedDate { get; set; }
|
||||
public string Wiki { get; set; }
|
||||
public string CustomFields { get; set; }
|
||||
public List<string> Tags { get; set; }
|
||||
|
||||
public Purchase()
|
||||
{
|
||||
Tags = new List<string>();
|
||||
}
|
||||
|
||||
[NotMapped, JsonIgnore]
|
||||
public SockType SType { get => SockType.Purchase; }
|
||||
}//eoc
|
||||
}//eons
|
||||
50
server/models/SubscriptionServer.cs
Normal file
50
server/models/SubscriptionServer.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
using Sockeye.Biz;
|
||||
|
||||
namespace Sockeye.Models
|
||||
{
|
||||
public class SubscriptionServer : ICoreBizObjectModel
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public uint Concurrency { get; set; }
|
||||
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
public bool Active { get; set; }
|
||||
public DateTime Created { get; set; }
|
||||
[Required]
|
||||
public string DataCenter { get; set; }
|
||||
[Required]
|
||||
public string TimeZone { get; set; }
|
||||
public DateTime? LastUpdated { get; set; }
|
||||
public DateTime SubscriptionExpire { get; set; }
|
||||
public DateTime? TrialExpire { get; set; }
|
||||
public string TrialContact { get; set; }
|
||||
public string TrialEmail { get; set; }
|
||||
public string TrialCompany { get; set; }
|
||||
public string OperatingSystem { get; set; }
|
||||
public string CustomerSubDomain { get; set; }
|
||||
public long? CustomerId { get; set; }
|
||||
public long? LicenseId { get; set; }
|
||||
public string Wiki { get; set; }
|
||||
public string CustomFields { get; set; }
|
||||
public List<string> Tags { get; set; }
|
||||
|
||||
|
||||
|
||||
public SubscriptionServer()
|
||||
{
|
||||
Tags = new List<string>();
|
||||
Created = DateTime.UtcNow;
|
||||
}
|
||||
|
||||
[NotMapped, JsonIgnore]
|
||||
public SockType SType { get => SockType.SubscriptionServer; }
|
||||
|
||||
}//eoc
|
||||
|
||||
}//eons
|
||||
@@ -28,6 +28,14 @@ namespace Sockeye.Models
|
||||
public DateTime FetchedOn { get; set; }
|
||||
public bool Perpetual { get; set; } = false;
|
||||
|
||||
|
||||
public List<string> Tags { get; set; }
|
||||
|
||||
//workaround for notification
|
||||
[NotMapped, JsonIgnore]
|
||||
public string Name { get; set; }
|
||||
|
||||
|
||||
public TrialLicenseRequest()
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user