Skip to content

Instantly share code, notes, and snippets.

@manakuro
Created January 17, 2020 02:35
Show Gist options
  • Save manakuro/2943aa5f489fa383c71107f1f3c5f9a7 to your computer and use it in GitHub Desktop.
Save manakuro/2943aa5f489fa383c71107f1f3c5f9a7 to your computer and use it in GitHub Desktop.
package model
import "time"
type User struct {
ID uint `gorm:"primary_key" json:"id"`
UUID string `json:"uuid"`
Email string `json:"email"`
CreatedAt *time.Time `json:"createdAt"`
UpdatedAt *time.Time `json:"updatedAt"`
DeletedAt *time.Time `json:"deletedAt"`
}
// TableName gets table name
func (u *User) TableName() string {
return "users"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment