45 lines
1.3 KiB
Go
45 lines
1.3 KiB
Go
package dsp
|
|
|
|
import (
|
|
"github.com/gogf/gf/v2/os/gtime"
|
|
|
|
"gitea.redpowerfuture.com/red-future/common/beans"
|
|
)
|
|
|
|
// BidRequestLog RTB请求日志实体(高并发,按day分区,可裁剪)
|
|
type BidRequestLog struct {
|
|
beans.SQLBaseDO `orm:",inherit"`
|
|
// 业务字段
|
|
RequestID string `orm:"request_id" json:"requestId" description:"请求ID(去重键)"`
|
|
SlotID int64 `orm:"slot_id" json:"slotId" description:"广告位ID"`
|
|
DeviceID string `orm:"device_id" json:"deviceId" description:"设备ID"`
|
|
IP string `orm:"ip" json:"ip" description:"请求IP"`
|
|
UA string `orm:"ua" json:"ua" description:"用户代理"`
|
|
Extra string `orm:"extra" json:"extra" description:"上下文/定向特征(JSON)"`
|
|
Day *gtime.Time `orm:"day" json:"day" description:"分区日期"`
|
|
}
|
|
|
|
// BidRequestLogCol RTB请求日志表字段定义
|
|
type BidRequestLogCol struct {
|
|
beans.SQLBaseCol
|
|
RequestID string
|
|
SlotID string
|
|
DeviceID string
|
|
IP string
|
|
UA string
|
|
Extra string
|
|
Day string
|
|
}
|
|
|
|
// BidRequestLogCols RTB请求日志表字段常量
|
|
var BidRequestLogCols = BidRequestLogCol{
|
|
SQLBaseCol: beans.DefSQLBaseCol,
|
|
RequestID: "request_id",
|
|
SlotID: "slot_id",
|
|
DeviceID: "device_id",
|
|
IP: "ip",
|
|
UA: "ua",
|
|
Extra: "extra",
|
|
Day: "day",
|
|
}
|