upd store
This commit is contained in:
25
models/document.go
Normal file
25
models/document.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
// Document — логическая сущность (например, пользователь, настройки и т.п.)
|
||||
type Document struct {
|
||||
ID uuid.UUID `gorm:"type:char(36);primaryKey"`
|
||||
Name string
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
LatestVersion uuid.UUID `gorm:"type:char(36);"`
|
||||
}
|
||||
|
||||
func (s *Document) TableName() (res string) {
|
||||
if SchemeName != "" {
|
||||
res = SchemeName + ".document"
|
||||
} else {
|
||||
res = "document"
|
||||
}
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user