package types

type MarriageReq struct {
	Name   string `json:"name" validate:"required,name"`
	IDCard string `json:"id_card" validate:"required,idCard"`
	Mobile string `json:"mobile" validate:"required,mobile"`
	Code   string `json:"code" validate:"required"`
}
type HomeServiceReq struct {
	Name   string `json:"name" validate:"required,name"`
	IDCard string `json:"id_card" validate:"required,idCard"`
	Mobile string `json:"mobile" validate:"required,mobile"`
	Code   string `json:"code" validate:"required"`
}

// RiskAssessment 查询请求结构
type RiskAssessmentReq struct {
	Name   string `json:"name" validate:"required,name"`
	IDCard string `json:"id_card" validate:"required,idCard"`
	Mobile string `json:"mobile" validate:"required,mobile"`
	Code   string `json:"code" validate:"required"`
}

// CompanyInfo 查询请求结构
type CompanyInfoReq struct {
	Name   string `json:"name" validate:"required,name"`
	IDCard string `json:"id_card" validate:"required,idCard"`
	Mobile string `json:"mobile" validate:"required,mobile"`
	Code   string `json:"code" validate:"required"`
}

// RentalInfo 查询请求结构
type RentalInfoReq struct {
	Name   string `json:"name" validate:"required,name"`
	IDCard string `json:"id_card" validate:"required,idCard"`
	Mobile string `json:"mobile" validate:"required,mobile"`
	Code   string `json:"code" validate:"required"`
}

// PreLoanBackgroundCheck 查询请求结构
type PreLoanBackgroundCheckReq struct {
	Name   string `json:"name" validate:"required,name"`
	IDCard string `json:"id_card" validate:"required,idCard"`
	Mobile string `json:"mobile" validate:"required,mobile"`
	Code   string `json:"code" validate:"required"`
}

// BackgroundCheck 查询请求结构
type BackgroundCheckReq struct {
	Name   string `json:"name" validate:"required,name"`
	IDCard string `json:"id_card" validate:"required,idCard"`
	Mobile string `json:"mobile" validate:"required,mobile"`
	Code   string `json:"code" validate:"required"`
}
type PersonalDataReq struct {
	Name   string `json:"name" validate:"required,name"`
	IDCard string `json:"id_card" validate:"required,idCard"`
	Mobile string `json:"mobile" validate:"required,mobile"`
	Code   string `json:"code" validate:"required"`
}
type EntLawsuitReq struct {
	EntName string `json:"ent_name" validate:"required,name"`
	EntCode string `json:"ent_code" validate:"required,USCI"`
	Mobile  string `json:"mobile" validate:"required,mobile"`
	Code    string `json:"code" validate:"required"`
}

// EnterpriseLawsuitSimple 企业司法涉诉简版（QYGL66SL）：仅企业名称，授权信息由后端补齐
type EnterpriseLawsuitSimpleReq struct {
	EntName string `json:"ent_name" validate:"required"`
}

// LimitHighExecuted 限高被执行人（FLXG3A9B）
type LimitHighExecutedReq struct {
	Name       string `json:"name" validate:"required,name"`
	IDCard     string `json:"id_card" validate:"required,idCard"`
	Mobile     string `json:"mobile" validate:"required,mobile"`
	Authorized string `json:"authorized"` // 可选，后端默认 1
}

// DishonestExecuted 失信被执行人（QYGL2S0W）
type DishonestExecutedReq struct {
	Type   string `json:"type"` // 可选，后端默认 per
	Name   string `json:"name" validate:"required,name"`
	IDCard string `json:"id_card" validate:"required,idCard"`
}

// PersonalBadRecord 本人不良（FLXGDEA9）：姓名 + 身份证（授权由 ApiRequest 默认传 1）
type PersonalBadRecordReq struct {
	Name   string `json:"name" validate:"required,name"`
	IDCard string `json:"id_card" validate:"required,idCard"`
}

// TocPersonEnterprisePro 人企关系加强版预查询：仅身份证号
type TocPersonEnterpriseProReq struct {
	IDCard string `json:"id_card" validate:"required,idCard"`
}

type TocPhoneThreeElements struct {
	Name   string `json:"name" validate:"required,name"`
	IDCard string `json:"id_card" validate:"required,idCard"`
	Mobile string `json:"mobile" validate:"required,mobile"`
}
type TocPhoneTwoElements struct {
	Name   string `json:"name" validate:"required,name"`
	Mobile string `json:"mobile" validate:"required,mobile"`
}
type TocIDCardTwoElements struct {
	Name   string `json:"name" validate:"required,name"`
	IDCard string `json:"id_card" validate:"required,idCard"`
}
type TocDualMarriage struct {
	NameMan     string `json:"name_man" validate:"required,name"`
	IDCardMan   string `json:"id_card_man" validate:"required,idCard"`
	NameWoman   string `json:"name_woman" validate:"required,name"`
	IDCardWoman string `json:"id_card_woman" validate:"required,idCard"`
}

// TocDualMarriageReq 双人婚姻状态查询（含手机号与验证码）
type TocDualMarriageReq struct {
	NameMan     string `json:"name_man" validate:"required,name"`
	IDCardMan   string `json:"id_card_man" validate:"required,idCard"`
	NameWoman   string `json:"name_woman" validate:"required,name"`
	IDCardWoman string `json:"id_card_woman" validate:"required,idCard"`
	Mobile      string `json:"mobile" validate:"required,mobile"`
	Code        string `json:"code" validate:"required"`
}
type TocPersonVehicleVerification struct {
	Name       string `json:"name" validate:"required,name"`
	CarType    string `json:"car_type" validate:"required"`
	CarLicense string `json:"car_license" validate:"required"`
}

// 银行卡黑名单
type TocBankCardBlacklist struct {
	Name     string `json:"name" validate:"required,name"`
	IDCard   string `json:"id_card" validate:"required,idCard"`
	Mobile   string `json:"mobile" validate:"required,mobile"`
	BankCard string `json:"bank_card" validate:"required"`
}

// 手机号码风险
type TocPhoneNumberRisk struct {
	Mobile string `json:"mobile" validate:"required,mobile"`
}

// 手机二次卡
type TocPhoneSecondaryCard struct {
	Mobile    string `json:"mobile" validate:"required,mobile"`
	StartDate string `json:"start_date" validate:"required"`
}

type AgentQueryData struct {
	Mobile string `json:"mobile"`
	Code   string `json:"code"`
}

// 名下车辆(数量) QCXG4D2E：仅 user_type(1-ETC开户人 2-车辆所有人 3-ETC经办人)+id_card，无验证码
type TocVehiclesUnderNameCountReq struct {
	UserType string `json:"user_type"` // 必填，默认 1
	IDCard   string `json:"id_card" validate:"required,idCard"`
}

// 车辆静态信息/过户详版等 仅 vin_code（车辆类不要求手机号与验证码）
type TocVehicleVinCodeReq struct {
	VinCode string `json:"vin_code" validate:"required"`
	Mobile  string `json:"mobile"`
	Code    string `json:"code"`
}

// 车辆里程记录(混合) QCXG1U4U
type TocVehicleMileageMixedReq struct {
	VinCode string `json:"vin_code" validate:"required"`
	PlateNo string `json:"plate_no"`
	// 回调地址由后端在调用第三方接口时自动生成，不再由前端透传
	ReturnURL    string `json:"return_url"`
	ImageURL     string `json:"image_url" validate:"required"`
	RegURL       string `json:"reg_url"`
	EngineNumber string `json:"engine_number"`
	Mobile       string `json:"mobile"`
	Code         string `json:"code"`
}

// 二手车VIN估值 QCXGY7F2
type TocVehicleVinValuationReq struct {
	VinCode               string `json:"vin_code" validate:"required"`
	VehicleName           string `json:"vehicle_name"`
	VehicleLocation       string `json:"vehicle_location" validate:"required"`
	FirstRegistrationDate string `json:"first_registrationdate" validate:"required"` // yyyy-MM
	Color                 string `json:"color"`
	Mobile                string `json:"mobile"`
	Code                  string `json:"code"`
}

// 车辆过户简版 QCXG1H7Y
type TocVehicleTransferSimpleReq struct {
	VinCode string `json:"vin_code" validate:"required"`
	PlateNo string `json:"plate_no"`
	Mobile  string `json:"mobile"`
	Code    string `json:"code"`
}

// 车辆维保简版 QCXG3Y6B
type TocVehicleMaintenanceSimpleReq struct {
	VinCode string `json:"vin_code" validate:"required"`
	PlateNo string `json:"plate_no"`
	// 回调地址由后端在调用第三方接口时自动生成，不再由前端透传
	ReturnURL    string `json:"return_url"`
	ImageURL     string `json:"image_url"`
	RegURL       string `json:"reg_url"`
	EngineNumber string `json:"engine_number"`
	Mobile       string `json:"mobile"`
	Code         string `json:"code"`
}

// 车辆维保详细版 QCXG3Z3L
type TocVehicleMaintenanceDetailReq struct {
	VinCode string `json:"vin_code" validate:"required"`
	PlateNo string `json:"plate_no"`
	// 回调地址由后端在调用第三方接口时自动生成，不再由前端透传
	ReturnURL    string `json:"return_url"`
	ImageURL     string `json:"image_url"`
	EngineNumber string `json:"engine_number"`
	Mobile       string `json:"mobile"`
	Code         string `json:"code"`
}

// 车辆出险详版 QCXGP00W，vlphoto_data 加密后以 data 字段提交
type TocVehicleClaimDetailReq struct {
	VinCode string `json:"vin_code" validate:"required"`
	PlateNo string `json:"plate_no"`
	// 回调地址由后端在调用第三方接口时自动生成，不再由前端透传
	ReturnURL   string `json:"return_url"`
	VlphotoData string `json:"vlphoto_data" validate:"required"` // 行驶证图片 base64，加密后传 API 的 data
	Mobile      string `json:"mobile"`
	Code        string `json:"code"`
}

// 车辆出险记录核验 QCXG6B4E，VINCode；Authorized 由后端默认传 1
type TocVehicleClaimVerifyReq struct {
	VINCode    string `json:"vin_code" validate:"required"`
	Authorized string `json:"authorized"` // 可选，后端默认 1
	Mobile     string `json:"mobile"`
	Code       string `json:"code"`
}
type AgentIdentifier struct {
	Product string `json:"product"`
	AgentID int64  `json:"agent_id"`
	Price   string `json:"price"`
}

// --------------- 核验工具（verify feature.md）---------------
// 公安二要素 IVYZ9K7F：请求用 mobile，缓存/API 用 mobile_no
type TocVerifyAuthTwoReq struct {
	MobileNo string `json:"mobile" validate:"required,mobile"` // 前端传 mobile
	IDCard   string `json:"id_card" validate:"required,idCard"`
	Name     string `json:"name" validate:"required,name"`
}

// 公安三要素 IVYZA1B3：photo_data, id_card, name
type TocVerifyAuthThreeReq struct {
	PhotoData string `json:"photo_data" validate:"required"` // 人像 base64
	IDCard    string `json:"id_card" validate:"required,idCard"`
	Name      string `json:"name" validate:"required,name"`
}

// 职业资格证书 IVYZ6M8P：id_card, name
type TocVerifyCertReq struct {
	IDCard string `json:"id_card" validate:"required,idCard"`
	Name   string `json:"name" validate:"required,name"`
}

// 个人消费能力 JRZQ8B3C
type TocVerifyConsumptionReq struct {
	MobileNo string `json:"mobile" validate:"required,mobile"`
	IDCard   string `json:"id_card" validate:"required,idCard"`
	Name     string `json:"name" validate:"required,name"`
}

// 运营商二要素 YYSY3M8S
type TocVerifyYysTwoReq struct {
	MobileNo string `json:"mobile" validate:"required,mobile"`
	Name     string `json:"name" validate:"required,name"`
}

// 全网手机三要素 YYSYK9R4
type TocVerifyYysThreeReq struct {
	MobileNo string `json:"mobile" validate:"required,mobile"`
	IDCard   string `json:"id_card" validate:"required,idCard"`
	Name     string `json:"name" validate:"required,name"`
}

// 仅手机号：YYSYF2T7/YYSYK8R3/YYSYS9W1/YYSYE7V5/YYSYP0T4/YYSY9E4A
type TocVerifyMobileOnlyReq struct {
	MobileNo string `json:"mobile" validate:"required,mobile"`
}

// 手机消费区间 YYSY6F2B
type TocVerifyYysConsumptionReq struct {
	MobileNo   string `json:"mobile" validate:"required,mobile"`
	Authorized string `json:"authorized" validate:"required"` // 0/1
}

// 名下企业关联 QYGL5F6A：id_card 选填
type TocVerifyEntRelationReq struct {
	IDCard string `json:"id_card"` // 可选
}

// 银行卡四要素 JRZQACAB
type TocVerifyBankFourReq struct {
	MobileNo string `json:"mobile" validate:"required,mobile"`
	IDCard   string `json:"id_card" validate:"required,idCard"`
	BankCard string `json:"bank_card" validate:"required"`
	Name     string `json:"name" validate:"required,name"`
}

// 银行卡黑名单 JRZQ0B6Y
type TocVerifyBankBlackReq struct {
	MobileNo string `json:"mobile" validate:"required,mobile"`
	IDCard   string `json:"id_card" validate:"required,idCard"`
	Name     string `json:"name" validate:"required,name"`
	BankCard string `json:"bank_card" validate:"required"`
}
