company_get_item_dto.go 1.2 KB
package dto

import (
	"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
	"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_user"
)

type CompanyGetItemDto struct {
	CompanyListItemDto
	Remark string `json:"remark"`

	// 法律相关
	// 法人
	LegalPerson string `json:"legalPerson"`
	// 社会信用代码
	SocialCreditCode string `json:"socialCreditCode"`
	// 营业执照所在地
	BusinessLicenseAddress interface{} `json:"businessLicenseAddress"`
	// 营业执照-附件
	BusinessLicenseAttachments []domain.Attachment `json:"businessLicenseAttachments"`
}

func (dto *CompanyGetItemDto) LoadDto(c allied_creation_user.CompanyItem, u allied_creation_user.UserDetail) {
	companyListItemDto := &CompanyListItemDto{}
	companyListItemDto.LoadDto(c, u)
	dto.CompanyListItemDto = *companyListItemDto
	dto.Remark = c.CompanyInfo.Remark
	dto.LegalPerson = c.CompanyInfo.Legal.LegalPerson
	dto.SocialCreditCode = c.CompanyInfo.Legal.SocialCreditCode
	dto.BusinessLicenseAddress = c.CompanyInfo.Legal.BusinessLicenseAddress
	dto.BusinessLicenseAttachments = c.CompanyInfo.Legal.BusinessLicenseAttachments
}