models

package
v0.2.0 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

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category struct {
	ID          uint64 `json:"id" gorm:"primaryKey"`
	Name        string `json:"name"`
	Description string `json:"description"`

	IABCode string `json:"iab_code"` // IAB category code of OpenRTB

	ParentID  sql.Null[uint64] `json:"parent_id" gorm:"column:parent_id"`
	Parent    *Category        `json:"parent,omitempty" gorm:"foreignKey:parent_id;references:ID"`
	Childrens []*Category      `json:"childrens,omitempty" gorm:"foreignKey:parent_id;references:ID"`
	Position  uint64           `json:"position"`

	// Is Active advertisement
	Active types.ActiveStatus `gorm:"type:ActiveStatus" json:"active"`

	// Time marks
	CreatedAt time.Time      `json:"created_at"`
	UpdatedAt time.Time      `json:"updated_at"`
	DeletedAt gorm.DeletedAt `json:"deleted_at,omitempty"`
}

Category model description

func (*Category) RBACResourceName

func (c *Category) RBACResourceName() string

RBACResourceName returns the name of the resource for the RBAC

func (*Category) TableName

func (c *Category) TableName() string

TableName in database

Jump to

Keyboard shortcuts

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