msg

package
v0.0.0-...-3363d21 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MsgSet = wire.NewSet(wire.Struct(new(MsgRepo), "*"))

Functions

func GetNoticeDB

func GetNoticeDB(ctx context.Context, defDB *gorm.DB) *gorm.DB

Types

type MsgRepo

type MsgRepo struct {
	DB *gorm.DB
}

func (*MsgRepo) Create

func (m *MsgRepo) Create(ctx context.Context, model *Notice) error

func (*MsgRepo) Delete

func (m *MsgRepo) Delete(ctx context.Context, id uint64) error

func (*MsgRepo) Get

func (m *MsgRepo) Get(ctx context.Context, id uint64) (*Notice, error)

func (*MsgRepo) GetPage

func (m *MsgRepo) GetPage(ctx context.Context, pageNum, pageSize int) (*[]*Notice, int64, error)

func (*MsgRepo) Update

func (m *MsgRepo) Update(ctx context.Context, model *Notice) error

type Notice

type Notice struct {
	ID        uint64     `gorm:"primary_key;AUTO_INCREMENT;NOT NULL;"`
	CreatedAt types.Time `gorm:"column:created_at;type:dateTime;comment:'创建时间';"`
	StartTime types.Time `gorm:"column:start_time;type:dateTime;comment:'开始时间';"`
	EndTime   types.Time `gorm:"column:end_time;type:dateTime;comment:'结束时间';"`
	Title     string     `gorm:"column:title;comment:'标题';"`
	Content   string     `gorm:"column:content;comment:'内容';"`
	Operator  string     `gorm:"column:operator;comment:'操作者';"`
}

Jump to

Keyboard shortcuts

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