using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Text; using System.Text.Json.Serialization; using TEAMModelOS.SDK.Context.Attributes.Azure; using TEAMModelOS.SDK.DI; namespace TEAMModelOS.SDK.Models { //產品購買紀錄 public class SchoolProductCommon : CosmosEntity { public SchoolProductCommon() { pk = "Product"; } public string dataType { get; set; } public string prodCode { get; set; } } //產品購買紀錄-序號 public class SchoolProductSerial : SchoolProductCommon { public string serial { get; set; } public List deviceBound { get; set; } public int clientQty { get; set; } public long orderDate { get; set; } public long regDate { get; set; } public long startDate { get; set; } public long endDate { get; set; } public int deviceMax { get; set; } public object aprule { get; set; } public string expireStatus { get; set; } public int status { get; set; } } //產品購買紀錄-服務 public class SchoolProductService : SchoolProductCommon { public long orderDate { get; set; } public long startDate { get; set; } public long endDate { get; set; } public int number { get; set; } public string unit { get; set; } } //產品購買紀錄-硬體 public class SchoolProductHard : SchoolProductCommon { public long orderDate { get; set; } public string model { get; set; } public string serial { get; set; } } //產品一覽 public class SchoolProductSum { public SchoolProductSum() { pk = "ProductSum"; code = "ProductSum"; prodinfo = new List(); serial = new List(); service = new List(); hard = new List(); } public string pk { get; set; } public string code { get; set; } public string id { get; set; } public List prodinfo { get; set; } public List serial { get; set; } public List service { get; set; } public List hard { get; set; } //public Aclassone aclassone { get; set; } //是否獨立出來,未定 } public class SchoolProductSumProdInfo { public string prodCode { get; set; } public string prodName { get; set; } public string dataType { get; set; } public ServiceType serviceType { get; set; } } public enum ServiceType { number = 0, module = 1, space = 2 } //產品一覽 產品內容 基本項 public class SchoolProductSumData { public SchoolProductSumData() { ids = new List(); } public string prodCode { get; set; } public List ids { get; set; } public int avaliable { get; set; } } //產品一覽 產品內容 服務 public class SchoolProductSumDataService : SchoolProductSumData { public long startDate { get; set; } public long endDate { get; set; } } //產品一覽 產品內容 硬體 public class SchoolProductSumDataHard : SchoolProductSumData { public string model { get; set; } } //服務各產品資訊購買紀錄(前端用) public class SchoolProductOrder { public string prodCode { get; set; } public List order { get; set; } public int avaliable { get; set; } public long avaliableStartDate { get; set; } public long avaliableEndDate { get; set; } } //產品購買紀錄(前端顯示用) public class SchoolProductOrderList { public string id { get; set; } public long orderDate { get; set; } public long startDate { get; set; } public long endDate { get; set; } public int number { get; set; } public string unit { get; set; } } //序號資訊(含deviceId、classId、OS等硬體資訊) public class SerialInfoBaseWithdeviceBoundExt : SchoolProductSerial { public new List deviceBound { get; set; } } //服務授權期限(主週期資訊) ※code='Product' code='Product-{SchoolID}' dataType='servicePeriod' public class SchoolProductServicePeriod : SchoolProductCommon { public int type { get; set; } //授權週期類型 0:銷售 1:試用 public long startDate { get; set; } public long endDate { get; set; } public int number { get; set; } public string unit { get; set; } } ///////////////////////////////////////////////////////// public class SchoolProduct : CosmosEntity { public SchoolProduct() { pk = "Base"; } public List serial { get; set; } public ProductService service { get; set; } public List hard { get; set; } public Aclassone aclassone { get; set; } } public class Aclassone { public List ids { get; set; } //固定分配的學生ID public List outids { get; set; } //過期被回收的學生ID(無法使用,待數量購足後回復移至ids) public int total { get; set; } public int used { get; set; } } public class SerialInfoBase { public string id { get; set; } public string serial { get; set; } public string prodCode { get; set; } public int clientQty { get; set; } public long regDate { get; set; } public long startDate { get; set; } public long endDate { get; set; } public int deviceMax { get; set; } public object aprule { get; set; } public string expireStatus { get; set; } public int status { get; set; } } public class SerialInfoBaseWithdeviceBound : SerialInfoBase { public List deviceBound { get; set; } } //public class SerialInfoBaseWithdeviceBoundExt : SerialInfoBase //{ // public List deviceBound { get; set; } //} public class deviceBound { public string uuid { get; set; } public string uuid2 { get; set; } public string deviceId { get; set; } public string classId { get; set; } } public class deviceBoundRich : deviceBound { public string serial { get; set; } } public class deviceForCoreService { public string uuid1 { get; set; } public string uuid2 { get; set; } public string device_id { get; set; } public string class_id { get; set; } public string sn { get; set; } } public class deviceFromCoreService { public string uuid1 { get; set; } public string uuid2 { get; set; } public string device_id { get; set; } public string sn { get; set; } public string os { get; set; } public string os_ver { get; set; } public string local_ip { get; set; } public string product_ver { get; set; } public string cpu { get; set; } public string pc_name { get; set; } } public class deviceBoundExt : deviceBound { public string ip { get; set; } public string pcname { get; set; } public string os { get; set; } public string cpu { get; set; } public string osver { get; set; } } public class ProductService { public List mainperiod { get; set; } public List period { get; set; } public List product { get; set; } } public class ServiceMainPeriod { public string mainPeriodId { get; set; } public string mainPeriodtype { get; set; } public long startDate { get; set; } public long endDate { get; set; } public bool active { get; set; } } public class ServicePeriod { public string mainPeriodId { get; set; } public string periodId { get; set; } public long startDate { get; set; } public long endDate { get; set; } public bool active { get; set; } } public class ServiceProduct { public string prodCode { get; set; } public bool noperiod { get; set; } public string serviceType { get; set; } public List auth { get; set; } public int avaliable { get; set; } } public class ServiceProductResult { public string prodCode { get; set; } public bool noperiod { get; set; } public string serviceType { get; set; } public long startDate { get; set; } public long endDate { get; set; } public int avaliable { get; set; } } public class ServiceProductAclassoneResult : ServiceProductResult { public int staUsed { get; set; } public int dynUsed { get; set; } } public class ServiceProductAuth { public string orderId { get; set; } public string periodId { get; set; } public int number { get; set; } public string unit { get; set; } } public class ServiceProductAuthHistoryBasic { public string orderId { get; set; } public long orderDate { get; set; } public int number { get; set; } public string unit { get; set; } } public class ServiceProductAuthHistory : ServiceProductAuthHistoryBasic { public List periodIdList { get; set; } } public class ServiceProductAuthHistoryStartEnd : ServiceProductAuthHistoryBasic { public long startDate { get; set; } public long endDate { get; set; } } public class ProductHard { public string prodCode { get; set; } public string model { get; set; } public string serial { get; set; } } public class CoreUuid { public string serial { get; set; } public string os { get; set; } public string ip { get; set; } public string uuid { get; set; } public string uuid2 { get; set; } public string deviceId { get; set; } public string pcname { get; set; } public string cpu { get; set; } public int ram { get; set; } } public class periodZone { public long startDate { get; set; } public long endDate { get; set; } } }