user.go 334 B

123456789101112131415
  1. package model
  2. // User user model for login
  3. type User struct {
  4. ID int64 `json:"id" gorm:"AUTO_INCREMENT;primary_key;"`
  5. Name string `json:"name"`
  6. Email string `json:"email"`
  7. Accept int32 `json:"accept"`
  8. Active string `json:"active"`
  9. }
  10. // TableName get user model name
  11. func (u User) TableName() string {
  12. return "user"
  13. }