feat(*): go 后端项目脚手架
This commit is contained in:
16
internal/model/cateage.go
Normal file
16
internal/model/cateage.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type Cateage struct {
|
||||
ID uint `gorm:"primaryKey" json:"id"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
DeletedAt *time.Time `gorm:"index" json:"-"`
|
||||
|
||||
AnchorId string `gorm:"size:100;not null;unique" json:"anchor_id"`
|
||||
Name string `gorm:"size:100;not null;unique" json:"name"`
|
||||
Sites []Site `gorm:"foreignKey:CateageID" json:"sites"` // 方便获取分类下所有网站
|
||||
}
|
||||
Reference in New Issue
Block a user