package dao

import (
	"server/global"
)

type OpticalData struct {
	global.GVA_MODEL
	Sn          string `json:"sn" gorm:"comment:编号"`
	TunnelSn    string `json:"tunnelSn" gorm:"comment:隧道序号"`
	Illuminance int64  `json:"illuminance" gorm:"comment:光照度"`
}

func (OpticalData) TableName() string {
	return "optical_data"
}

func (od OpticalData) CreateOpticalData() error {
	return global.GVA_DB.Create(&od).Error
}
