From aa91d7884e7fef55b47d6a4905596f72a5ef1ac3 Mon Sep 17 00:00:00 2001
From: liuxiaolong <liuxiaolong@aiotlink.com>
Date: 星期六, 30 五月 2020 17:43:03 +0800
Subject: [PATCH] fix sdkType unTar
---
models/model.go | 15 ++++++---------
1 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/models/model.go b/models/model.go
index d598dee..6292a5b 100644
--- a/models/model.go
+++ b/models/model.go
@@ -2,21 +2,19 @@
import "time"
-
type BaseEntity struct {
- Id string `gorm:"primary_key" json:"id" example:"XeW0HmoBevddG23Ild5o"`
+ Id string `gorm:"primary_key" json:"id" example:"XeW0HmoBevddG23Ild5o"`
CreateTime string `json:"createTime,omitempty" example:""`
UpdateTime string `json:"updateTime,omitempty" example:""`
CreateBy string `json:"createBy,omitempty" example:""`
- IsDelete bool `json:"isDelete,omitempty" example:"0 鏈垹闄� 1宸插垹闄�"`
- Enable bool `json:"enable,omitempty" example:"0 鐢熸晥 1鏈敓鏁�"`
+ IsDelete int `json:"isDelete" example:"0 鏈垹闄� 1宸插垹闄�"`
+ Enable int `json:"enable" example:" 1鐢熸晥 0鏈敓鏁�"`
}
func (dp *BaseEntity) PriInsert() {
dp.CreateTime = time.Now().Format("2006-01-02 15:04:05")
dp.CreateBy = "admin"
- dp.IsDelete = false
- dp.Enable = false
+ dp.IsDelete = 0
}
func (dp *BaseEntity) PriUpdate() {
@@ -59,7 +57,7 @@
type CameraArea struct {
Cameraid string `json:"cameraId"`
- Areaid int `json:"areaId"`
+ Areaid int `json:"areaId"`
}
type Sdk struct {
@@ -72,7 +70,7 @@
//绠楁硶鍙傛暟瀹氫箟
type SdkArg struct {
- Alias string `json:"alias"` //鍙傛暟鐨勫埆鍚�
+ Alias string `json:"alias"` //鍙傛暟鐨勫埆鍚�
Name string `json:"name"` //鍙傛暟鍚嶇О
Type string `json:"type"` //鍙傛暟绫诲瀷(鏁存暟锛屽瓧绗︿覆鎴栨暟缁�)
Must bool `json:"must"` //鏄惁蹇呭~
@@ -137,4 +135,3 @@
X string `json:"x"`
Y string `json:"y"`
}
-
--
Gitblit v1.8.0