| 123456789101112131415161718192021222324252627282930313233343536 |
- package dbreq
-
- // TableRequest 表字典
- type TableRequest struct {
- TableName string `json:"table_name"`
- TableNameCN string `json:"table_name_cn"`
- Description string `json:"description"`
- PrimaryKeyFieldName string `json:"primary_key_field_name"`
- }
-
- // TablesRequest 表字典集合
- type TablesRequest struct {
- TableNames []*TableRequest `json:"table_names"`
- FieldInfos []*FieldInfo `json:"field_names"`
- }
-
- // FieldInfo 字段信息
- type FieldInfo struct {
- TableName string `json:"table_name"`
- // 字段名称(英文/数据库字段名)
- FieldName string `json:"field_name"`
- // 字段中文名称
- FieldNameCN string `json:"field_name_cn"`
- // 字段描述
- Description string `json:"description"`
- // 字段类型(如:varchar, int, datetime等)
- FieldType string `json:"field_type"`
- // 字段长度/精度
- FieldLength *int `json:"field_length,omitempty"`
- // 是否为主键
- IsPrimaryKey bool `json:"is_primary_key"`
- // 是否允许为空
- IsNullable bool `json:"is_nullable"`
- // 小数位数(对于decimal类型)
- DecimalPlaces *int `json:"decimal_places,omitempty"`
- }
|