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>
42 lines
928 B
Go
42 lines
928 B
Go
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"`
|
|
}
|