package marketing

import(
	"spaceofcheng/services/models/model"
	"spaceofcheng/services/utils"
	"github.com/go-xorm/xorm"
)

// WorkDAO 当前数据库操作对象
type WorkDAO struct {
	ctx *utils.Context
	db *xorm.Session
}

// NewMarketingDAO New Inst
func NewWorkDAO(ctx *utils.Context) *WorkDAO {
	return &WorkDAO{
		ctx: ctx,
		db:  ctx.DB,
	}
}

// WrokInfo 活动动作
type WrokInfo struct {
	model.SysActivityAction `xorm:"extends"`
	CourseType     string
}

// 添加 活动动作
func (m *WorkDAO) AddWork(action *model.SysActivityAction) (*model.SysActivityAction,error){
	action.ActionId = utils.GetGUID()
	_,err := m.db.Insert(&action)

	return action,err

}
















