12345678910111213141516171819202122232425262728293031323334 |
- package model
- import (
- "time"
- )
- type Sms struct {
- Id int64 `excel:"name= " xorm:"pk autoincr notnull comment('')" json:"id" binding:"required"` //
- Code string `excel:"name=验证码 " xorm:"varchar(12) comment('验证码')" json:"code" binding:"required"` //验证码
- Phone string `excel:"name=手机号码 " xorm:"varchar(11) comment('手机号码')" json:"phone" binding:"required"` //手机号码
- State int `excel:"name=状态 ,format=1=未使用,2=已使用,3=已过期" xorm:"tinyint(4) comment('状态')" json:"state" binding:"required,oneof=1 2 3 "` //状态
- Mode string `excel:"name=消息类型 ,format=1=验证码,2=其它" xorm:"varchar(32) comment('消息类型')" json:"mode" binding:"required,oneof=1 2 "` //消息类型(1验证码 2其它)
- CreateTime time.Time `excel:"name=创建时间 " xorm:"created comment('创建时间')" json:"createTime" ` //创建时间
- UpdateTime time.Time `excel:"name=更新时间 " xorm:"updated comment('更新时间')" json:"updateTime" ` //更新时间
- }
- func (this Sms) TableName() string {
- return "sys_sms"
- }
- func (this *Sms) Key() int64 {
- return this.Id
- }
- func (this *Sms) Model() interface{} {
- return this
- }
- func (this *Sms) BeforeUpdate() {
- }
- func (this *Sms) BeforeInsert() {
- }
|