Documentation ¶
Index ¶
- type App
- type Campaign
- type CampaignData
- type CampaignDataSuper
- type CampaignSuper
- type Campaign_Status
- type ListCampaign
- type Media
- type MediaPosition
- type MediaPositionInfo
- type Position
- type SelectCampaignData
- type UpdateNotify
- type UpdateNotify_EntityType
- type UpdateNotify_OperationType
- type UpdateNotify_Transaction
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶ added in v1.2.4
type App struct { Id int64 `json:"-" gorm:"column:id;primaryKey;autoIncrement;not null;comment:主键"` Name string `json:"name" gorm:"column:name;type:varchar(200);not null;default:'';comment:名称"` Key string `json:"key" gorm:"-"` }
* *@authoer:singham<chenxiao.zhao> *@createDate:2023/7/11 *@description:
type Campaign ¶
type Campaign struct { Id int64 `json:"id" gorm:"column:id;primaryKey;autoIncrement;not null;comment:主键"` UserId int64 `json:"user_id" gorm:"column:user_id;type:bigint(20);not null;default:0;comment:用户id"` Os string `json:"os" gorm:"column:os;type:varchar(20);not null;default:0;comment:系统类型,ios/android"` AdType int `` /* 181-byte string literal not displayed */ AdStyle int `` /* 189-byte string literal not displayed */ AdSize string ` json:"ad_size" gorm:"column:ad_size;type:varchar(50);comment:广告尺寸"` Name string `json:"name" gorm:"column:name;type:varchar(200);not null;default:'';comment:名称"` StartTime *time.Time `json:"start_time" gorm:"column:start_time;type:datetime;comment:开始时间"` EndTime *time.Time `json:"end_time" gorm:"column:end_time;type:datetime;comment:结束时间"` Title string `json:"title" gorm:"column:title;type:varchar(200);not null;default:'';comment:广告title"` Desc string ` json:"desc" gorm:"column:desc;type:varchar(200);not null;default:'';comment:广告描述"` ImageUrls string `json:"image_urls" gorm:"column:image_urls;type:text;comment:广告图片,逗号间隔"` ClickUrl string `json:"click_url" gorm:"column:click_url;type:text;comment:点击检测连接,逗号间隔"` DeeplinkUrl string `json:"deeplink_url" gorm:"column:deeplink_url;type:text;comment:deeplink_url"` MediaType string `json:"media_type" gorm:"column:media_type;type:varchar(20);comment:媒体类型数组,逗号间隔"` MediaPositionIds string `json:"media_position_ids" gorm:"column:media_position_ids;type:text;comment:媒体广告位id数组,json数组"` InstallApps string `json:"install_apps" gorm:"column:install_apps;type:varchar(200);not null;comment:安装app包名,逗号间隔"` Area string `json:"area" gorm:"column:area;type:text;comment:地域定向,逗号间隔"` Gender int `json:"gender" gorm:"column:gender;type:int(1);not null;default:0;comment:性别,0不限,1男,2女"` Age string `` /* 181-byte string literal not displayed */ Price float64 `json:"price" gorm:"column:price;type:decimal(10,2);not null;default:0;comment:出价 分"` Budget float64 `json:"budget" gorm:"column:budget;type:decimal(10,2);not null;default:0;comment:日预算分"` TotalBudget float64 `json:"total_budget" gorm:"column:total_budget;type:decimal(10,2);not null;default:0;comment:总预算分"` PromotionTime string `` /* 340-byte string literal not displayed */ CreateAt time.Time `json:"create_at" gorm:"autoCreateTime;column:create_at"` //创建时间 UpdateAt time.Time `json:"update_at" gorm:"autoUpdateTime;column:update_at"` //更新时间 //状态 0:审核通过,待启动 1:投放中,3、已删除 4:已暂停 Status Campaign_Status `` /* 150-byte string literal not displayed */ MediaPositionInfos []MediaPositionInfo `json:"media_position_infos" gorm:"-"` }
Campaign 广告计划
func (*Campaign) GetStatus ¶ added in v1.0.6
func (c *Campaign) GetStatus() Campaign_Status
get status
type CampaignData ¶
type CampaignData struct { //点击率 Ctr string `json:"ctr" gorm:"-"` CampaignId int64 `` /* 151-byte string literal not displayed */ Date time.Time `` /* 137-byte string literal not displayed */ MediaID string `` /* 159-byte string literal not displayed */ DateStr string `json:"date_str" gorm:"-"` Burnt float64 `json:"burnt" gorm:"column:burnt;type:decimal(10,2);not null;comment:消耗"` Fill int64 `json:"fill" gorm:"column:fill;type:bigint(20);not null;comment:填充数"` Impression int64 `json:"impression" gorm:"column:impression;type:bigint(20);not null;comment:展示"` Click int64 `json:"click" gorm:"column:click;type:bigint(20);not null;comment:点击"` Awaken int64 `json:"awaken" gorm:"column:awaken;type:bigint(20);not null;comment:唤起"` // contains filtered or unexported fields }
* *@authoer:singham<chenxiao.zhao> *@createDate:2023/6/19 *@description:
type CampaignDataSuper ¶
type CampaignDataSuper struct { // 以下字段为了方便查询,campaign表中的字段 Name string `json:"name" gorm:"column:name;type:varchar(200);not null;default:'';comment:名称"` Os string `json:"os" gorm:"column:os;type:varchar(20);not null;default:0;comment:系统类型,ios/android"` AdType int `` /* 180-byte string literal not displayed */ AdStyle int `` /* 188-byte string literal not displayed */ }
type CampaignSuper ¶ added in v1.0.9
type CampaignSuper struct { Ctr string `json:"ctr" gorm:"-"` Burnt float64 `json:"burnt" gorm:"column:burnt;type:decimal(10,2);not null;comment:消耗"` Impression int64 `json:"impression" gorm:"column:impression;type:bigint(20);not null;comment:展示"` Click int64 `json:"click" gorm:"column:click;type:bigint(20);not null;comment:点击"` Awaken int64 `json:"awaken" gorm:"column:awaken;type:bigint(20);not null;comment:唤起"` }
type Campaign_Status ¶ added in v1.0.5
type Campaign_Status int32
const ( //0:审核通过,待启动 1:投放中, 4:已暂停 Campaign_Status_UNKNOWN Campaign_Status = 0 Campaign_Status_Active Campaign_Status = 1 Campaign_Status_Delete Campaign_Status = 3 Campaign_Status_Stop Campaign_Status = 4 )
type ListCampaign ¶ added in v1.0.9
type ListCampaign struct { Campaign CampaignSuper }
type Media ¶ added in v1.2.4
type MediaPosition ¶ added in v1.2.4
type MediaPosition struct { Media Children []*Position `json:"children" gorm:"foreignKey:MediaId;references:Id"` }
* *@authoer:singham<chenxiao.zhao> *@createDate:2023/7/11 *@description:
type MediaPositionInfo ¶ added in v1.2.4
type Position ¶ added in v1.2.4
type Position struct { Id int64 `json:"id" gorm:"column:id;primaryKey;autoIncrement;not null;comment:主键"` Name string `json:"label" gorm:"column:name;type:varchar(200);not null;default:'';comment:名称"` MediaId int64 `json:"-" gorm:"column:media_id;type:bigint(20);not null;comment:媒体id;index:index_media_id;index:idx_position_media_id"` MediaName string `json:"media_name"` }
* *@authoer:singham<chenxiao.zhao> *@createDate:2023/7/11 *@description:
type SelectCampaignData ¶
type SelectCampaignData struct { CampaignData CampaignDataSuper }
type UpdateNotify ¶ added in v1.0.3
type UpdateNotify struct {
Transaction *UpdateNotify_Transaction `json:"transaction" gorm:"column:transaction"`
}
* *@authoer:singham<chenxiao.zhao> *@createDate:2023/6/19 *@description:
type UpdateNotify_EntityType ¶ added in v1.0.3
type UpdateNotify_EntityType int32
const ( UpdateNotify_Table_Campaign UpdateNotify_EntityType = 1 //活动推广表 UpdateNotify_INVERTED_Campaign UpdateNotify_EntityType = 2 //活动推广倒排索引 )
type UpdateNotify_OperationType ¶ added in v1.0.3
type UpdateNotify_OperationType int32
const ( UpdateNotify_insert UpdateNotify_OperationType = 0 UpdateNotify_Update UpdateNotify_OperationType = 1 )
type UpdateNotify_Transaction ¶ added in v1.0.3
type UpdateNotify_Transaction struct { Type UpdateNotify_EntityType `json:"type" gorm:"column:type"` // 更新的实体类型 Size int32 ` json:"size" gorm:"column:size"` // 数据keys的大小 Keys []string ` json:"keys" gorm:"column:keys"` // keys。如果是正排表,key就是实体的ID;如果是倒排表,key为倒排项(词) Message string ` json:"message" gorm:"column:message"` // 实体内容,主服务向后台推送数据时使用 Ids []string ` json:"ids" gorm:"column:ids"` // ids。如果是删除操作,则这里有值,方便引擎删除内存 OperationType UpdateNotify_OperationType `json:"operation_type" gorm:"column:operation_type"` // 操作类型 }
type User ¶
type User struct { // 主键 Id int64 `json:"id" gorm:"column:id;primaryKey;autoIncrement;not null;comment:主键"` UserName string `json:"user_name" gorm:"column:user_name;type:varchar(20);not null;default:'';comment:用户名"` Password string `json:"password,omitempty" gorm:"column:password;type:varchar(20);not null;default:'';comment:密码"` // 状态 0:正常 1:禁用 2:删除 Status int `json:"status" gorm:"column:status;type:int(1);not null;default:0;comment:状态"` CreateAt time.Time `json:"create_at" gorm:"autoCreateTime;column:create_at"` //创建时间 UpdateAt time.Time `json:"update_at" gorm:"autoUpdateTime;column:update_at"` //更新时间 }
* *@authoer:singham<chenxiao.zhao> *@createDate:2023/6/18 *@description:
Click to show internal directories.
Click to hide internal directories.