package model import ( "gorm.io/gorm" ) type KillaraCustomerDeviceModel struct { // fields ... db *gorm.DB TableName string // 表名 } func (m *KillaraCustomerModel) InsertCustomerDevice(deviceData *KillaraCustomerDevice) error { return m.db.Model(&KillaraCustomerDevice{}).Create(deviceData).Error }