upcrmmodel

package
v0.0.0-...-83adff0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//DateStr date format
	DateStr = "2006-01-02"
	//CreditLogTableCount all credit log table count
	CreditLogTableCount = 100
)
View Source
const (
	//ScoreTypeQuality 1
	ScoreTypeQuality = 1 // 质量分
	//ScoreTypePr 2
	ScoreTypePr = 2 // 影响力分
	//ScoreTypeCredit 3
	ScoreTypeCredit = 3 // 信用分

	//UpScoreHistoryTableCount table count
	UpScoreHistoryTableCount = 100
)
View Source
const (
	//BusinessTypeArticleAudit 1
	BusinessTypeArticleAudit = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ArgCreditLogAdd

type ArgCreditLogAdd struct {
	Type         int             `form:"type" json:"type"`                    // 日志类型,具体与业务方确定
	OpType       int             `form:"op_type" json:"optype"`               // 操作类型,具体与业务方确定
	Reason       int             `form:"reason" json:"reason"`                // 原因类型,具体与业务方确定
	BusinessType int             `form:"bussiness_type" json:"business_type"` // 业务类型
	Mid          int64           `form:"mid" validate:"required" json:"mid"`  // 用户id
	Oid          int64           `form:"oid" json:"oid"`                      // 对象类型,如aid
	UID          int             `form:"uid" json:"uid"`                      // 管理员id
	Content      string          `form:"content" json:"content"`              // 日志内容描述
	CTime        time.Time       `form:"ctime" json:"ctime"`                  // 创建时间
	Extra        json.RawMessage `form:"extra" json:"extra,omitempty"`        // 额外字段,与业务方确定
}

ArgCreditLogAdd arg

type ArgGetLogHistory

type ArgGetLogHistory struct {
	Mid      int64        `form:"mid" validate:"required"`
	FromDate systime.Time `form:"from_date"`
	ToDate   systime.Time `form:"to_date"`
	Limit    int          `form:"limit" default:"20"`
}

ArgGetLogHistory arg

type ArgMidDate

type ArgMidDate struct {
	Mid       int64  `form:"mid" validate:"required"`
	Days      int    `form:"days"`                   // 最近n天内的数据,1表示最近1天(今天),2表示最近2天,默认为0
	FromDate  string `form:"from_date"`              // 2006-01-02
	ToDate    string `form:"to_date"`                // 2006-01-02
	ScoreType int    `form:"score_type" default:"3"` // 分数类型, 1,2,3,参见ScoreTypeCredit
}

ArgMidDate arg

type CreditLog

type CreditLog struct {
	ID           uint `gorm:"primary_key" json:"-"`
	Type         int
	OpType       int
	Reason       int
	BusinessType int
	Mid          int64
	Oid          int64
	UID          int `gorm:"column:uid"`
	Content      string
	CTime        time.Time `gorm:"column:ctime"`
	MTime        time.Time `gorm:"column:mtime"`
	Extra        string    `sql:"type:text;" json:"-"`
}

CreditLog db struct

func (*CreditLog) CopyFrom

func (c *CreditLog) CopyFrom(arg *ArgCreditLogAdd) *CreditLog

CopyFrom copy

func (*CreditLog) TableName

func (c *CreditLog) TableName() string

TableName table name

type GetScoreParam

type GetScoreParam struct {
	Mid       int64
	FromDate  systime.Time
	ToDate    systime.Time
	ScoreType int
}

GetScoreParam arg

type ScoreSectionHistory

type ScoreSectionHistory struct {
	ID           uint32
	GenerateDate time.Time `gorm:"column:generate_date"`
	ScoreType    int       `gorm:"column:score_type"`
	Section0     int       `gorm:"column:section_0"`
	Section1     int       `gorm:"column:section_1"`
	Section2     int       `gorm:"column:section_2"`
	Section3     int       `gorm:"column:section_3"`
	Section4     int       `gorm:"column:section_4"`
	Section5     int       `gorm:"column:section_5"`
	Section6     int       `gorm:"column:section_6"`
	Section7     int       `gorm:"column:section_7"`
	Section8     int       `gorm:"column:section_8"`
	Section9     int       `gorm:"column:section_9"`
	CTime        time.Time `gorm:"column:ctime"`
	MTime        time.Time `gorm:"column:mtime"`
}

ScoreSectionHistory score section db

type SimpleCreditLog

type SimpleCreditLog struct {
	ID           uint      `gorm:"primary_key" json:"-"`
	Type         int       `json:"type"`
	OpType       int       `json:"op_type"`
	Reason       int       `json:"reason"`
	BusinessType int       `json:"business_type"`
	Mid          int64     `json:"mid"`
	Oid          int64     `json:"oid"`
	CTime        time.Time `gorm:"column:ctime" json:"ctime"`
}

SimpleCreditLog db struct

func (*SimpleCreditLog) TableName

func (c *SimpleCreditLog) TableName() string

TableName table name

type SimpleCreditLogWithContent

type SimpleCreditLogWithContent struct {
	SimpleCreditLog
	Content string `form:"content" json:"content"` // 日志内容描述
}

SimpleCreditLogWithContent log with content

type UpBaseInfo

type UpBaseInfo struct {
	ID                     int32
	Mid                    int32
	Name                   string
	Sex                    int8
	JoinTime               time.Time
	FirstUpTime            time.Time
	Level                  int16
	FansCount              int
	AccountState           int
	Activity               int
	ArticleCount30day      int `gorm:"article_count_30day"`
	ArticleCountAccumulate int
	VerifyType             int8
	CTime                  time.Time `gorm:"ctime"`
	MTime                  time.Time `gorm:"mtim"`
	BusinessType           int8
	CreditScore            int
	PrScore                int
	QualityScore           int
	ActiveTid              int16
	Attr                   int
}

UpBaseInfo db struct

type UpScoreHistory

type UpScoreHistory struct {
	ID           uint      `gorm:"primary_key" json:"-"`
	Mid          int64     `json:"mid"`
	ScoreType    int       `json:"-"`
	Score        int       ` json:"score"`
	GenerateDate time.Time `json:"date"`
	CTime        time.Time `gorm:"column:ctime" json:"-"`
	MTime        time.Time `gorm:"column:mtime" json:"-"`
}

UpScoreHistory db struct

func (*UpScoreHistory) TableName

func (u *UpScoreHistory) TableName() string

TableName table name

Jump to

Keyboard shortcuts

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