orm fix create index
This commit is contained in:
@@ -81,6 +81,7 @@ type User struct {
|
||||
func (u *User) TableIndex() [][]string {
|
||||
return [][]string{
|
||||
[]string{"Id", "UserName"},
|
||||
[]string{"Id", "Created"},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,6 +122,12 @@ type Post struct {
|
||||
Tags []*Tag `orm:"rel(m2m)"`
|
||||
}
|
||||
|
||||
func (u *Post) TableIndex() [][]string {
|
||||
return [][]string{
|
||||
[]string{"Id", "Created"},
|
||||
}
|
||||
}
|
||||
|
||||
func NewPost() *Post {
|
||||
obj := new(Post)
|
||||
return obj
|
||||
|
||||
Reference in New Issue
Block a user