@@ -206,8 +206,8 @@ type Profile struct {
|
|||||||
type Post struct {
|
type Post struct {
|
||||||
Id int
|
Id int
|
||||||
Title string
|
Title string
|
||||||
User *User `orm:"rel(fk)"` //设置一对多关系
|
User *User `orm:"rel(fk)"`
|
||||||
Tags []*Tag `orm:"rel(m2m)"`
|
Tags []*Tag `orm:"rel(m2m)"` //设置一对多关系
|
||||||
}
|
}
|
||||||
|
|
||||||
type Tag struct {
|
type Tag struct {
|
||||||
|
|||||||
Reference in New Issue
Block a user