HEAVY: migrate accounts and logs to service/repo architecture
This commit is contained in:
parent
5c255fb34b
commit
49e14b5bc5
37 changed files with 1019 additions and 687 deletions
31
model/log.go
Normal file
31
model/log.go
Normal 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
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue