我注意到在 ORM 庫 Gorm 中,您可以使用如下結構定義自定義表名:type DeviceStatus struct { // Define some Gorm model fields here}// TableName custumizes DeviceStatus SQL table namefunc (DeviceStatus) TableName() string { return "CustomDeviceStatusTableName"}這個結構叫什么?我試圖用谷歌找到這個并弄清楚如何進行函數調用。
- 2 回答
- 0 關注
- 108 瀏覽
添加回答
舉報
0/150
提交
取消