dao

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OrderCollection = "c_order"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Order

type Order struct {
	Id                int64                  `bson:"id"`
	TemplateId        int64                  `bson:"template_id"`
	TemplateName      string                 `bson:"template_name"`
	WorkflowId        int64                  `bson:"workflow_id"`
	ProcessInstanceId int                    `bson:"process_instance_id"`
	CreateBy          string                 `bson:"create_by"`
	Provide           uint8                  `json:"provide"`
	Data              map[string]interface{} `bson:"data"`
	Status            uint8                  `bson:"status"`
	Ctime             int64                  `bson:"ctime"`
	Wtime             int64                  `json:"wtime"`
	Utime             int64                  `bson:"utime"`
}

type OrderDAO

type OrderDAO interface {
	CreateOrder(ctx context.Context, r Order) (int64, error)
	DetailByProcessInstId(ctx context.Context, instanceId int) (Order, error)
	Detail(ctx context.Context, id int64) (Order, error)
	RegisterProcessInstanceId(ctx context.Context, id int64, instanceId int, status uint8) error
	ListOrderByProcessInstanceIds(ctx context.Context, instanceIds []int) ([]Order, error)
	UpdateStatusByInstanceId(ctx context.Context, instanceId int, status uint8) error
	ListOrder(ctx context.Context, userId string, status []int, offset, limit int64) ([]Order, error)
	CountOrder(ctx context.Context, userId string, status []int) (int64, error)
}

func NewOrderDAO

func NewOrderDAO(db *mongox.Mongo) OrderDAO

Jump to

Keyboard shortcuts

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