import Mock from "mockjs";

export default {
  serviceDriveAuthData: Mock.mock({
  
     //第一區假資料，服務授權列表，可參閱下面產品訂單格式，服務正式名稱尚未定義
    serviceList: [
      {
        name: "智慧學伴學生授權數(AClassONE)", //服務名稱
        isBuy: true, //是否購買
        isActive: true, //是否啟用
        authTimeStart: "2019.8.31", //服務啟用
        authTimeEnd: "2021.8.30", //無到期日，永久授權
        authNum: 500, //授權數量，應該只有AclassOne會有
        authNumToday: 158, //今日分配狀況
        intro: "@cparagraph(1, 3)", //產品詳細介紹
        fixedNum:74, //固定分配數
        dynamicNum:84 //動態分配數
      },
      {
        name: "教學大數據服務",
        isBuy: true,
        isActive: true,
        authTimeStart: "2019.8.31",
        authTimeEnd: "2021.5.10",
        authNum: 500,
        authNumToday: 158,
        intro: "@cparagraph(1, 3)", //產品詳細介紹
      },
      {
        name: "智慧校園物聯網服務",
        isBuy: true,
        isActive: false,
        authTimeStart: "2019.12.31",
        authTimeEnd: "2022.12.31",
        authNum: 500,
        authNumToday: 158,
        intro: "@cparagraph(1, 3)", //產品詳細介紹
      },
      {
        name: "自動閱卷服務",
        isBuy: true,
        isActive: false,
        authTimeStart: "2019.12.31",
        authTimeEnd: "2024.12.31",
        authNum: 500,
        authNumToday: 158,
        intro: "@cparagraph(1, 3)", //產品詳細介紹
      },
      {
        name: "柏拉圖自動切片服務",
        isBuy: false, //未購買未啟用
        isActive: false,
        authTimeStart: "2019.12.31",
        authTimeEnd: "2022.12.31",
        authNum: 500,
        authNumToday: 158,
        intro: "@cparagraph(1, 3)", //產品詳細介紹
      },
    ],
     //第二區假資料，智慧教室授權管理
    hiteachClassroomAuth: [
      //參考hbcn-product
      {
        id: "hbcn",
        code: "Product",
        serials: {
          "auth|338": [
            {
              id: "117074",
              serial: "12DLT43F-EE20-4775-93F5-6BCC",
              prodGroup: "HiTeach 5",
              'prodName|1': ['PRO','TBL','STD'],
              clientQty: 10,
              startDate: 1598832000,
              "endDate|1": [0,1,1602691199],//已到期，無限期或有一個結束時間
              active: '@natural(0, 6)',//已啟用最大值，搭配deviceBound
              deviceMax: '@natural(1, 10)',//可綁定最大值，如只有一則回傳單一
              'deviceBound|0-9': [
                {
                  uuid: "@name",
                  uuid2: null,
                  deviceId: "2d776529-ac7b-4197-b981-3ae3370fe686",
                  classId: "Class0103",
                  deviceIp:'@ip',
                  deviceMac:"@id", //MAC位址
                  computer:"Microsoft Windows NT 10.0.177.63.0 | Intel(R) Core(TM) i5-9500 CPU @3.00GHz" //PC的詳細規格，
                },
              ],
              aprule: {
                "sokapp|1": true, //蘇格拉底議課
                "sokvdo|1": true,//蘇格拉底影片
                "ezs|1": true,//錄播系統

                //目前格式上沒有的模組
                //遠距教室服務
                "remoteSys|1": true,
                //蘇格拉底桌面
                "sokDesktop|1":false,
                //蘇格拉底報告
                "sokreport|1":false
              },
            },
            
          ],
        },
      },
    ],
    //第三區假資料，智慧教學服務空間狀態，refer to Jeff hbcn-product.json product那區回傳的資料，periodID意涵參閱Jeff json中欄位對應
    spaceStatus: {
        
            "prodCode": "IPALYEIY",
            "prodGroup": "TEAM Model Cloud",
            "prodName": "智慧教學服務空間",
            "lastEndDay":1692547199,//空間最終到期日
            "noperiod": false,
            "serviceType": "space",
            //全部買的空間授權時間狀態
            "auth": [
                {
                    "periodId": "4361",
                    "number": 1000,
                    "unit": "G"
                },
                {
                    "periodId": "4362",
                    "number": 1000,
                    "unit": "G"
                },
                {
                    "periodId": "4363",
                    "number": 1000,
                    "unit": "G"
                },
                {
                    "periodId": "4361",
                    "number": 200,
                    "unit": "G"
                },
                {
                    "periodId": "4362",
                    "number": 200,
                    "unit": "G"
                },
                {
                    "periodId": "4363",
                    "number": 200,
                    "unit": "G"
                },
                {
                    "periodId": "7856",
                    "number": 1000,
                    "unit": "G"
                },
                {
                    "periodId": "7857",
                    "number": 1000,
                    "unit": "G"
                }
            ],
            
                "avaliable": 1010,
                "used": 573,
            
            //訂單就是最下面那區
            "order": [
                {
                    "orderId": "20201020489069062492",
                    "opid": "24735",
                    "mainPeriodId": "221",
                    "periodIds": [
                        "4361",
                        "4362",
                        "4363"
                    ],
                    "startDate": 1597939200,
                    "endDate": 1692547199,
                    "number": 1000,
                    "unit": "G",
                    "createDate": 1559322061
                },
                {
                    "orderId": "20201020489063456789",
                    "opid": "25774",
                    "mainPeriodId": "221",
                    "periodIds": [
                        "4361",
                        "4362",
                        "4363"
                    ],
                    "startDate": 1597939200,
                    "endDate": 1692547199,
                    "number": 200,
                    "unit": "G",
                    "createDate": 1559322061
                },
                {
                    "orderId": "20201119265796324211",
                    "opid": "29885",
                    "mainPeriodId": "356",
                    "periodIds": [
                        "7856",
                        "7857"
                    ],
                    "startDate": 1597939200,
                    "endDate": 1692547199,
                    "number": 1000,
                    "unit": "G",
                    "createDate": 1559322061
                }
            ]
        
        
          },
  }),
};
