mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-15 13:43:48 +08:00
发布v2.15.1版本,更新内容请查看:https://github.com/bufanyun/hotgo/blob/v2.0/docs/guide-zh-CN/start-update-log.md
This commit is contained in:
@@ -22,3 +22,10 @@ const (
|
||||
DefaultPageSize = 1 // 默认列表分页加载页码
|
||||
MaxSortIncr = 10 // 最大排序值增量
|
||||
)
|
||||
|
||||
// TenantField 租户字段
|
||||
const (
|
||||
TenantId = "tenant_id" // 租户ID
|
||||
MerchantId = "merchant_id" // 商户ID
|
||||
UserId = "user_id" // 用户ID
|
||||
)
|
||||
|
||||
30
server/internal/consts/dept.go
Normal file
30
server/internal/consts/dept.go
Normal file
@@ -0,0 +1,30 @@
|
||||
// Package consts
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2024 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
package consts
|
||||
|
||||
import (
|
||||
"hotgo/internal/library/dict"
|
||||
"hotgo/internal/model"
|
||||
)
|
||||
|
||||
func init() {
|
||||
dict.RegisterEnums("deptType", "部门类型选项", DeptTypeOptions)
|
||||
}
|
||||
|
||||
const (
|
||||
DeptTypeCompany = "company" // 公司
|
||||
DeptTypeTenant = "tenant" // 租户
|
||||
DeptTypeMerchant = "merchant" // 商户
|
||||
DeptTypeUser = "user" // 用户
|
||||
)
|
||||
|
||||
// DeptTypeOptions 部门类型选项
|
||||
var DeptTypeOptions = []*model.Option{
|
||||
dict.GenSuccessOption(DeptTypeCompany, "公司"),
|
||||
dict.GenErrorOption(DeptTypeTenant, "租户"),
|
||||
dict.GenInfoOption(DeptTypeMerchant, "商户"),
|
||||
dict.GenWarningOption(DeptTypeUser, "用户"),
|
||||
}
|
||||
@@ -3,9 +3,13 @@
|
||||
// @Copyright Copyright (c) 2023 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package consts
|
||||
|
||||
import (
|
||||
"hotgo/internal/library/dict"
|
||||
"hotgo/internal/model"
|
||||
)
|
||||
|
||||
// 生成代码类型
|
||||
const (
|
||||
GenCodesTypeCurd = 10 // 增删改查列表
|
||||
@@ -16,7 +20,7 @@ const (
|
||||
|
||||
var GenCodesTypeNameMap = map[int]string{
|
||||
GenCodesTypeCurd: "增删改查列表",
|
||||
GenCodesTypeTree: "关系树列表(未实现)",
|
||||
GenCodesTypeTree: "关系树列表",
|
||||
GenCodesTypeQueue: "队列消费者(未实现)",
|
||||
GenCodesTypeCron: "定时任务(未实现)",
|
||||
}
|
||||
@@ -79,3 +83,14 @@ const (
|
||||
GenCodesIndexPK = "PRI" // 主键索引
|
||||
GenCodesIndexUNI = "UNI" // 唯一索引
|
||||
)
|
||||
|
||||
const (
|
||||
GenCodesTreeStyleTypeNormal = 1 // 普通树表格
|
||||
GenCodesTreeStyleTypeOption = 2 // 选项式树表
|
||||
)
|
||||
|
||||
// GenCodesTreeStyleTypeOptions 树表样式选项
|
||||
var GenCodesTreeStyleTypeOptions = []*model.Option{
|
||||
dict.GenSuccessOption(GenCodesTreeStyleTypeNormal, "普通树表格"),
|
||||
dict.GenInfoOption(GenCodesTreeStyleTypeOption, "选项式树表"),
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ import (
|
||||
|
||||
func init() {
|
||||
dict.RegisterEnums("payType", "支付方式", PayTypeOptions)
|
||||
dict.RegisterEnums("payStatus", "支付状态", PayStatusOptions)
|
||||
}
|
||||
|
||||
const (
|
||||
@@ -72,6 +73,12 @@ const (
|
||||
PayStatusOk = 2 // 已支付
|
||||
)
|
||||
|
||||
// PayStatusOptions 支付状态选项
|
||||
var PayStatusOptions = []*model.Option{
|
||||
dict.GenDefaultOption(PayStatusWait, "待支付"),
|
||||
dict.GenSuccessOption(PayStatusOk, "已支付"),
|
||||
}
|
||||
|
||||
// 退款状态
|
||||
|
||||
const (
|
||||
|
||||
@@ -7,5 +7,5 @@ package consts
|
||||
|
||||
// VersionApp HotGo版本
|
||||
const (
|
||||
VersionApp = "2.13.1"
|
||||
VersionApp = "2.15.1"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user