mirror of
https://github.com/Dvorinka/MyClubServer.git
synced 2026-06-04 02:32:57 +00:00
16 lines
340 B
Go
16 lines
340 B
Go
package models
|
|
|
|
import "gorm.io/gorm"
|
|
|
|
// Category represents a category for articles
|
|
type Category struct {
|
|
gorm.Model
|
|
Name string `gorm:"uniqueIndex;not null" json:"name"`
|
|
Description string `json:"description"`
|
|
Slug string `gorm:"uniqueIndex" json:"slug"`
|
|
}
|
|
|
|
func (Category) TableName() string {
|
|
return "categories"
|
|
}
|