user.go 203 B

12345678910111213
  1. package model
  2. import "gorm.io/gorm"
  3. type User struct {
  4. gorm.Model
  5. Username string `gorm:"not null"`
  6. Email string `gorm:"unique;not null"`
  7. }
  8. func (u *User) TableName() string {
  9. return "users"
  10. }