BaseListVo.go 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. package util
  2. import "fmt"
  3. type BaseListVo struct {
  4. PageNum int `json:"pageNum"`
  5. PageSize int `json:"pageSize"`
  6. Total int `json:"total"`
  7. List []any `json:"list"`
  8. }
  9. // GenTable
  10. type GenTable struct {
  11. Id int64 `json:"id"` // 11 0 注释:id
  12. TableName string `xorm:"table_name" json:"tableName"` // 255 0 注释:数据库名
  13. TableComment string `xorm:"table_comment" json:"tableComment"` // 255 0 注释:数据库注释
  14. Name string `xorm:"name" json:"name"` // 255 0 注释:名字
  15. RouterName string `xorm:"router_name" json:"routerName"` // 255 0 注释:路由名
  16. Remark string `xorm:"remark" json:"remark"` // 255 0 注释:备注
  17. }
  18. func (receiver GenTable) String() string {
  19. return fmt.Sprint("GenTable{Id:", receiver.Id, ",TableName:", receiver.TableName, ",TableComment:", receiver.TableComment, ",Name:", receiver.Name, ",RouterName:", receiver.RouterName, ",Remark:", receiver.Remark, "}")
  20. }
  21. // GenTableColumn
  22. type GenTableColumn struct {
  23. Id int64 `json:"id"` // 11 0 注释:id
  24. TableId int64 `xorm:"table_id" json:"tableId"` // 11 0 注释:表格id
  25. Sort int64 `xorm:"sort" json:"sort"` // 255 0 注释:排序
  26. ColumnName string `xorm:"column_name" json:"columnName"` // 255 0 注释:字段名
  27. ColumnComment string `xorm:"column_comment" json:"columnComment"` // 255 0 注释:字段注释
  28. ColumnType string `xorm:"column_type" json:"columnType"` // 255 0 注释:字段类型
  29. GoType string `xorm:"go_type" json:"goType"` // 255 0 注释:go类型
  30. GoField string `xorm:"go_field" json:"goField"` // 255 0 注释:go字段名
  31. IsKey string `xorm:"is_key" json:"isKey"` // 1 0 注释:是否主键
  32. IsIncrement string `xorm:"is_increment" json:"isIncrement"` // 1 0 注释:是否自增
  33. IsRequired string `xorm:"is_required" json:"isRequired"` // 1 0 注释:是否未必填
  34. QueryType string `xorm:"query_type" json:"queryType"` // 1 0 注释:查询方式
  35. VueShowType string `xorm:"vue_show_type" json:"vueShowType"` // 255 0 注释:前端显示类型
  36. DictType string `xorm:"dict_type" json:"dictType"` // 255 0 注释:字典类型
  37. }
  38. func (receiver GenTableColumn) String() string {
  39. return fmt.Sprint("GenTableColumn{Id:", receiver.Id, ",TableId:", receiver.TableId, ",Sort:", receiver.Sort, ",ColumnName:", receiver.ColumnName, ",ColumnComment:", receiver.ColumnComment, ",ColumnType:", receiver.ColumnType, ",GoType:", receiver.GoType, ",GoField:", receiver.GoField, ",IsKey:", receiver.IsKey, ",IsIncrement:", receiver.IsIncrement, ",IsRequired:", receiver.IsRequired, ",QueryType:", receiver.QueryType, ",VueShowType:", receiver.VueShowType, ",DictType:", receiver.DictType, "}")
  40. }