Documentation
¶
Index ¶
- type Click
- type CountFn
- type FExtra
- type Field
- func (s Field) Equal(old, get any) bool
- func (s Field) GetDataType() string
- func (s Field) GetFieldType() string
- func (s Field) GetKey() string
- func (s Field) GetRefer() *Refer
- func (s Field) GetTermWeek(date *time.Time) (int, int)
- func (s Field) GetTimeTerm() int
- func (s Field) HasTimeTerm() bool
- func (s Field) Parse(get any) any
- func (s Field) ParseTime(get string) *time.Time
- func (s Field) ToMap() object
- type GExtra
- type Group
- type GroupBy
- type Input
- type Model
- type Option
- type Order
- type PivotBy
- type Refer
- type Table
- type Value
- type XRule
- type XRuleThen
- type XRuleWhen
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Click ¶
type Click struct {
UUKey string `json:"uukey"` // 数据类型
Label string `json:"label"` // 显示文本
Action string `json:"action"` // 按钮动作
SeqNo uint64 `json:"seqno,omitempty"` // 排序序号
Group string `json:"group,omitempty"` // 按钮分组
Scene []string `json:"scene,omitempty"` // 应用场景
Helps string `json:"helps,omitempty"` // 提示信息
Click string `json:"click,omitempty"` // 字段名称
CType string `json:"ctype,omitempty"` // 事件类型
Props object `json:"props,omitempty"` // 按钮属性
Extra object `json:"extra,omitempty"` // 补充信息
}
type FExtra ¶
type FExtra struct {
// internal & embedded & necessary
Embedded bool `json:"embedded,omitempty" bson:"embedded,omitempty"`
// edit props
Required bool `json:"required,omitempty" bson:"required,omitempty"`
Multiple bool `json:"multiple,omitempty" bson:"multiple,omitempty"`
Implicit bool `json:"implicit,omitempty" bson:"implicit,omitempty"`
// edit mode
Editable string `json:"editable,omitempty" bson:"editable,omitempty"`
Disabled string `json:"disabled,omitempty" bson:"disabled,omitempty"`
// serialno
DateTime string `json:"datetime,omitempty" bson:"datetime,omitempty"`
Constant string `json:"constant,omitempty" bson:"constant,omitempty"`
Counting int64 `json:"counting,omitempty" bson:"counting,omitempty"`
// Formula
Formula string `json:"formula,omitempty" bson:"formula,omitempty"`
Display string `json:"display,omitempty" bson:"display,omitempty"`
Depends []any `json:"depends,omitempty" bson:"depends,omitempty"`
// numberic
MinValue int64 `json:"minValue,omitempty" bson:"minValue,omitempty"`
MaxValue int64 `json:"maxValue,omitempty" bson:"maxValue,omitempty"`
Precision int64 `json:"precision,omitempty" bson:"precision,omitempty"`
RoundMode string `json:"roundMode,omitempty" bson:"roundMode,omitempty"`
// ValueFmt 数字展示格式
ValueFmt string `json:"valueFmt,omitempty" bson:"valueFmt,omitempty"`
// AggrType 汇总行聚合方式
AggrType string `json:"aggrType,omitempty" bson:"aggrType,omitempty"`
// expense
Expense string `json:"expense,omitempty" bson:"expense,omitempty"`
// relation
Relation string `json:"relation,omitempty" bson:"relation,omitempty"`
// options
Options []Option `json:"options,omitempty" bson:"options,omitempty"`
DictKey string `json:"dictKey,omitempty" bson:"dictKey,omitempty"`
DataKey string `json:"dataKey,omitempty" bson:"dataKey,omitempty"`
TextKey string `json:"textKey,omitempty" bson:"textKey,omitempty"`
// Display string `json:"display,omitempty" bson:"display,omitempty"`
// datetime|strings|uploads|numeric
DataType string `json:"dataType,omitempty" bson:"dataType,omitempty"`
// time term, NONE|26|27|28|29, 财务周期范围
TimeTerm string `json:"timeTerm,omitempty" bson:"timeTerm,omitempty"`
// upload
AcceptType string `json:"acceptType,omitempty" bson:"acceptType,omitempty"`
}
type Field ¶
type Field struct {
UUKey string `json:"uukey" gorm:"column:uukey"` // 数据类型
GType string `json:"gtype" bson:"-" gorm:"-:all"` // group type
GName string `json:"gname" bson:"-" gorm:"-:all"` // group name
FType string `json:"ftype" bson:"ftype" gorm:"column:ftype"` // field type
Group string `json:"group,omitempty" bson:"group,omitempty"` // 逻辑类型
Field string `json:"field,omitempty" bson:"field,omitempty"` // 字段key
Label string `json:"label,omitempty" bson:"label,omitempty"` // 字段名称
Index string `json:"index,omitempty" bson:"index,omitempty"` // 搜索字段
Shown bool `json:"shown,omitempty" bson:"shown,omitempty"` // 是否显示
Width uint16 `json:"width,omitempty" bson:"width,omitempty"` // 是否显示
Refer *Refer `json:"refer,omitempty" bson:"refer,omitempty"` // 引用数据
SeqNo uint16 `json:"seqno,omitempty" bson:"seqno,omitempty"` // 展示顺序
Remark string `json:"remark,omitempty" bson:"remark,omitempty"` // 字段备注
Extra FExtra `json:"extra,omitempty" bson:"extra,omitempty" gorm:"serializer:json"` // 关联属性
}
func (Field) GetDataType ¶
func (Field) GetFieldType ¶
func (Field) GetTimeTerm ¶
func (Field) HasTimeTerm ¶
type GExtra ¶
type GExtra struct {
Nested bool `json:"nested,omitempty" bson:"nested,omitempty"`
Remark string `json:"remark,omitempty" bson:"remark,omitempty"`
Fields []string `json:"fields,omitempty" bson:"fields,omitempty"`
Multiple bool `json:"multiple,omitempty" bson:"multiple,omitempty"`
Relation string `json:"relation,omitempty" bson:"relation,omitempty"`
}
type Group ¶
type Group struct {
UUKey string `json:"uukey" bson:"uukey" gorm:"column:uukey"` // 数据类型
Title string `json:"title" bson:"title" gorm:"column:title"` // 字段名称
GType string `json:"gtype" bson:"gtype" gorm:"column:gtype"` // 查询条件
// 补充信息
Model string `json:"model,omitempty" bson:"model,omitempty" gorm:"column:model"` // 数据类型
SeqNo uint16 `json:"seqno,omitempty" bson:"seqno,omitempty" gorm:"column:seqno"` // 显示顺序
Extra GExtra `json:"extra,omitempty" bson:"extra,omitempty" gorm:"serializer:json"` // 关联属性
}
type Input ¶
type Input struct {
UUKey string `json:"uukey"` // 数据类型
Title string `json:"title"` // 字段名称
Extra object `json:"extra"` // 扩展信息
Layout string `json:"layout"` // 字段名称
Preset object `json:"preset"` // 新建默认值
Groups []string `json:"groups"` // 字段名称
Fields []string `json:"fields"` // 可用字段
Hidden []string `json:"hidden"` // 隐藏字段
Rename object `json:"rename"` // uukey -> label
Replace object `json:"replace"` // uukey -> FExtra 属性
XRules []string `json:"xrules"` // 字段名称
Clicks []string `json:"clicks"` // 按钮名称
}
type Model ¶
type Model struct {
UUKey string `json:"uukey" gorm:"column:uukey"` // 页面标识
Title string `json:"title" gorm:"column:title"` // 页面标题
Brief string `json:"brief" gorm:"column:brief"` // 页面描述
Driver string `json:"driver" gorm:"column:driver"` // 驱动类型
Source string `json:"source" gorm:"column:source"` // 存储数据源
Search string `json:"search" gorm:"column:search"` // 索引数据源
Groups []Group `json:"-" gorm:"serializer:json"` // 分组
Fields []Field `json:"-" gorm:"serializer:json"` // 字段
Clicks []Click `json:"-" gorm:"serializer:json"` // 按钮
Extra object `json:"-" gorm:"serializer:json"` // 关联属性
}
type Refer ¶
type Table ¶
type Table struct {
UUKey string `json:"uukey" bson:"uukey"` // 数据类型
Title string `json:"title" bson:"title"` // 字段名称
Query object `json:"query" bson:"query"` // 默认筛选
Extra object `json:"extra" bson:"extra"` // 透视/合并等默认配置
Fields []string `json:"fields" bson:"fields"` // 可用字段
Hidden []string `json:"hidden" bson:"hidden"` // 隐藏字段
Rename object `json:"rename" bson:"rename"` // uukey -> label
Replace object `json:"replace" bson:"replace"` // uukey -> FExtra 属性
Clicks []string `json:"clicks" bson:"clicks"` // 表格动作
Order []Order `json:"-" bson:"-" gorm:"-"` // 默认排序
Pivot []GroupBy `json:"-" bson:"-" gorm:"-"` // 聚合字段
Aggrs []CountFn `json:"-" bson:"-" gorm:"-"` // 聚合配置
}
type Value ¶
type Value struct {
Model Model `json:"model"` // model name
Scene string `json:"scene"` // source scene
Fields map[string]Field `json:"fields"` // 逻辑类型
Groups map[string]Group `json:"groups"` // 逻辑类型
Tables map[string]Table `json:"tables"` // 表格配置
Inputs map[string]Input `json:"inputs"` // 表单配置
Clicks map[string]Click `json:"clicks"` // 表格事件
XRules map[string]XRule `json:"xrules"` // 规则配置
}
Click to show internal directories.
Click to hide internal directories.