schemas

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package schemas Code generated by ikaiguang. <https://github.com/ikaiguang>

Index

Constants

View Source
const (
	TableName = "nid_node_serial"

	FieldId            = "id"
	FieldCreatedTime   = "created_time"
	FieldUpdatedTime   = "updated_time"
	FieldInstanceId    = "instance_id"
	FieldCurrentNodeId = "current_node_id"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeSerial

type NodeSerial struct {
	Id            uint64    `gorm:"column:id;primaryKey;type:uint;autoIncrement;not null;default:;comment:ID" json:"id"`
	CreatedTime   time.Time `gorm:"column:created_time;type:time;not null;comment:创建时间" json:"created_time"`
	UpdatedTime   time.Time `gorm:"column:updated_time;type:time;not null;comment:更新时间" json:"updated_time"`
	InstanceId    string    `gorm:"column:instance_id;unique;type:string;size:255;not null;default:'';comment:实例ID" json:"instance_id"`
	CurrentNodeId int64     `gorm:"column:current_node_id;type:int;not null;default:0;comment:当前节点id" json:"current_node_id"`
}

NodeSerial ENGINE InnoDB CHARSET utf8mb4 COMMENT '节点系列号'

var NodeSerialSchema NodeSerial

NodeSerialSchema NodeSerial

func NewNodeSerial

func NewNodeSerial() *NodeSerial

NewNodeSerial new schema

func (*NodeSerial) CreateTableMigrator

func (s *NodeSerial) CreateTableMigrator(migrator gorm.Migrator) migrationpkg.MigrationInterface

CreateTableMigrator create table migrator

func (*NodeSerial) DropTableMigrator

func (s *NodeSerial) DropTableMigrator(migrator gorm.Migrator) migrationpkg.MigrationInterface

DropTableMigrator create table migrator

func (*NodeSerial) TableName

func (s *NodeSerial) TableName() string

TableName table name

func (*NodeSerial) TableSQL

func (s *NodeSerial) TableSQL() string

TableSQL table SQL

Jump to

Keyboard shortcuts

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