Documentation
¶
Index ¶
Constants ¶
View Source
const ( OrderUndefined = models.OrderUndefined OrderAsc = models.OrderAsc OrderDesc = models.OrderDesc )
Order constants define the sort direction
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option struct {
Type OptionType `json:"type"` // Type of option
TargetID uint64 `json:"target_id"` // ID of the target entity
Name string `json:"name"` // Option name
Value gosql.NullableJSON[any] `json:"value" gorm:"type:jsonb"` // JSON value
CreatedAt time.Time `db:"created_at"` // Creation timestamp
UpdatedAt time.Time `db:"updated_at"` // Last update timestamp
DeletedAt gorm.DeletedAt `db:"deleted_at"` // Soft delete timestamp
}
Option represents a configuration option with associated metadata
func (*Option) CreatorUserID ¶
CreatorUserID returns the user ID if this option is a user option
func (*Option) OwnerAccountID ¶
OwnerAccountID returns the account ID if this option is an account option
func (*Option) RBACResourceName ¶
RBACResourceName returns the RBAC resource name for authorization
type OptionType ¶
type OptionType string
OptionType defines the type of option
const ( UndefinedOptionType OptionType = "undefined" UserOptionType OptionType = "user" AccountOptionType OptionType = "account" SystemOptionType OptionType = "system" )
OptionType constants represent different option categories
Click to show internal directories.
Click to hide internal directories.