feat: add tenant and user management with migrations, handlers, and tests
- Implemented tenant and user management features including: - Tenant creation and management with associated migrations. - User creation and management with associated migrations. - Tenant membership management with associated migrations. - Platform user roles management with associated migrations. - Quota management with associated migrations. - Article and template management with associated migrations. - Added HTTP handlers for templates and workspaces. - Created tests for protected and public routes. - Introduced a script to check tenant scope in SQL queries. - Documented task plan for backend completion and frontend foundation.
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
package domain
|
||||
|
||||
import "time"
|
||||
|
||||
type WorkspaceOverview struct {
|
||||
ArticleCount int64 `json:"article_count"`
|
||||
PublishedCount int64 `json:"published_count"`
|
||||
BrandCount int64 `json:"brand_count"`
|
||||
SupportedPlatformCount int `json:"supported_platform_count"`
|
||||
}
|
||||
|
||||
type RecentArticle struct {
|
||||
ID int64 `json:"id"`
|
||||
Title *string `json:"title"`
|
||||
TemplateName *string `json:"template_name"`
|
||||
GenerateStatus string `json:"generate_status"`
|
||||
PublishStatus string `json:"publish_status"`
|
||||
SourceType string `json:"source_type"`
|
||||
WordCount int `json:"word_count"`
|
||||
SourceLabel *string `json:"source_label"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
}
|
||||
|
||||
type QuotaSummary struct {
|
||||
PlanCode string `json:"plan_code"`
|
||||
PlanName string `json:"plan_name"`
|
||||
TotalQuota int `json:"total_quota"`
|
||||
UsedQuota int `json:"used_quota"`
|
||||
Balance int `json:"balance"`
|
||||
ResetAt *time.Time `json:"reset_at"`
|
||||
}
|
||||
Reference in New Issue
Block a user