feat: crudgen

This commit is contained in:
2025-01-06 00:09:51 +07:00
parent 8c2f415e80
commit 7b2afbcc46
17 changed files with 728 additions and 23 deletions

View File

@@ -1,11 +1,15 @@
package models
var Entities = []any{
&Post{},
&Post{}, &Author{},
}
type Post struct {
Id uint `gorm:"primaryKey"`
Id uint `gorm:"primaryKey"`
Text string
}
type Author struct {
Id uint `gorm:"primaryKey"`
Name string
}