dao

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IOrderDao

type IOrderDao interface {
	Insert(ctx context.Context, orders ...*model.Order) (err error)
	FindOne(ctx context.Context, condition *model.OrderOption) (order *model.Order, err error)
	FindList(ctx context.Context, condition *model.OrderOption) (orders []model.Order, total int64, err error)
	Count(ctx context.Context, condition *model.OrderOption) (count int64, err error)
	Save(ctx context.Context, order *model.Order) (err error)
	Update(ctx context.Context, updated, condition *model.OrderOption) (err error)
	Delete(ctx context.Context, condition *model.OrderOption) (err error)
}

type IUserDao

type IUserDao interface {
	Insert(ctx context.Context, users ...*model.User) (err error)
	FindOne(ctx context.Context, condition *model.UserOption) (user *model.User, err error)
	FindList(ctx context.Context, condition *model.UserOption) (users []model.User, total int64, err error)
	Count(ctx context.Context, condition *model.UserOption) (count int64, err error)
	Save(ctx context.Context, user *model.User) (err error)
	Update(ctx context.Context, updated, condition *model.UserOption) (err error)
	Delete(ctx context.Context, condition *model.UserOption) (err error)
}

type OrderDao

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

func NewOrderDao

func NewOrderDao(db *gorm.DB) *OrderDao

func (*OrderDao) Count

func (m *OrderDao) Count(ctx context.Context, condition *model.OrderOption) (count int64, err error)

func (*OrderDao) Delete

func (m *OrderDao) Delete(ctx context.Context, condition *model.OrderOption) (err error)

func (*OrderDao) Error

func (m *OrderDao) Error(db *gorm.DB) error

func (*OrderDao) FindList

func (m *OrderDao) FindList(ctx context.Context, condition *model.OrderOption) (orders []model.Order, total int64, err error)

func (*OrderDao) FindOne

func (m *OrderDao) FindOne(ctx context.Context, condition *model.OrderOption) (order *model.Order, err error)

func (*OrderDao) Insert

func (m *OrderDao) Insert(ctx context.Context, orders ...*model.Order) (err error)

func (*OrderDao) Save

func (m *OrderDao) Save(ctx context.Context, order *model.Order) (err error)

func (*OrderDao) Update

func (m *OrderDao) Update(ctx context.Context, updated, condition *model.OrderOption) (err error)

type UserDao

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

func NewUserDao

func NewUserDao(db *gorm.DB) *UserDao

func (*UserDao) Count

func (m *UserDao) Count(ctx context.Context, condition *model.UserOption) (count int64, err error)

func (*UserDao) Delete

func (m *UserDao) Delete(ctx context.Context, condition *model.UserOption) (err error)

func (*UserDao) Error

func (m *UserDao) Error(db *gorm.DB) error

func (*UserDao) FindList

func (m *UserDao) FindList(ctx context.Context, condition *model.UserOption) (users []model.User, total int64, err error)

func (*UserDao) FindOne

func (m *UserDao) FindOne(ctx context.Context, condition *model.UserOption) (user *model.User, err error)

func (*UserDao) Insert

func (m *UserDao) Insert(ctx context.Context, users ...*model.User) (err error)

func (*UserDao) Save

func (m *UserDao) Save(ctx context.Context, user *model.User) (err error)

func (*UserDao) Update

func (m *UserDao) Update(ctx context.Context, updated, condition *model.UserOption) (err error)

Jump to

Keyboard shortcuts

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