Add backups, currencies and dashboard APIs, and scope access by guard_name.
Web users may only CRUD their own records, operators stay in assigned branches, and admin/manager/superadmin keep full access. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
0d000f9af6
commit
28509eb4ca
65 files changed
+9132
-296
No files matched your search
@@ -0,0 +1,41 @@
|
||||
package backup
|
||||
|
||||
import "time"
|
||||
|
||||
type UserInfo struct {
|
||||
Id int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Username string `json:"username"`
|
||||
Phone string `json:"phone"`
|
||||
Email string `json:"email"`
|
||||
}
|
||||
|
||||
type BackupDTO struct {
|
||||
Id int64 `json:"id"`
|
||||
FileName string `json:"fileName"`
|
||||
SizeBytes int64 `json:"sizeBytes"`
|
||||
Size string `json:"size"`
|
||||
Status string `json:"status"`
|
||||
ErrorMessage *string `json:"errorMessage,omitempty"`
|
||||
CreatedById *int64 `json:"-"`
|
||||
CreatedBy *UserInfo `json:"createdBy,omitempty"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
type CreateBackupDTO struct {
|
||||
FileName string
|
||||
CreatedBy *int64
|
||||
}
|
||||
|
||||
type ListFilter struct {
|
||||
Search string
|
||||
Status *string
|
||||
Page int
|
||||
Limit int
|
||||
}
|
||||
|
||||
type ListBackupDTO struct {
|
||||
Count int64 `json:"count"`
|
||||
Backups []BackupDTO `json:"backups"`
|
||||
}
|
||||
Reference in new issue
Block a user