HEAVY: migrate accounts and logs to service/repo architecture

This commit is contained in:
ari melody 2026-07-31 02:43:45 +01:00
parent 5c255fb34b
commit 49e14b5bc5
Signed by: ari
GPG key ID: CF99829C92678188
37 changed files with 1019 additions and 687 deletions

31
model/log.go Normal file
View file

@ -0,0 +1,31 @@
package model
import "time"
type (
LogLevel int
Log struct {
ID string `json:"id" db:"id"`
Level LogLevel `json:"level" db:"level"`
Type string `json:"type" db:"type"`
Content string `json:"content" db:"content"`
CreatedAt time.Time `json:"created_at" db:"created_at"`
}
)
const (
LOG_ACCOUNT string = "account"
LOG_MUSIC string = "music"
LOG_ARTIST string = "artist"
LOG_BLOG string = "blog"
LOG_ARTWORK string = "artwork"
LOG_FILES string = "files"
LOG_MISC string = "misc"
LOG_CURSOR string = "cursor"
)
const (
LEVEL_INFO LogLevel = 0
LEVEL_WARN LogLevel = 1
)