Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Base ¶
type Base struct { ID int64 `gorm:"primaryKey" json:"id,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` // DeletedAt shouldn't be used for json encoding, since sql.NullTime doesn't implement json literals // and it should exist the moment users access the resource. DetetedAt sql.NullTime `gorm:"index" json:"-"` }
type GroupJoinCode ¶
link to join groups
type GroupUser ¶
type GroupUser struct { Base Group Group GroupID int64 `gorm:"not null"` User User UserID int64 `gorm:"not null"` }
users of a group
type User ¶
type User struct { Base ID int64 `json:"id,omitempty"` Name string `json:"name,omitempty"` Email string `json:"email,omitempty"` Username string `json:"username,omitempty"` PasswordHash []byte `json:"password_hash,omitempty"` HaveGroup bool `gorm:"default:false" json:"have_group,omitempty"` GroupID int64 `json:"group_id,omitempty"` }
Click to show internal directories.
Click to hide internal directories.