sunty
2019-07-02 c4ab4a96dfdd097d0faedd14f10b93b18786101d
models/model.go
@@ -2,21 +2,20 @@
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未生效"`
   CreateBy   string `json:"createBy" example:""`
   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
   dp.Enable = 1
}
func (dp *BaseEntity) PriUpdate() {
@@ -59,7 +58,7 @@
type CameraArea struct {
   Cameraid string `json:"cameraId"`
   Areaid int `json:"areaId"`
   Areaid   int    `json:"areaId"`
}
type Sdk struct {
@@ -72,7 +71,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 +136,3 @@
   X string `json:"x"`
   Y string `json:"y"`
}