id_storage

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ModuleName    = "module_id"
	TableNameTbId = "tb_id"
)
View Source
var (
	TableTbId = &db.Table{
		Name:    TableNameTbId,
		Comment: "id 存储",
		ColumnList: []*db.Column{
			{Name: "id_type", DataType: "varchar", Length: 100, NotNull: true, Key: true, Comment: "id 类型"},
			{Name: "id_value", DataType: "bigint", Length: 20, NotNull: true, Comment: "id 值"},
			{Name: "id_comment", DataType: "varchar", Length: 200, Comment: "id 注释"},
			{Name: "create_at", DataType: "bigint", Length: 20, Comment: "创建 时间戳 毫秒"},
			{Name: "update_at", DataType: "bigint", Length: 20, Comment: "修改 时间戳 毫秒"},
		},
		IndexList: []*db.Index{},
	}
)

Functions

func Install

func Install(dbService db.IService) (err error)

func V100TbIdCreate

func V100TbIdCreate(dbService db.IService) (err error)

Types

type Id

type Id struct {
	Type    string `json:"type" column:"id_type"`
	Value   int64  `json:"value" column:"id_value"`
	Comment string `json:"comment" column:"account"`

	CreateAt int64 `json:"createAt" column:"create_at"`
	UpdateAt int64 `json:"updateAt" column:"update_at"`
}

func (*Id) GetPrimaryKey

func (this_ *Id) GetPrimaryKey() []string

func (*Id) GetTableName

func (this_ *Id) GetTableName() string

type IdStorage

type IdStorage struct {
	DbService db.IService
}

func (*IdStorage) StorageInsert

func (this_ *IdStorage) StorageInsert(ctx context.Context, idType module_id.IdType, id int64) error

func (*IdStorage) StorageQueryId

func (this_ *IdStorage) StorageQueryId(ctx context.Context, idType module_id.IdType) (int64, error)

func (*IdStorage) StorageSave

func (this_ *IdStorage) StorageSave(ctx context.Context, idType module_id.IdType, id int64) error

func (*IdStorage) StorageUpdate

func (this_ *IdStorage) StorageUpdate(ctx context.Context, idType module_id.IdType, id int64) error

Jump to

Keyboard shortcuts

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