12345678910111213141516171819202122232425262728293031323334 |
- package model
- import (
- "time"
- )
- type Site struct {
- Id int64 `excel:"name=id " xorm:"pk autoincr notnull comment('id')" json:"id" binding:"required"` //id
- Label string `excel:"name=站点名称 " xorm:"varchar(64) notnull comment('站点名称')" json:"label" binding:"required"` //站点名称
- Code string `excel:"name=站点标识 " xorm:"varchar(255) notnull comment('站点标识')" json:"code" binding:"required"` //站点标识
- Describe string `excel:"name=站点描述 " xorm:"varchar(255) comment('站点描述')" json:"describe" ` //站点描述
- Kewords string `excel:"name=关键字 " xorm:"varchar(255) comment('关键字')" json:"kewords" ` //关键字
- Image string `excel:"name=封面图 " xorm:"varchar(255) comment('封面图')" json:"image" ` //封面图
- Content string `excel:"name=教程 " xorm:"text comment('教程')" json:"content" ` //教程
- Price int64 `excel:"name=价格 " xorm:"bigint(20) notnull default(0) comment('价格')" json:"price" binding:"required"` //价格
- Status int `excel:"name=状态 ,format=1=停用,2=启用" xorm:"int(11) notnull comment('状态')" json:"status" binding:"required,oneof=1 2 "` //状态(1停用 2启用)
- Sort int `excel:"name=排序 " xorm:"int(11) notnull comment('排序')" json:"sort" binding:"required"` //排序
- CreateTime time.Time `excel:"name=创建时间 " xorm:"datetime comment('创建时间')" json:"createTime" ` //创建时间
- CreateBy string `excel:"name=创建人 " xorm:"varchar(255) comment('创建人')" json:"createBy" ` //创建人
- UpdateTime time.Time `excel:"name=更新时间 " xorm:"datetime comment('更新时间')" json:"updateTime" ` //更新时间
- UpdateBy string `excel:"name=更新人 " xorm:"varchar(255) comment('更新人')" json:"updateBy" ` //更新人
- }
- func (this Site) TableName() string {
- return "site"
- }
- func (this *Site) Key() int64 {
- return this.Id
- }
- func (this *Site) Model() interface{} {
- return this
- }
|