You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
416 B

10 years ago
  1. package models
  2. import "time"
  3. // OT: Oauth2 Type
  4. const (
  5. OT_GITHUB = iota + 1
  6. OT_GOOGLE
  7. OT_TWITTER
  8. )
  9. type Oauth2 struct {
  10. Uid int64 `xorm:"pk"` // userId
  11. Type int `xorm:"pk unique(oauth)"` // twitter,github,google...
  12. Identity string `xorm:"pk unique(oauth)"` // id..
  13. Token string `xorm:"VARCHAR(200) not null"`
  14. RefreshTime time.Time `xorm:"created"`
  15. }