biz

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Notice

type Notice struct {
	Id        int64
	Title     string
	Content   string
	Sort      int64
	StartTime time.Time
	EndTime   time.Time

	CreatedAt time.Time
	UpdatedAt time.Time
}

type NoticeRepo

type NoticeRepo interface {
	GetList(ctx context.Context, index, size int64) ([]*Notice, error)
	Count(ctx context.Context) (int64, error)
	GetById(ctx context.Context, id int64) (*Notice, error)
	UpdateById(ctx context.Context, notice *Notice) error
	Insert(ctx context.Context, notice *Notice) error
	DeleteById(ctx context.Context, id int64) error
}

type NoticeUseCase

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

func NewNoticeUseCase

func NewNoticeUseCase(repo NoticeRepo, logger log.Logger) *NoticeUseCase

func (*NoticeUseCase) Count

func (uc *NoticeUseCase) Count(ctx context.Context) (int64, error)

func (*NoticeUseCase) Create

func (uc *NoticeUseCase) Create(ctx context.Context, notice *Notice) error

func (*NoticeUseCase) Delete

func (uc *NoticeUseCase) Delete(ctx context.Context, id int64) error

func (*NoticeUseCase) GetById

func (uc *NoticeUseCase) GetById(ctx context.Context, id int64) (*Notice, error)

func (*NoticeUseCase) GetList

func (uc *NoticeUseCase) GetList(ctx context.Context, index, size int64) (list []*Notice, count int64, err error)

func (*NoticeUseCase) Update

func (uc *NoticeUseCase) Update(ctx context.Context, notice *Notice) error

Jump to

Keyboard shortcuts

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