setting

package
v1.3.2-beta Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ISettingStore

type ISettingStore interface {
	Get(ctx context.Context, name string) (*Setting, error)
	Set(ctx context.Context, name string, value string, operator string) error
	All(ctx context.Context) ([]*Setting, error)
}

type Setting

type Setting struct {
	Id       int64     `gorm:"column:id;type:BIGINT(20);AUTO_INCREMENT;NOT NULL;comment:id;primary_key;comment:主键ID;"`
	Name     string    `gorm:"size:255;not null;column:name;comment:name;uniqueIndex:name;"`
	Value    string    `gorm:"type:text;not null;column:value;comment:value;"`
	CreateAt time.Time `gorm:"type:timestamp;NOT NULL;DEFAULT:CURRENT_TIMESTAMP;column:create_at;comment:创建时间"`
	UpdateAt time.Time `gorm:"type:timestamp;NOT NULL;DEFAULT:CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;column:update_at;comment:修改时间"`
	Operator string    `gorm:"type:varchar(36);not null;column:operator;comment:操作人;"`
}

func (*Setting) IdValue

func (s *Setting) IdValue() int64

func (*Setting) TableName

func (s *Setting) TableName() string

Jump to

Keyboard shortcuts

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