This commit is contained in:
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 )");
|
||||
*/
|
||||
Reference in New Issue
Block a user