package model

// 영화사 목록 검색 변수
type SearchCompanyListParams struct {
	Key           string `form:"key" url:"key" binding:"required"`
	CurPage       int    `form:"curPage" url:"curPage,omitempty"`
	ItemPerPage   int    `form:"itemPerPage" url:"itemPerPage,omitempty"`
	CompanyNm     string `form:"companyNm" url:"companyNm,omitempty"`
	CeoNm         string `form:"ceoNm" url:"ceoNm,omitempty"`
	CompanyPartCd string `form:"companyPartCd" url:"companyPartCd,omitempty"`
}

// 영화사 목록 응답 변수
type SearchCompanyList struct {
	CompanyListResult struct {
		TotCnt      int               `json:"totCnt"`
		Source      string            `json:"source"`
		CompanyList []CompanyListInfo `json:"companyList"`
	} `json:"companyListResult"`
}

type CompanyListInfo struct {
	CompanyCd        string `json:"companyCd"`
	CompanyNm        string `json:"companyNm"`
	CompanyNmEn      string `json:"companyNmEn"`
	CompanyPartNames string `json:"companyPartNames"`
	CeoNm            string `json:"ceoNm"`
	FilmoNames       string `json:"filmoNames"`
}

// 영화사 상세 검색 변수
type SearchCompanyInfoParams struct {
	Key       string `form:"key" url:"key" binding:"required"`
	CompanyCd string `form:"companyCd" url:"companyCd" binding:"required"`
}

// 영화사 상세 응답 변수
type SearchCompanyInfo struct {
	CompanyInfoResult struct {
		Source      string      `json:"source"`
		CompanyInfo CompanyInfo `json:"companyInfo"`
	} `json:"companyInfoResult"`
}

type CompanyInfo struct {
	CompanyCd   string         `json:"companyCd"`
	CompanyNm   string         `json:"companyNm"`
	CompanyNmEn string         `json:"companyNmEn"`
	CeoNm       string         `json:"ceoNm"`
	Parts       []CompanyPart  `json:"parts"`
	Filmos      []CompanyFilmo `json:"filmos"`
}

type CompanyPart struct {
	CompanyPartNm string `json:"companyPartNm"`
}

type CompanyFilmo struct {
	MovieCd       string `json:"movieCd"`
	MovieNm       string `json:"movieNm"`
	CompanyPartNm string `json:"companyPartNm"`
}
