mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-28 20:04:26 +00:00
feat(quota): add 2-level database-backed resource quota system (#318)
* feat(quota): add database-backed resource quota system * feat(webui): add resource quota management in team settings (#319) * feat(webui): add resource quota settings in team management * refactor(webui): update quotas list to full row layout and restrict skill/mcp to select list * feat(quota): refactor quota system to 2-level rules and records * fix(webui): fix overflow and scroll area in quota usage records dialog * fix(webui): ensure quota records scroll area has explicit max height * feat(webui): improve quota cards interaction and restrict editable fields in edit mode * fix(quota): serialize initial records, validate merged updates, and reset on dimension changes (#320) * feat(quota): replace network quota with agent tools quota (#321) * feat(webui): show remaining time until next refresh in quota usage records * fix(webui): rename bash quota resource to Agent Bash Calls * refactor(quota): remove unused reserved field from quota records * refactor(quota): remove quota rule cache (#322)
This commit is contained in:
@@ -92,7 +92,9 @@ export const ModelName = {
|
||||
Collection: 'Collection',
|
||||
ApiToken: 'ApiToken',
|
||||
AiUsage: 'AiUsage',
|
||||
AuditLog: 'AuditLog'
|
||||
AuditLog: 'AuditLog',
|
||||
QuotaRule: 'QuotaRule',
|
||||
QuotaRecord: 'QuotaRecord'
|
||||
} as const
|
||||
|
||||
export type ModelName = (typeof ModelName)[keyof typeof ModelName]
|
||||
@@ -719,6 +721,39 @@ export const AuditLogScalarFieldEnum = {
|
||||
export type AuditLogScalarFieldEnum = (typeof AuditLogScalarFieldEnum)[keyof typeof AuditLogScalarFieldEnum]
|
||||
|
||||
|
||||
export const QuotaRuleScalarFieldEnum = {
|
||||
id: 'id',
|
||||
teamId: 'teamId',
|
||||
scopeMode: 'scopeMode',
|
||||
role: 'role',
|
||||
userIds: 'userIds',
|
||||
resource: 'resource',
|
||||
resourceData: 'resourceData',
|
||||
limit: 'limit',
|
||||
period: 'period',
|
||||
enabled: 'enabled',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
} as const
|
||||
|
||||
export type QuotaRuleScalarFieldEnum = (typeof QuotaRuleScalarFieldEnum)[keyof typeof QuotaRuleScalarFieldEnum]
|
||||
|
||||
|
||||
export const QuotaRecordScalarFieldEnum = {
|
||||
id: 'id',
|
||||
ruleId: 'ruleId',
|
||||
teamId: 'teamId',
|
||||
userId: 'userId',
|
||||
periodStart: 'periodStart',
|
||||
periodEnd: 'periodEnd',
|
||||
consumed: 'consumed',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
} as const
|
||||
|
||||
export type QuotaRecordScalarFieldEnum = (typeof QuotaRecordScalarFieldEnum)[keyof typeof QuotaRecordScalarFieldEnum]
|
||||
|
||||
|
||||
export const SortOrder = {
|
||||
asc: 'asc',
|
||||
desc: 'desc'
|
||||
|
||||
Reference in New Issue
Block a user