package yb_activity_type

import "hongze/hongze_yb/global"

// GetTypeByPid 根据pid获取活动类型
func GetTypeByPid(pid int) (typeList []*YbActivityType, err error) {
	err = global.DEFAULT_MYSQL.Model(YbActivityType{}).Where("pid", pid).Scan(&typeList).Error
	return
}

// GetTypeList 获取活动类型列表
func GetTypeList() (typeList []*YbActivityType, err error) {
	err = global.DEFAULT_MYSQL.Model(YbActivityType{}).Scan(&typeList).Error
	return
}