|
@@ -23,6 +23,12 @@ type Sandbox struct {
|
|
|
Style int `description:"风格"`
|
|
|
}
|
|
|
|
|
|
+type SandboxItem struct {
|
|
|
+ Sandbox
|
|
|
+ ModifyTime string `description:"修改时间"`
|
|
|
+ CreateTime string `description:"创建时间"`
|
|
|
+}
|
|
|
+
|
|
|
// Update 沙盘字段变更
|
|
|
func (sandbox *Sandbox) Update(cols []string) (err error) {
|
|
|
o := orm.NewOrmUsingDB("data")
|
|
@@ -31,7 +37,7 @@ func (sandbox *Sandbox) Update(cols []string) (err error) {
|
|
|
}
|
|
|
|
|
|
// GetSandboxById 根据沙盘id获取沙盘详情
|
|
|
-func GetSandboxById(sandboxId int) (sandboxInfo *Sandbox, err error) {
|
|
|
+func GetSandboxById(sandboxId int) (sandboxInfo *SandboxItem, err error) {
|
|
|
o := orm.NewOrmUsingDB("data")
|
|
|
sql := `select * from sandbox where sandbox_id = ? and is_delete = 0`
|
|
|
err = o.Raw(sql, sandboxId).QueryRow(&sandboxInfo)
|
|
@@ -55,8 +61,8 @@ type SandboxListItem struct {
|
|
|
// CanEdit bool `description:"是否可编辑"`
|
|
|
// Editor string `description:"编辑人"`
|
|
|
// VersionTotal int `description:"历史版本数量"`
|
|
|
- ModifyTime time.Time `description:"修改时间"`
|
|
|
- CreateTime time.Time `description:"创建时间"`
|
|
|
+ ModifyTime string `description:"修改时间"`
|
|
|
+ CreateTime string `description:"创建时间"`
|
|
|
|
|
|
SysUserId int `description:"作者id"`
|
|
|
SysUserName string `description:"作者名称"`
|