| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- package db
- import (
- dbFacade "f1-game/internal/component/db/facade"
- "f1-game/internal/enum"
- nameDB "f1-game/internal/name/db"
- "go.mongodb.org/mongo-driver/v2/mongo"
- )
- type (
- // ComplaintTable 举报信息表
- ComplaintTable struct {
- ComplaintID int64 `bson:"ComplaintID,omitempty"` // 举报唯一ID
- PlayerID int64 `bson:"PlayerID,omitempty"` // 举报人
- TargetID int64 `bson:"TargetID,omitempty"` // 被举报对象
- Type enum.ComplaintType `bson:"Type,omitempty"` // 举报类型 1.垃圾广告 2.举报外挂 3.不良发言,4.不法行为,5.不雅昵称,6.广告拉人,7.举报其他
- Content string `bson:"Content,omitempty"` // 举报内容
- dbFacade.TableBase `bson:",inline"`
- }
- )
- func (p *ComplaintTable) TableName() string {
- return nameDB.Table_Complaint
- }
- func (p *ComplaintTable) PrimaryValue() any {
- return p.ComplaintID
- }
- func (p *ComplaintTable) Indexes() []mongo.IndexModel {
- return nil
- }
- func (p *ComplaintTable) Save2Queue() {
- save2Queue(p)
- }
- func NewComplaintTable(complaintID, playerID, targetID int64, complaintType enum.ComplaintType, content string) *ComplaintTable {
- return &ComplaintTable{
- ComplaintID: complaintID,
- PlayerID: playerID,
- TargetID: targetID,
- Type: complaintType,
- Content: content,
- }
- }
|