fonchain-container/cmd/model/boxRelPin.go
2024-07-02 11:56:53 +08:00

21 lines
657 B
Go

// Package model -----------------------------
// @file : boxRelPin.go
// @author : JJXu
// @contact : wavingbear@163.com
// @time : 2024/7/1 下午3:06
// -------------------------------------------
package model
type BoxRelPin struct {
Model
DeviceSn string `gorm:"column:device_sn;comment:硬件设备序列号"`
BoxId int `gorm:"column:box_id;comment:盒子ID"`
PinId int `gorm:"column:pin_id;comment:引脚ID"`
DevicePin *DevicePin `gorm:"foreignKey:PinId;"`
Color string `gorm:"column:color;default:;comment:颜色 r,g,b,y,*"`
}
func (d BoxRelPin) TableName() string {
return "box_rel_pin"
}