msg_code.go 444 B

12345678910111213141516171819202122232425
  1. package models
  2. import (
  3. "rdluck_tools/orm"
  4. "time"
  5. )
  6. type MsgCode struct {
  7. MsgCodeId int `orm:"column(msg_code_id);pk"`
  8. OpenId string
  9. Mobile string
  10. Code string
  11. ExpiredIn int64
  12. Enabled int
  13. CreatedTime time.Time
  14. LastUpdatedTime time.Time
  15. }
  16. //添加用户session信息
  17. func AddMsgCode(item *MsgCode) (err error) {
  18. o := orm.NewOrm()
  19. o.Using("rddp")
  20. _, err = o.Insert(item)
  21. return
  22. }