~~~
type Users struct {
Id int `orm:"pk;auto"`
Name string `orm:"description(用户名)"`
Age int `orm:"description(年龄)"`
Sex string `orm:"description(性别)"`
Pwd string `orm:"description(密码)"`
Creater time.Time `orm:"auto_now_add;type(datetime);description(创建时间)"`
Update time.Time `orm:"auto_now;type(datetime);description(修改时间)"`
LogTime time.Time `orm:"auto_now;type(datetime);description(最后登录时间)"`
Num int `orm:"description(登录次数)"`
}
func init() {
orm.RegisterModel(new(Users))
}
~~~