Skip to content

Instantly share code, notes, and snippets.

@manakuro
Created November 7, 2019 01:59
Show Gist options
  • Save manakuro/1b74e23341aa14936c1a7e31e5b67c76 to your computer and use it in GitHub Desktop.
Save manakuro/1b74e23341aa14936c1a7e31e5b67c76 to your computer and use it in GitHub Desktop.
package model
import "time"
type User struct {
ID uint `gorm:"primary_key" json:"id"`
Name string `json:"name"`
Age string `json:"age"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt time.Time `json:"deleted_at"`
}
func (User) TableName() string { return "users" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment