job

package
v1.0.16 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetJobRequest added in v1.0.15

type GetJobRequest struct {
	Id      *uint32 `json:"id"`
	Keyword *string `json:"keyword"`
}

type Job

type Job struct {
	Id          uint32  `json:"id"`
	Keyword     string  `json:"keyword"`
	Name        string  `json:"name"`
	Weight      *int32  `json:"weight"`
	Description *string `json:"description"`
	CreatedAt   int64   `json:"createdAt"`
	UpdatedAt   int64   `json:"updatedAt"`
}

type ListJobRequest added in v1.0.15

type ListJobRequest struct {
	Page     uint32  `json:"page"`
	PageSize uint32  `json:"pageSize"`
	Order    *string `json:"order"`
	OrderBy  *string `json:"orderBy"`
	Keyword  *string `json:"keyword"`
	Name     *string `json:"name"`
}

type Repo

type Repo interface {
	// ListJob 获取职位信息列表
	ListJob(ctx kratosx.Context, req *ListJobRequest) ([]*Job, uint32, error)

	// CreateJob 创建职位信息
	CreateJob(ctx kratosx.Context, req *Job) (uint32, error)

	// UpdateJob 更新职位信息
	UpdateJob(ctx kratosx.Context, req *Job) error

	// DeleteJob 删除职位信息
	DeleteJob(ctx kratosx.Context, ids []uint32) (uint32, error)

	// GetJob 获取指定的职位信息
	GetJob(ctx kratosx.Context, id uint32) (*Job, error)

	// GetJobByKeyword 获取指定的职位信息
	GetJobByKeyword(ctx kratosx.Context, keyword string) (*Job, error)
}

type UseCase

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

func NewUseCase

func NewUseCase(config *conf.Config, repo Repo) *UseCase

func (*UseCase) CreateJob added in v1.0.15

func (u *UseCase) CreateJob(ctx kratosx.Context, req *Job) (uint32, error)

CreateJob 创建职位信息

func (*UseCase) DeleteJob

func (u *UseCase) DeleteJob(ctx kratosx.Context, ids []uint32) (uint32, error)

DeleteJob 删除职位信息

func (*UseCase) GetJob added in v1.0.15

func (u *UseCase) GetJob(ctx kratosx.Context, req *GetJobRequest) (*Job, error)

GetJob 获取指定的职位信息

func (*UseCase) ListJob added in v1.0.15

func (u *UseCase) ListJob(ctx kratosx.Context, req *ListJobRequest) ([]*Job, uint32, error)

ListJob 获取职位信息列表

func (*UseCase) UpdateJob

func (u *UseCase) UpdateJob(ctx kratosx.Context, req *Job) error

UpdateJob 更新职位信息

Jump to

Keyboard shortcuts

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