schema

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Space

type Space struct {
	ID          string     `json:"id" gorm:"type:varchar(20);primaryKey;comment:ID;"`
	Code        string     `json:"code" gorm:"type:varchar(255);default:null;uniqueIndex:uniq_code;comment:空间编码;"`
	Name        string     `json:"name" gorm:"type:varchar(255);default:null;comment:空间名称;"`
	Tenant      string     `json:"tenant" gorm:"type:varchar(255);default:null;comment:租户信息;"`
	Creator     string     `json:"creator" gorm:"type:varchar(255);default:null;comment:创建人;"`
	Description string     `json:"description" gorm:"type:varchar(255);default:null;comment:描述;"`
	Metadata    *string    `json:"metadata,omitempty" gorm:"type:json;default:null;comment:元数据;"`
	CreatedAt   time.Time  `json:"created_at" gorm:"type:datetime;default:null;autoCreateTime;comment:创建时间;"`
	UpdatedAt   time.Time  `json:"updated_at" gorm:"type:datetime;default:null;autoUpdateTime;comment:更新时间;"`
	Deleted     string     `json:"-" gorm:"type:varchar(20);default:'0';comment:逻辑删除标识;"`
	DeletedAt   *time.Time `json:"-" gorm:"type:datetime;default:null;comment:逻辑删除时间;"`
}

Space management for microservice spaces

func (*Space) TableName

func (a *Space) TableName() string

type SpaceForm

type SpaceForm struct {
	Code        string  `json:"code" binding:"required,max=255"` // Code (unique)
	Name        string  `json:"name" binding:"required,max=255"` // Name
	Description string  `json:"description"`                     // Description
	Metadata    *string `json:"metadata"`                        // Metadata (JSON)
}

SpaceForm defines the form for creating/updating a Space.

func (*SpaceForm) FillTo

func (a *SpaceForm) FillTo(space *Space) error

func (*SpaceForm) Validate

func (a *SpaceForm) Validate() error

type SpaceQueryOptions

type SpaceQueryOptions struct {
	util.QueryOptions
}

SpaceQueryOptions defines the query options for Space.

type SpaceQueryParam

type SpaceQueryParam struct {
	util.PaginationParam
	LikeName string `form:"name"`   // Name (like)
	LikeCode string `form:"code"`   // Code (like)
	Tenant   string `form:"tenant"` // Tenant
}

SpaceQueryParam defines the query parameters for Space.

type SpaceQueryResult

type SpaceQueryResult struct {
	Data       Spaces
	PageResult *util.PaginationResult
}

SpaceQueryResult defines the query result for Space.

type Spaces

type Spaces []*Space

Spaces defines a slice of Space.

Jump to

Keyboard shortcuts

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