full

package
v0.0.0-...-4215b1c Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2025 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CollectionName = "full"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IMongoMapper

type IMongoMapper interface {
	Insert(ctx context.Context, i *Interface) error
	Update(ctx context.Context, i *Interface) error
	FindAndCountByUserId(ctx context.Context, userId string, p *basic.PaginationOptions) ([]*Interface, int64, error)
	FindOne(ctx context.Context, id string) (*Interface, error)
	FindOneByBaseInfIdAndUserId(ctx context.Context, baseInfId string, userId string) (*Interface, error)
	Delete(ctx context.Context, id string) error
}

type Interface

type Interface struct {
	ID              primitive.ObjectID `bson:"_id,omitempty" json:"id,omitempty"`
	BaseInterfaceId string             `bson:"base_interface_id" json:"baseInterfaceId"`
	UserId          string             `bson:"user_id" json:"userId"`
	ChargeType      int64              `bson:"charge_type" json:"chargeType"`
	Price           int64              `bson:"price" json:"price"`
	Status          int64              `bson:"status" json:"status"`
	CreateTime      time.Time          `bson:"create_time" json:"createTime"`
	UpdateTime      time.Time          `bson:"update_time" json:"updateTime"`
	DeleteTime      time.Time          `bson:"delete_time,omitempty" json:"deleteTime,omitempty"`
}

type MongoMapper

type MongoMapper struct {
	// contains filtered or unexported fields
}

func NewMongoMapper

func NewMongoMapper(config *config.Config) *MongoMapper

func (*MongoMapper) Delete

func (m *MongoMapper) Delete(ctx context.Context, id string) error

func (*MongoMapper) FindAndCountByUserId

func (m *MongoMapper) FindAndCountByUserId(ctx context.Context, userId string, p *basic.PaginationOptions) ([]*Interface, int64, error)

func (*MongoMapper) FindOne

func (m *MongoMapper) FindOne(ctx context.Context, id string) (*Interface, error)

func (*MongoMapper) FindOneByBaseInfIdAndUserId

func (m *MongoMapper) FindOneByBaseInfIdAndUserId(ctx context.Context, baseInfId string, userId string) (*Interface, error)

func (*MongoMapper) Insert

func (m *MongoMapper) Insert(ctx context.Context, i *Interface) (string, error)

func (*MongoMapper) Update

func (m *MongoMapper) Update(ctx context.Context, i *Interface) error

Jump to

Keyboard shortcuts

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