Documentation ¶
Index ¶
- func AlterTbl(db *DB, tblName string, obj interface{})
- func CreateTbl(obj interface{})
- func FromDb(obj interface{}) error
- func GenTblSql(db *DB, values ...interface{})
- func ToDB(obj interface{}) error
- type BaseModel
- type BaseModelWithDelete
- type Column
- type CompressIds
- type Conf
- type DB
- type Dic
- type Ids
- type ImgTxt
- type ImgTxtItem
- type Ints
- type LiPrice
- type Price
- type PriceDigit4
- type QueryAry
- type Rate
- type RichTxt
- type RichTxtType
- type RtItem
- type Set
- type StringAry
- type Time
- type Weight
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BaseModelWithDelete ¶
type CompressIds ¶
type CompressIds []int64
func (*CompressIds) Scan ¶
func (m *CompressIds) Scan(value interface{}) error
type ImgTxt ¶
type ImgTxt struct { Ary []ImgTxtItem `json:"ary,omitempty" form:"ary"` RichTxt string `json:"richTxt,omitempty" form:"richTxt"` Txt string `json:"txt,omitempty" form:"txt"` Path string `json:"path,omitempty" form:"path"` }
type ImgTxtItem ¶
type PriceDigit4 ¶
type PriceDigit4 float32
func (*PriceDigit4) Scan ¶
func (m *PriceDigit4) Scan(value interface{}) error
type RichTxt ¶
type RichTxt struct { Type RichTxtType `json:"type,omitempty"` Md5 string `json:"md5,omitempty"` InOss bool `json:"inOss,omitempty"` Content string `json:"content,omitempty"` }
RichTxt 数据库存储格式:json或者内容字符,当内容小于200时,直接存入数据库;否则存入OSS,content存储路径 不管存储在哪里,MD5都是原始content的MD5 Deprecated
type RichTxtType ¶
type RichTxtType int
const ( RichTxtTypeTxt RichTxtType = iota //文本 RichTxtTypeJson RichTxtType = 1 //json )
type RtItem ¶
type RtItem struct { Title string `json:"title"` Desc string `json:"desc"` Img string `json:"img"` }
RtItem json时对象格式应该是这样的,也可以自行扩展
type Time ¶
type Time string
func AfterLongTiem ¶
func AfterLongTiem() *Time
func BeforeLongTiem ¶
func BeforeLongTiem() *Time
func TimeFromStr ¶
func TimeFromUnix ¶
Click to show internal directories.
Click to hide internal directories.