Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Zone ¶
type Zone struct {
ID uint64 `json:"id"`
Codename string `json:"codename" gorm:"unique_index"`
Title string `json:"title"`
Description string `json:"description"`
AccountID uint64 `json:"account_id,omitempty"`
Type types.ZoneType `gorm:"type:ZoneType" json:"type,omitempty"`
Status types.ApproveStatus `gorm:"type:ApproveStatus" json:"status"`
Active types.ActiveStatus `gorm:"type:ActiveStatus" json:"active"`
DefaultCode gosql.NullableJSON[map[string]string] `gorm:"type:JSONB" json:"default_code,omitempty"`
Context gosql.NullableJSON[map[string]any] `gorm:"type:JSONB" json:"context,omitempty"`
MinECPM float64 `json:"min_ecpm,omitempty"`
MinECPMByGeo gosql.NullableJSON[map[string]float64] `gorm:"type:JSONB" json:"min_ecpm_by_geo,omitempty"`
// The cost of the traffic acceptance
FixedPurchasePrice float64 `json:"fixed_purchase_price,omitempty"`
// Filtering
AllowedFormats gosql.NullableStringArray `gorm:"type:TEXT[]" json:"allowed_formats,omitempty"`
AllowedTypes gosql.NullableOrderedNumberArray[uint64] `gorm:"type:BIGINT[]" json:"allowed_types,omitempty"`
AllowedSources gosql.NullableOrderedNumberArray[uint64] `gorm:"type:BIGINT[]" json:"allowed_sources,omitempty"`
DisallowedSources gosql.NullableOrderedNumberArray[uint64] `gorm:"type:BIGINT[]" json:"disallowed_sources,omitempty"`
// Strict campaigns targeting (smartlinks only)
Campaigns gosql.NullableOrderedNumberArray[uint64] `gorm:"type:BIGINT[]" json:"campaigns,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt gorm.DeletedAt `json:"deleted_at,omitempty"`
}
Zone model
func (*Zone) GetAccountID ¶
GetAccountID returns the account ID
func (*Zone) RBACResourceName ¶
RBACResourceName returns the name of the resource for the RBAC
Click to show internal directories.
Click to hide internal directories.