15 lines
568 B
Go
15 lines
568 B
Go
package model
|
|
|
|
type Route struct {
|
|
ID uint `gorm:"primaryKey;autoIncrement" json:"id"`
|
|
Name string `gorm:"type:varchar(255);not null;unique" json:"name"`
|
|
Path *string `gorm:"type:varchar(255);default:null" json:"path,omitempty"`
|
|
Component string `gorm:"type:varchar(255);not null;comment:path to component file" json:"component"`
|
|
Meta *string `gorm:"type:longtext;default:'{}'" json:"meta,omitempty"`
|
|
Active *bool `gorm:"type:tinyint;default:1" json:"active,omitempty"`
|
|
}
|
|
|
|
func (Route) TableName() string {
|
|
return "b2b_routes"
|
|
}
|