This repository has been archived on 2025-03-16. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
boilerplate/internal/models/models.go
gogacoder 6e9b2c61fc feat: new nto-cli version changes
# Conflicts:
#	frontend/src/author/AuthorScheme.vue
#	frontend/src/post/PostScheme.vue
#	internal/models/models.go
2025-03-09 14:08:54 +07:00

20 lines
582 B
Go

package models
var Entities = []any{
&Post{}, &Author{},
}
type Post struct {
Id uint `gorm:"primaryKey" ui:"hidden"`
Text string `displayName:"Текст" ui:"label:Текст"`
Deadline int64 `ui:"label:Дедлайн;datatype:datetime;"`
CreatedAt int64 `gorm:"autoCreateTime" ui:"readonly;datatype:datetime;"`
AuthorId uint `ui:"hidden"`
Author Author `ui:"label:Автор; field:Name;"`
}
type Author struct {
Id uint `gorm:"primaryKey" ui:"hidden"`
Name string `ui:"label:Имя;"`
Posts []Post `ui:"label:Посты; field:Text;"`
}