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"`
	SortOrder *int    `gorm:"type:int;default:0" json:"sort_order,omitempty"`
}

func (Route) TableName() string {
	return "b2b_routes"
}
