feat: implement system statistics tracking, commit management controllers, and associated database migrations
All checks were successful
Build and Release / release (push) Successful in 1m49s
All checks were successful
Build and Release / release (push) Successful in 1m49s
This commit is contained in:
6
internal/dtos/request/statistic.go
Normal file
6
internal/dtos/request/statistic.go
Normal file
@@ -0,0 +1,6 @@
|
||||
package request
|
||||
|
||||
type SearchStatisticDto struct {
|
||||
StartDate string `query:"start_date" validate:"omitempty,datetime=2006-01-02"`
|
||||
EndDate string `query:"end_date" validate:"omitempty,datetime=2006-01-02"`
|
||||
}
|
||||
@@ -45,3 +45,8 @@ type CreateUserDto struct {
|
||||
DisplayName string `json:"display_name" validate:"required,min=2,max=50"`
|
||||
Roles []string `json:"role_ids" validate:"required,min=1,dive,required,uuid"`
|
||||
}
|
||||
|
||||
type ResetPasswordDto struct {
|
||||
NewPassword string `json:"new_password" validate:"required,min=8,max=64"`
|
||||
IsSendEmail bool `json:"is_send_email"`
|
||||
}
|
||||
|
||||
27
internal/dtos/response/statistic.go
Normal file
27
internal/dtos/response/statistic.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package response
|
||||
|
||||
import "time"
|
||||
|
||||
type StatisticResponse struct {
|
||||
ID string `json:"id"`
|
||||
Date string `json:"date"`
|
||||
TotalUsers int32 `json:"total_users"`
|
||||
TotalProjects int32 `json:"total_projects"`
|
||||
TotalCommits int32 `json:"total_commits"`
|
||||
TotalSubmissions int32 `json:"total_submissions"`
|
||||
TotalMedias int32 `json:"total_medias"`
|
||||
TotalWikis int32 `json:"total_wikis"`
|
||||
TotalEntities int32 `json:"total_entities"`
|
||||
TotalGeometries int32 `json:"total_geometries"`
|
||||
TotalStorageBytes int64 `json:"total_storage_bytes"`
|
||||
NewUsers int32 `json:"new_users"`
|
||||
NewProjects int32 `json:"new_projects"`
|
||||
NewCommits int32 `json:"new_commits"`
|
||||
NewSubmissions int32 `json:"new_submissions"`
|
||||
NewMedias int32 `json:"new_medias"`
|
||||
NewWikis int32 `json:"new_wikis"`
|
||||
NewEntities int32 `json:"new_entities"`
|
||||
NewGeometries int32 `json:"new_geometries"`
|
||||
NewStorageBytes int64 `json:"new_storage_bytes"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
}
|
||||
Reference in New Issue
Block a user