Browse Source

Updated.

develop
Mingcai SHEN 8 years ago
parent
commit
64cc8f3475
4 changed files with 16 additions and 19 deletions
  1. +5
    -5
      models/inject/metas.go
  2. +5
    -5
      models/published/vod.go
  3. +1
    -4
      models/types.go
  4. +5
    -5
      xql/field-types.go

+ 5
- 5
models/inject/metas.go View File

@ -24,11 +24,11 @@ type Album struct {
Categories xql.HSTOREDictionary `json:"categories,omitempty"`
Tags xql.StringArray `json:"tags,omitempty"`
Geniuses xql.StringArray `json:"geniuses,omitempty"`
Crews xql.JASONDictionary `json:"crews,omitempty"`
Crews xql.JSONDictionaryArray `json:"crews,omitempty"`
Videos xql.JSONDictionaryArray `json:"videos,omitempty"`
ScreenShots xql.StringArray `json:"screenShots,omitempty"`
VIPInfo xql.JASONDictionary `json:"vipInfo,omitempty"`
PlayControl xql.JASONDictionary `json:"playCtrl,omitempty"`
VIPInfo xql.JSONDictionary `json:"vipInfo,omitempty"`
PlayControl xql.JSONDictionary `json:"playCtrl,omitempty"`
Description string `json:"description,omitempty"`
Films interface{} `json:"films,omitempty"`
}
@ -45,8 +45,8 @@ type Film struct {
Remark string `json:"remark"`
Language string `json:"language"`
IssueDate string `json:"issueDate,omitempty"`
PlayControl xql.JASONDictionary `json:"playCtrl,omitempty"`
Crews xql.JASONDictionary `json:"crews,omitempty"`
PlayControl xql.JSONDictionary `json:"playCtrl,omitempty"`
Crews xql.JSONDictionary `json:"crews,omitempty"`
Videos xql.JSONDictionaryArray `json:"videos,omitempty"`
ScreenShots xql.StringArray `json:"screenShots,omitempty"`
Description string `json:"description,omitempty"`

+ 5
- 5
models/published/vod.go View File

@ -74,11 +74,11 @@ type VodAlbum struct {
Categories xql.HSTOREDictionary `json:"categories,omitempty"`
Tags xql.StringArray `json:"tags,omitempty"`
Geniuses xql.StringArray `json:"geniuses,omitempty"`
Crews xql.JASONDictionary `json:"crews,omitempty"`
Crews xql.JSONDictionary `json:"crews,omitempty"`
Videos xql.JSONDictionaryArray `json:"videos,omitempty"`
ScreenShots xql.StringArray `json:"screenShots,omitempty"`
VIPInfo xql.JASONDictionary `json:"vipInfo,omitempty"`
PlayControl xql.JASONDictionary `json:"playCtrl,omitempty"`
VIPInfo xql.JSONDictionary `json:"vipInfo,omitempty"`
PlayControl xql.JSONDictionary `json:"playCtrl,omitempty"`
Description string `json:"description,omitempty"`
Created *time.Time `json:"created,omitempty"`
Updated *time.Time `json:"updated,omitempty"`
@ -98,8 +98,8 @@ type VodFilm struct {
Remark string `json:"remark"`
Language string `json:"language"`
IssueDate string `json:"issueDate,omitempty"`
PlayControl xql.JASONDictionary `json:"playCtrl,omitempty"`
Crews xql.JASONDictionary `json:"crews,omitempty"`
PlayControl xql.JSONDictionary `json:"playCtrl,omitempty"`
Crews xql.JSONDictionary `json:"crews,omitempty"`
Videos xql.JSONDictionaryArray `json:"videos,omitempty"`
ScreenShots xql.StringArray `json:"screenShots,omitempty"`
Description string `json:"description,omitempty"`

+ 1
- 4
models/types.go View File

@ -1,4 +1 @@
package models
package models

+ 5
- 5
xql/field-types.go View File

@ -10,8 +10,8 @@ import (
"encoding/json"
)
type JASONDictionary map[string]interface{}
type JSONDictionaryArray []JASONDictionary
type JSONDictionary map[string]interface{}
type JSONDictionaryArray []JSONDictionary
type HSTOREDictionary map[string]interface{}
type StringArray []string
type IntegerArray []int
@ -19,7 +19,7 @@ type SmallIntegerArray []int16
type BoolArray []bool
func (p *JASONDictionary) Scan(src interface{}) error {
func (p *JSONDictionary) Scan(src interface{}) error {
if nil == src {
*p = nil
return nil
@ -28,7 +28,7 @@ func (p *JASONDictionary) Scan(src interface{}) error {
if !ok {
return errors.New("Type assertion .([]byte) failed.")
}
var i JASONDictionary
var i JSONDictionary
err := json.Unmarshal(source, &i)
if err != nil {
return err
@ -37,7 +37,7 @@ func (p *JASONDictionary) Scan(src interface{}) error {
return nil
}
func (p JASONDictionary) Value() (driver.Value, error) {
func (p JSONDictionary) Value() (driver.Value, error) {
j, err := json.Marshal(p)
return j, err
}

Loading…
Cancel
Save