2024-11-22 16:41:04 +08:00
|
|
|
// Package orm define database data struct
|
|
|
|
|
package orm
|
|
|
|
|
|
|
|
|
|
import "time"
|
|
|
|
|
|
|
|
|
|
// Page structure define circuit diagram page info set
|
|
|
|
|
type Page struct {
|
2025-11-19 17:44:08 +08:00
|
|
|
ID int64 `gorm:"column:id;primaryKey"`
|
|
|
|
|
Tag string `gorm:"column:tag"`
|
|
|
|
|
Name string `gorm:"column:name"`
|
|
|
|
|
Label JSONMap `gorm:"column:label;type:jsonb;default:'{}'"`
|
|
|
|
|
Context JSONMap `gorm:"column:context;type:jsonb;default:'{}'"`
|
|
|
|
|
Description string `gorm:"column:description"`
|
|
|
|
|
Op int `gorm:"column:op"`
|
|
|
|
|
Ts time.Time `gorm:"column:ts"`
|
2024-11-22 16:41:04 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TableName func respresent return table name of Page
|
|
|
|
|
func (p *Page) TableName() string {
|
2025-11-19 17:44:08 +08:00
|
|
|
return "page"
|
2024-11-22 16:41:04 +08:00
|
|
|
}
|