package pack

import (
	"github.com/issue9/conv"
	"youngee_b_api/model/common_model"
	"youngee_b_api/model/http_model"
)

func HttpSpecialProjectRequestToCondition(req *http_model.SpecialProjectListRequest) *common_model.SSpecialProjectCondition {
	return &common_model.SSpecialProjectCondition{
		ProjectName:     req.ProjectName,
		ProjectStatus:   conv.MustInt(req.ProjectStatus, 4),
		ProjectType:     conv.MustInt(req.ProjectType, 2),
		ProjectPlatform: conv.MustInt(req.ProjectPlatform, 0),
		ProjectForm:     conv.MustInt(req.ProjectForm, 0),
		ContentType:     conv.MustInt(req.ProjectContentType, 0),
		SProjectStatus:  conv.MustInt(req.SProjectStatus, 0),
	}
}
