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.
30 lines
984 B
Go
30 lines
984 B
Go
package Model
|
|
|
|
import (
|
|
"github.com/spf13/viper"
|
|
)
|
|
|
|
const (
|
|
TStaffgroup_Id = "id" //主键
|
|
TStaffgroup_Gr_name = "gr_name" //团组名称
|
|
TStaffgroup_Gr_num = "gr_num" //团组编号
|
|
TStaffgroup_Gr_remarks = "gr_remarks" //备注
|
|
TStaffgroup_Gr_serial = "gr_serial" //排序
|
|
)
|
|
|
|
type TStaffgroup struct {
|
|
Id string `gorm:"column:id;primary_key" json:"id"` //主键
|
|
Gr_name string `gorm:"column:gr_name" json:"gr_name"` //团组名称
|
|
Gr_num string `gorm:"column:gr_num" json:"gr_num"` //团组编号
|
|
Gr_remarks string `gorm:"column:gr_remarks" json:"gr_remarks"` //备注
|
|
Gr_serial int64 `gorm:"column:gr_serial" json:"gr_serial"` //排序
|
|
}
|
|
|
|
func (TStaffgroup) TableName() string {
|
|
tableName := "t_staffgroup"
|
|
if viper.GetString("database.dbtype") == "kingbase" || viper.GetString("database.dbtype") == "postgres" {
|
|
return viper.GetString("database.dbnames") + "." + tableName
|
|
}
|
|
return tableName
|
|
}
|