Files
GitM/internal/models/models.go
panw 94d3952711 feat: add config and models packages
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 16:09:22 +08:00

43 lines
1.2 KiB
Go

package models
import "time"
type GiteaServer struct {
ID int64 `json:"id"`
Name string `json:"name"`
URL string `json:"url"`
Token string `json:"-"` // Never expose in JSON
SyncInterval int `json:"sync_interval"`
LastSyncAt *time.Time `json:"last_sync_at"`
Status string `json:"status"`
CreatedAt time.Time `json:"created_at"`
}
type Repo struct {
ID int64 `json:"id"`
ServerID int64 `json:"server_id"`
Name string `json:"name"`
FullName string `json:"full_name"`
CloneURL string `json:"clone_url"`
LocalPath string `json:"local_path"`
Size int64 `json:"size"`
LastSyncAt *time.Time `json:"last_sync_at"`
SyncStatus string `json:"sync_status"`
CreatedAt time.Time `json:"created_at"`
}
type SyncLog struct {
ID int64 `json:"id"`
ServerID int64 `json:"server_id"`
RepoID *int64 `json:"repo_id"`
Status string `json:"status"`
Message string `json:"message"`
StartedAt time.Time `json:"started_at"`
FinishedAt *time.Time `json:"finished_at"`
}
type Setting struct {
Key string `json:"key"`
Value string `json:"value"`
}