package pack

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

func HttpSProjectListRequestToCondition(req *http_model.SProjectListRequest) *common_model.SProjectCondition {
	return &common_model.SProjectCondition{
		SProjectId:      req.SProjectId,
		ProjectId:       req.ProjectId,
		ProjectName:     req.ProjectName,
		ProjectStatus:   conv.MustInt(req.ProjectStatus, 0),
		ProjectType:     conv.MustInt(req.ProjectType, 0),
		ProjectPlatform: conv.MustInt(req.ProjectPlatform, 0),
		ProjectForm:     conv.MustInt(req.ProjectForm, 0),
		ContentType:     conv.MustInt(req.ContentType, 0),
	}
}
