Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IdentifiedModel ¶
type IdentifiedModel struct {
Id uuid.UUID `gorm:"primaryKey;type:uuid;default:gen_random_uuid()" json:"id"`
DateCreated time.Time `json:"dateCreated"`
DateUpdated time.Time `json:"dateUpdated"`
DateDeleted gorm.DeletedAt `gorm:"index" json:"dateDeleted"`
CreatedBy string `gorm:"type:varchar(255)" json:"createdBy"`
UpdatedBy string `gorm:"type:varchar(255)" json:"updatedBy"`
DeletedBy string `gorm:"type:varchar(255)" json:"deletedBy"`
}
func (*IdentifiedModel) BeforeCreate ¶
func (u *IdentifiedModel) BeforeCreate(tx *gorm.DB) (err error)
func (*IdentifiedModel) BeforeUpdate ¶
func (u *IdentifiedModel) BeforeUpdate(tx *gorm.DB) (err error)
type Organization ¶
type Organization struct {
IdentifiedModel
Name string `gorm:"type:varchar(255)" json:"name"`
}
Organization represents a base organization model. Users should extend this struct to provide additional details.
type SystemUser ¶
type SystemUser struct {
UserId uuid.UUID `gorm:"primaryKey;type:uuid;default:gen_random_uuid()" json:"userId"`
UserName string `gorm:"index" json:"userName"`
DateCreated time.Time `json:"dateCreated"`
DateUpdated time.Time `json:"dateUpdated"`
DateDeleted gorm.DeletedAt `gorm:"index" json:"dateDeleted"`
PrimaryOrganization uuid.UUID `json:"primaryOrganization"`
}
func (*SystemUser) BeforeCreate ¶
func (t *SystemUser) BeforeCreate(tx *gorm.DB) (err error)
func (*SystemUser) BeforeUpdate ¶
func (t *SystemUser) BeforeUpdate(tx *gorm.DB) (err error)
func (*SystemUser) TableName ¶
func (t *SystemUser) TableName() string
type SystemUserOrganization ¶
type SystemUserOrganization struct {
IdentifiedModel
SystemUserId uuid.UUID `gorm:"index;column:system_user" json:"-"`
SystemUser SystemUser `json:"systemUser"`
OrganizationId uuid.UUID `gorm:"index;column:organization" json:"-"`
Organization Organization `json:"organization"`
UserRole SystemUserRole `gorm:"index" json:"userRole"`
}
type SystemUserRole ¶
type SystemUserRole string
const ( Owner SystemUserRole = "owner" Member SystemUserRole = "member" Admin SystemUserRole = "admin" )
func (*SystemUserRole) Scan ¶
func (s *SystemUserRole) Scan(value interface{}) error
Implement the Scanner interface for the enum type
type UserPreferences ¶
type UserPreferences struct {
IdentifiedModel
SystemUserId uuid.UUID `gorm:"index;column:system_user" json:"-"`
SystemUser SystemUser `json:"systemUser"`
Preferences map[string]interface{} `gorm:"type:json"`
}
Click to show internal directories.
Click to hide internal directories.