model

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2025 License: MIT, Apache-2.0 Imports: 2 Imported by: 0

README

先有属性 属性类型可以是基本类型 属性类型可以有枚举,value就是枚举id 属性类型可以是键值对,value就是[dict.group] 属性类型可以有子属性,value就是[attrId] // 暂时不支持

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attribute added in v0.3.6

type Attribute struct {
	ID    uint   `json:"id" gorm:"primaryKey"`
	Name  string `json:"name" gorm:"comment:名称"`
	Type  uint32 `json:"type" gorm:"comment:类型"`
	Value string `json:"value" gorm:"值"`
}

type Cursor

type Cursor struct {
	Type   string `json:"type" gorm:"primaryKey"`
	Cursor string
	Prev   string
	Next   string
}

type Dict

type Dict struct {
	Group uint32 `json:"group" gorm:"primaryKey;comment:组"`
	Key   string `json:"key" gorm:"primaryKey;comment:键"`
	Value string `json:"value" gorm:"comment:值"`
	Type  uint32 `json:"type" gorm:"comment:类型"`
	Seq   uint32 `json:"seq" gorm:"comment:排序"`
}

type Enum

type Enum struct {
	ID    uint   `json:"id" gorm:"primaryKey"`
	Group uint32 `json:"group" gorm:"uniqueIndex:idx_group_name;not null;default:0;comment:枚举组"`
	Name  string `json:"name" gorm:"uniqueIndex:idx_group_name;not null;comment:名称"`
	Type  uint32 `json:"type" gorm:"comment:类型"`
}

type EnumValue added in v0.3.6

type EnumValue struct {
	ID     uint   `json:"id" gorm:"primaryKey"`
	EnumID uint   `json:"enumId" gorm:"index;not null;comment:枚举id"`
	Index  uint32 `json:"index" gorm:"comment:索引"`
	Value  string `json:"value" gorm:"not null;comment:值"`
}

type Model added in v0.3.7

type Model struct {
	ID        uint      `json:"id" gorm:"primarykey"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
	DeletedAt time.Time `json:"deletedAt,omitempty" gorm:"index"`
}

type ModelExt added in v0.3.8

type ModelExt struct {
	OperatorId uint `json:"operatorId"`
}

type Object added in v0.3.6

type Object struct {
	ID      uint   `json:"id" gorm:"primaryKey"`
	FieldID uint   `json:"fieldId" gorm:"comment:字段id"`
	Value   string `json:"value" gorm:"comment:值"`
}

type PostgresEnum

type PostgresEnum struct {
	ID    uint `gorm:"primaryKey"`
	Enums datatypes.StringArray
}

type Struct added in v0.3.6

type Struct struct {
	ID   uint   `json:"id" gorm:"primaryKey"`
	Name string `json:"name" gorm:"comment:名称"`
}

内部保留,{1,int8},{2,int16}...{x,uint8}...{x,uint64},{x,string}

type StructField added in v0.3.6

type StructField struct {
	ID          uint   `json:"id" gorm:"primaryKey"`
	StructID    uint   `json:"structId" gorm:"comment:结构体id"`
	Name        string `json:"name" gorm:"comment:名称"`
	Kind        uint32 `json:"kind" gorm:"comment:类型"`
	Tag         string `json:"tag" gorm:"comment:标签"`
	Offset      uint32 `json:"offset" gorm:"comment:偏移量"`
	Anonymous   bool   `json:"anonymous" gorm:"comment:匿名"`
	SubStructID uint   `json:"subStructId" gorm:"comment:子结构体id"`
}

type TableColumn added in v0.3.8

type TableColumn struct {
	ID      uint   `json:"id" gorm:"primaryKey"`
	Name    string `json:"name" gorm:"comment:名称"`
	Type    string `json:"type" gorm:"comment:类型"`
	TableID uint   `json:"tableId" gorm:"comment:表id"`
}

type TableMeta added in v0.3.7

type TableMeta struct {
	ID   uint   `json:"id" gorm:"primaryKey"`
	Name string `json:"name" gorm:"comment:名称"`
}

type TableValue added in v0.3.7

type TableValue struct {
	ID       uint   `json:"id" gorm:"primaryKey"`
	ColumnID uint   `json:"columnId" gorm:"comment:字段id"`
	Value    string `json:"value" gorm:"comment:值"`
}

type Tree added in v0.3.8

type Tree struct {
	ID   uint   `json:"id"`
	Name string `json:"name"`
	Type uint32 `json:"type"`
}

type TreeNode added in v0.3.8

type TreeNode struct {
	ID     uint   `json:"id"`
	PID    uint   `json:"ptId"`
	Value  string `json:"value"`
	TreeID uint   `json:"treeId"`
}

Jump to

Keyboard shortcuts

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