schema

package
v10.3.5 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Field

type Field struct {
	Name      string                 `yaml:"name,omitempty" json:"name,omitempty"`
	Type      string                 `yaml:"type,omitempty" json:"type,omitempty"`
	GormTag   string                 `yaml:"gorm_tag,omitempty" json:"gorm_tag,omitempty"`
	JSONTag   string                 `yaml:"json_tag,omitempty" json:"json_tag,omitempty"`
	CustomTag string                 `yaml:"custom_tag,omitempty" json:"custom_tag,omitempty"`
	Comment   string                 `yaml:"comment,omitempty" json:"comment,omitempty"`
	Query     *FieldQuery            `yaml:"query,omitempty" json:"query,omitempty"`
	Order     string                 `yaml:"order,omitempty" json:"order,omitempty"`
	Form      *FieldForm             `yaml:"form,omitempty" json:"form,omitempty"`
	Unique    bool                   `yaml:"unique,omitempty" json:"unique,omitempty"`
	Extra     map[string]interface{} `yaml:"extra,omitempty" json:"extra,omitempty"`
}

func (*Field) Format

func (a *Field) Format() *Field

type FieldForm

type FieldForm struct {
	Name       string `yaml:"name,omitempty" json:"name,omitempty"`
	JSONTag    string `yaml:"json_tag,omitempty" json:"json_tag,omitempty"`
	BindingTag string `yaml:"binding_tag,omitempty" json:"binding_tag,omitempty"`
	CustomTag  string `yaml:"custom_tag,omitempty" json:"custom_tag,omitempty"`
	Comment    string `yaml:"comment,omitempty" json:"comment,omitempty"`
}

type FieldQuery

type FieldQuery struct {
	Name       string `yaml:"name,omitempty" json:"name,omitempty"`
	InQuery    bool   `yaml:"in_query,omitempty" json:"in_query,omitempty"`
	FormTag    string `yaml:"form_tag,omitempty" json:"form_tag,omitempty"`
	BindingTag string `yaml:"binding_tag,omitempty" json:"binding_tag,omitempty"`
	CustomTag  string `yaml:"custom_tag,omitempty" json:"custom_tag,omitempty"`
	Comment    string `yaml:"comment,omitempty" json:"comment,omitempty"`
	IfCond     string `yaml:"cond,omitempty" json:"cond,omitempty"`
	OP         string `yaml:"op,omitempty" json:"op,omitempty"`     // LIKE/=/</>/<=/>=/<>
	Args       string `yaml:"args,omitempty" json:"args,omitempty"` // v + "%"
}

type S

type S struct {
	RootImportPath   string `yaml:"-" json:"-"`
	ModuleImportPath string `yaml:"-" json:"-"`
	UtilImportPath   string `yaml:"-" json:"-"`
	Include          struct {
		ID        bool
		Status    bool
		CreatedAt bool
		UpdatedAt bool
		Sequence  bool
	} `yaml:"-" json:"-"`
	Module               string                 `yaml:"module,omitempty" json:"module,omitempty"`
	Name                 string                 `yaml:"name,omitempty" json:"name,omitempty"`
	TableName            string                 `yaml:"table_name,omitempty" json:"table_name,omitempty"`
	Comment              string                 `yaml:"comment,omitempty" json:"comment,omitempty"`
	Outputs              []string               `yaml:"outputs,omitempty" json:"outputs,omitempty"`
	ForceWrite           bool                   `yaml:"force_write,omitempty" json:"force_write,omitempty"`
	TplType              string                 `yaml:"tpl_type,omitempty" json:"tpl_type,omitempty"` // crud/tree
	DisablePagination    bool                   `yaml:"disable_pagination,omitempty" json:"disable_pagination,omitempty"`
	DisableDefaultFields bool                   `yaml:"disable_default_fields,omitempty" json:"disable_default_fields,omitempty"`
	FillGormCommit       bool                   `yaml:"fill_gorm_commit,omitempty" json:"fill_gorm_commit,omitempty"`
	FillRouterPrefix     bool                   `yaml:"fill_router_prefix,omitempty" json:"fill_router_prefix,omitempty"`
	Fields               []*Field               `yaml:"fields,omitempty" json:"fields,omitempty"`
	GenerateFE           bool                   `yaml:"generate_fe,omitempty" json:"generate_fe,omitempty"`
	FETpl                string                 `yaml:"fe_tpl,omitempty" json:"fe_tpl,omitempty"`         // react/react-v5-i18n
	FEMapping            map[string]string      `yaml:"fe_mapping,omitempty" json:"fe_mapping,omitempty"` // tpl -> file
	Extra                map[string]interface{} `yaml:"extra,omitempty" json:"extra,omitempty"`
}

func (*S) Format

func (a *S) Format() *S

Jump to

Keyboard shortcuts

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