Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Base ¶
type Base struct { ID string `json:"id" gorm:"type:uuid;primary_key" valid:"notnull,uuid"` CreatedAt time.Time `json:"created_at" valid:"required"` UpdatedAt time.Time `json:"updated_at" valid:"-"` }
Base represents a default entity
type User ¶
type User struct { Base `valid:"required"` Name string `json:"name" gorm:"type:varchar(255)" valid:"notnull"` Email string `json:"email" gorm:"type:varchar(255);unique_index" valid:"notnull,email"` Password string `json:"-" gorm:"type:varchar(255)" valid:"notnull"` Token string `json:"token" gorm:"type:varchar(255);unique_index" valid:"notnull,uuid"` }
User is a domain user
func (*User) IsCorrectPassword ¶
IsCorrectPassword compare password with hash
Click to show internal directories.
Click to hide internal directories.