models

package
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 8, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

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

func (o *Option) CreatorUserID() uint64

CreatorUserID returns the user ID if this option is a user option

func (*Option) OwnerAccountID

func (o *Option) OwnerAccountID() uint64

OwnerAccountID returns the account ID if this option is an account option

func (*Option) RBACResourceName

func (o *Option) RBACResourceName() string

RBACResourceName returns the RBAC resource name for authorization

func (*Option) TableName

func (o *Option) TableName() string

TableName specifies the database table name for Option

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

type Order

type Order = models.Order

Order is an alias for the Order type from the models package

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL