package edb_data

import (
	"hongze/hongze_yb/global"
)

func AddEdbDataThsBySql(sqlStr string) (err error) {
	err = global.MYSQL["data"].Exec(sqlStr).Error
	return
}

func AddEdbDataWindBySql(sqlStr string) (err error) {
	err = global.MYSQL["data"].Exec(sqlStr).Error
	return
}

func AddEdbDataPb(items []*EdbDataPb) (err error) {
	err = global.MYSQL["data"].Model(EdbDataPb{}).Create(items).Error
	return
}

func AddBaseFromSmmIndex(item *BaseFromSmmIndex) (lastId int64, err error) {
	err = global.MYSQL["data"].Model(BaseFromSmmIndex{}).Create(item).Error
	return
}

func AddBaseFromSmmData(item *BaseFromSmmData) (lastId int64, err error) {
	err = global.MYSQL["data"].Model(BaseFromSmmData{}).Create(item).Error
	return
}