feat(organization): add member limit feature

- Introduced a new member limit feature for organizations, allowing a maximum number of members to be set (default is 50; 0 means unlimited).
- Updated API endpoints to handle member limit during organization creation and updates.
- Implemented validation to prevent adding members when the limit is reached.
- Enhanced UI components to display and manage member limits, including localization updates for English and Chinese.
- Added migration files to support the new member limit column in the organizations table.

This update improves organization management by allowing administrators to control membership size.
This commit is contained in:
wizardchen
2026-01-30 20:26:41 +08:00
committed by lyingbug
parent b1b6396ac0
commit ca1b3da1df
15 changed files with 566 additions and 240 deletions
+4
View File
@@ -12,6 +12,8 @@ export interface Organization {
invite_code_validity_days?: number
require_approval?: boolean
searchable?: boolean
/** Max members; 0 = unlimited */
member_limit?: number
member_count?: number
share_count?: number
pending_join_request_count?: number
@@ -101,6 +103,7 @@ export interface CreateOrganizationRequest {
description?: string
avatar?: string
invite_code_validity_days?: number // 0=never, 1, 7, 30; default 7
member_limit?: number // 0=unlimited; default 50
}
export interface UpdateOrganizationRequest {
@@ -110,6 +113,7 @@ export interface UpdateOrganizationRequest {
require_approval?: boolean
searchable?: boolean
invite_code_validity_days?: number // 0=never, 1, 7, 30
member_limit?: number // 0=unlimited
}
export interface UpdateMemberRoleRequest {