pojo
type StationCategory struct {
Code string `json:"code"`
Name string `json:"name"`
HardCalcFlag int8 `json:"hard_calc_flag"`
Type int8 `json:"type"`
Remark string `json:"remark"`
}
/*
*
定义表的名称
*/
func (p *StationCategory) TableName() string {
return "station"
}
// 定义一个全局变量
var gola = StationCategory{}
import "testing"
func TestDevSnSta_TableName(t *testing.T) {
gola.TableName()
}