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: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FormatTypeDirect = `direct`
	FormatTypeVideo  = `video`
	FormatTypeProxy  = `proxy`
	FormatTypeNative = `native`
	FormatTypeBanner = `banner`
)

Format types

Variables

This section is empty.

Functions

This section is empty.

Types

type Format

type Format struct {
	ID       uint64 `json:"id" gorm:"primaryKey"`
	Codename string `json:"codename"`
	Type     string `json:"type"`

	Title       string `json:"title"`
	Description string `json:"description"`

	Active types.ActiveStatus `gorm:"type:ActiveStatus" json:"active,omitempty"`

	Width     int `json:"width,omitempty"`
	Height    int `json:"height,omitempty"`
	MinWidth  int `json:"min_width,omitempty"`
	MinHeight int `json:"min_height,omitempty"`

	Config gosql.NullableJSON[types.FormatConfig] `gorm:"type:JSONB" json:"config,omitempty"`

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

Format model description

func (Format) IsBanner

func (f Format) IsBanner() bool

IsBanner type of format

func (Format) IsDirect

func (f Format) IsDirect() bool

IsDirect type (popunder or proxy or etc.)

func (*Format) IsFixed

func (f *Format) IsFixed() bool

IsFixed format

func (Format) IsNative

func (f Format) IsNative() bool

IsNative type of format

func (Format) IsProxy

func (f Format) IsProxy() bool

IsProxy type of format

func (*Format) IsStretch

func (f *Format) IsStretch() bool

IsStretch format

func (Format) IsVideo

func (f Format) IsVideo() bool

IsVideo type of advertisement

func (*Format) RBACResourceName

func (f *Format) RBACResourceName() string

RBACResourceName returns the name of the resource for the RBAC

func (*Format) TableName

func (f *Format) TableName() string

TableName in database

Jump to

Keyboard shortcuts

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