wp-go/app/pkg/models/wp_terms.go

28 lines
638 B
Go
Raw Normal View History

2023-01-12 12:42:16 +00:00
package models
2022-08-27 13:21:05 +00:00
2022-11-17 09:44:11 +00:00
type Terms struct {
2022-08-27 13:21:05 +00:00
TermId uint64 `gorm:"column:term_id" db:"term_id" json:"term_id" form:"term_id"`
Name string `gorm:"column:name" db:"name" json:"name" form:"name"`
Slug string `gorm:"column:slug" db:"slug" json:"slug" form:"slug"`
TermGroup int64 `gorm:"column:term_group" db:"term_group" json:"term_group" form:"term_group"`
}
2022-11-17 09:44:11 +00:00
func (t Terms) PrimaryKey() string {
2022-08-27 13:21:05 +00:00
return "term_id"
}
2022-11-17 09:44:11 +00:00
func (t Terms) Table() string {
2022-08-27 13:21:05 +00:00
return "wp_terms"
}
2022-09-15 14:35:32 +00:00
2022-11-17 09:44:11 +00:00
type TermsMy struct {
Terms
2022-11-05 14:40:02 +00:00
TermTaxonomy
2022-09-15 14:35:32 +00:00
}
2022-11-17 09:44:11 +00:00
func (t TermsMy) PrimaryKey() string {
2022-09-15 14:35:32 +00:00
return "term_id"
}
2022-11-17 09:44:11 +00:00
func (t TermsMy) Table() string {
2022-09-15 14:35:32 +00:00
return "wp_terms"
}