You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
745 B
Go

4 weeks ago
package Model
import "github.com/spf13/viper"
const (
TDicNation_Id = "id" //民族id
TDicNation_Nationname = "nationname" //民族名称
TDicNation_Nationvalue = "nationvalue" //民族key
)
type TDicNation struct {
Id string `gorm:"column:id;primary_key" json:"id"` //民族id
Nationname string `gorm:"column:nationname" json:"nationname"` //民族名称
Nationvalue int64 `gorm:"column:nationvalue" json:"nationvalue"` //民族key
}
func (TDicNation) TableName() string {
tableName := "t_dic_nation"
if viper.GetString("database.dbtype") == "kingbase" || viper.GetString("database.dbtype") == "postgres" {
return viper.GetString("database.dbnames") + "." + tableName
}
return tableName
}