Files
qitongxue-api/internal/model/entity/entity_tools.go

30 lines
1.3 KiB
Go
Raw Normal View History

2026-09-17 14:42:44 +08:00
package entity
import "github.com/gogf/gf/v2/os/gtime"
// Tools 工具目录
2026-09-17 17:38:45 +08:00
//
// 额度模型(三池):免费额度 → 会员额度 → 付费额度,依次扣减。
// - FreeQuota 非会员每周期可用次数(周期由 settings/quota_period_days 决定,默认 7 天)
// - MemberQuota 会员每周期可用次数(在免费额度用尽后启用)
// - PayCost 使用付费额度时每次消耗的次数系数(重工具可设 2、3)
2026-09-17 14:42:44 +08:00
type Tools struct {
Id int64 `json:"id"`
ToolKey string `json:"tool_key"`
ModuleKey string `json:"module_key"`
Name string `json:"name"`
Icon string `json:"icon"`
Description string `json:"description"`
2026-09-17 17:38:45 +08:00
FreeQuota int `json:"free_quota"`
MemberQuota int `json:"member_quota"`
PayCost int `json:"pay_cost"`
2026-09-17 14:42:44 +08:00
Sort int `json:"sort"`
IsEnabled int `json:"is_enabled"`
IsHot int `json:"is_hot"`
UsageCount int64 `json:"usage_count"`
CreatedAt *gtime.Time `json:"created_at"`
UpdatedAt *gtime.Time `json:"updated_at"`
2026-09-29 10:57:01 +08:00
// DeletedAt 软删除时间,NULL=未删除。工具不墓碑化 tool_key(跨仓契约 + 种子幂等,见 softdelete.go)。
DeletedAt *gtime.Time `json:"deleted_at"`
2026-09-17 14:42:44 +08:00
}