Created
January 17, 2020 02:35
-
-
Save manakuro/2943aa5f489fa383c71107f1f3c5f9a7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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