123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365 |
- 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> 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<SchoolProductSumProdInfo>();
- serial = new List<SchoolProductSumData>();
- service = new List<SchoolProductSumDataService>();
- hard = new List<SchoolProductSumDataHard>();
- }
- public string pk { get; set; }
- public string code { get; set; }
- public string id { get; set; }
- public List<SchoolProductSumProdInfo> prodinfo { get; set; }
- public List<SchoolProductSumData> serial { get; set; }
- public List<SchoolProductSumDataService> service { get; set; }
- public List<SchoolProductSumDataHard> 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<string>();
- }
- public string prodCode { get; set; }
- public List<string> 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 int avaliable { get; set; }
- public long avaliableStartDate { get; set; }
- public long avaliableEndDate { get; set; }
- }
- //IES5 學校產品購買紀錄 前端顯示用
- public class SchoolOrder
- {
- public string id { get; set; }
- public long date { get; set; }
- public List<SchoolOrderSerial> serial { get; set; }
- public List<SchoolOrderService> service { get; set; }
- public List<SchoolOrderHard> hard { get; set; }
- }
- //IES5 學校產品購買紀錄 前端顯示用 序號部分
- public class SchoolOrderSerial
- {
- public string prodCode { get; set; }
- public string type { get; set; }
- public string ymwd { get; set; }
- public long sdate { get; set; }
- public long edate { get; set; }
- public int cqty { get; set; }
- public int device { get; set; }
- public object aprule { get; set; }
- public List<string> sn { get; set; }
- }
- //IES5 學校產品購買紀錄 前端顯示用 服務部分
- public class SchoolOrderService
- {
- public string prodCode { get; set; }
- public string type { get; set; }
- public long sdate { get; set; }
- public long edate { get; set; }
- public int number { get; set; }
- public string unit { get; set; }
- }
- //IES5 學校產品購買紀錄 前端顯示用 硬體部分
- public class SchoolOrderHard
- {
- public string prodCode { get; set; }
- public List<string> sn { get; set; }
- }
- //序號資訊(含deviceId、classId、OS等硬體資訊)
- public class SerialInfoBaseWithdeviceBoundExt : SchoolProductSerial
- {
- public new List<deviceBoundExt> 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<SerialInfoBaseWithdeviceBound> serial { get; set; }
- public ProductService service { get; set; }
- public List<ProductHard> hard { get; set; }
- public Aclassone aclassone { get; set; }
- }
- public class Aclassone
- {
- public List<string> ids { get; set; } //固定分配的學生ID
- public List<string> 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> deviceBound { get; set; }
- }
- //public class SerialInfoBaseWithdeviceBoundExt : SerialInfoBase
- //{
- // public List<deviceBoundExt> 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<ServiceMainPeriod> mainperiod { get; set; }
- public List<ServicePeriod> period { get; set; }
- public List<ServiceProduct> 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<ServiceProductAuth> 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<string> 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; }
- }
- }
|