feat: 主体
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
package model
|
||||
|
||||
type Category struct {
|
||||
//ID int `json:"id" gorm:"column:id"`
|
||||
Key int `json:"key" gorm:"column:key"`
|
||||
Value string `json:"value" gorm:"column:value"`
|
||||
Gid string `json:"gid" gorm:"column:gid"`
|
||||
}
|
||||
|
||||
func (m *Category) TableName() string {
|
||||
return "category"
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package model
|
||||
|
||||
type Response struct {
|
||||
Message string `json:"message"`
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"database/sql/driver"
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type (
|
||||
Script struct {
|
||||
ScriptInfo SInfo `json:"sinfo" gorm:"column:sinfo"`
|
||||
}
|
||||
SInfo struct {
|
||||
//uuid
|
||||
ScriptId string `json:"scriptId"`
|
||||
ScriptName string `json:"scriptName"`
|
||||
ScriptCoverUrl string `json:"scriptCoverUrl"`
|
||||
ScriptIntro string `json:"scriptIntro"`
|
||||
ScriptPlayerLimit int `json:"scriptPlayerLimit"`
|
||||
ScriptMalePlayerLimit int `json:"scriptMalePlayerLimit"`
|
||||
ScriptFemalePlayerLimit int `json:"scriptFemalePlayerLimit"`
|
||||
//根据剧本标签组装成数组
|
||||
ScriptTag []int `json:"scriptTag"`
|
||||
ScriptScore float64 `json:"scriptScore"`
|
||||
ScriptScoreCount int `json:"scriptScoreCount"`
|
||||
ScriptInferenceScore float64 `json:"scriptInferenceScore"`
|
||||
ScriptPlotScore float64 `json:"scriptPlotScore"`
|
||||
ScriptComplexScore float64 `json:"scriptComplexScore"`
|
||||
//根据scriptImageContent组装好-->数组形式
|
||||
ScriptImageContent []string `json:"scriptImageContent"`
|
||||
PlayerRoleReversalStatus int `json:"playerRoleReversalStatus"`
|
||||
//剧本text内容
|
||||
ScriptTextContent string `json:"scriptTextContent"`
|
||||
//想玩
|
||||
ScriptWantPlayerCount int `json:"scriptWantPlayerCount"`
|
||||
//玩过
|
||||
ScriptPlayedCount int `json:"scriptPlayedCount"`
|
||||
//本时长:分钟计算
|
||||
GroupDuration int `json:"groupDuration"`
|
||||
//本难度
|
||||
ScriptDifficultyDegreeName string `json:"scriptDifficultyDegreeName"`
|
||||
//qzj id
|
||||
Qid string `json:"qid"`
|
||||
}
|
||||
)
|
||||
|
||||
func (p Script) Value() (driver.Value, error) {
|
||||
return json.Marshal(p)
|
||||
}
|
||||
|
||||
func (p *Script) Scan(input interface{}) error {
|
||||
return json.Unmarshal(input.([]byte), &p)
|
||||
}
|
||||
func (p SInfo) Value() (driver.Value, error) {
|
||||
return json.Marshal(p)
|
||||
}
|
||||
|
||||
func (p *SInfo) Scan(input interface{}) error {
|
||||
return json.Unmarshal(input.([]byte), &p)
|
||||
}
|
||||
|
||||
func (p Script) TableName() string {
|
||||
return "script"
|
||||
}
|
||||
Reference in New Issue
Block a user