2019-12-11 16:55:18 +01:00
|
|
|
package entity
|
2019-06-05 14:05:21 +02:00
|
|
|
|
2020-02-21 01:14:45 +01:00
|
|
|
// Category of labels regroups labels with the same or a similar meaning using a main/root label
|
2019-06-05 14:05:21 +02:00
|
|
|
type Category struct {
|
2019-06-09 05:22:53 +02:00
|
|
|
LabelID uint `gorm:"primary_key;auto_increment:false"`
|
2019-06-05 14:05:21 +02:00
|
|
|
CategoryID uint `gorm:"primary_key;auto_increment:false"`
|
2019-06-09 05:22:53 +02:00
|
|
|
Label *Label
|
2019-06-05 14:05:21 +02:00
|
|
|
Category *Label
|
|
|
|
}
|
|
|
|
|
2020-02-21 01:14:45 +01:00
|
|
|
// TableName returns Category table identifier "categories"
|
2019-06-05 14:05:21 +02:00
|
|
|
func (Category) TableName() string {
|
|
|
|
return "categories"
|
|
|
|
}
|