package com.za.bean

import android.os.Parcel
import android.os.Parcelable

data class DriverInfo(
	var userPortrait : String? = "", //用户头像
	var token : String? = null, //
	var rongyunToken : String? = null,
	var logTime : String? = null,
	var userId : Int? = null, //用户id
	var userName : String? = null, //用户姓名
	var userPhone : String? = null, //用户手机号
	var callphone : String? = null,
	var supplierId : Int? = null, //经销商id
	var supplierName : String? = null, //经销商名称
	var supplierType : Int? = null, //经销商类型 1子公司  2供应商
	var loginLogId : Int? = null,
	var serviceList : List<String>? = null, //车辆服务列表
	var assistUserCode : String? = null,
	val authStatus : Int? = null, // 0 未认证  1 已认证
)

data class GeneralInfo(
	var userId : Int? = null, //用户id
	val userName : String? = null, //用户名
	val userPhone : String? = null,
	val userPortrait : String? = null, //大头照
	val vehicleId : Int? = null,
	val vehicleName : String? = null,
	val vehicleState : Int? = null, //车辆状态 0 空闲 1 忙碌
	val supplierId : Int? = null,
	val loginLogId : Int? = null,
	val supplierName : String? = null,
	val supplierType : Int?,
	val plateNumber : String? = null, //车牌号
	val serviceList : List<String>? = null,
	val deviceId : String? = null,
	val authStatus : Int? = null, // 0 未认证  1 已认证
)

data class DriverIdentityAuthWebRequest(val vehicleId : Int? = null,
	val driverId : Int? = null,
	val redirectUrl : String = "https://www.sinoassist.com?esignAppScheme=zd_sinoassist://demo/realBack")

data class DriverIdentityAuthWebBean(val flowId : String? = null,
	val shortLink : String? = null,
	val url : String? = null)


//public Integer update;//是否强制更新(1:强制更新；0：非强制更新)
//public String path;//更新路径
//public String newAppVersion;//版本号
//public String description;//版本更新内容
data class UpdateVersionBean(val update : Int? = null,
	val path : String? = null,
	val newAppVersion : String? = null,
	val description : String? = null)

//public String appVersion;//版本号
//public Integer appType = 1;//app类型
data class UpdateVersionRequest(val appVersion : String? = null, val appType : Int? = 1)


// private String jobCode;
//    private String phone;
//    private String taskCode;
//    private String rescueVehicle;
//    private String deviceId;
//    private String vehicleId;
data class LoginWithTaskRequest(val jobCode : String? = null,
	val phone : String? = null,
	val taskCode : String? = null,
	val rescueVehicle : String? = null,
	val deviceId : String? = null,
	val vehicleId : String? = null)

//{
//    "code": 0,
//    "msg": "请求成功",
//    "result": {
//        "supplierName": "上海安畅",
//        "vehicleName": "小小宋车辆(1）",
//        "supplierId": 1128,
//        "userPhone": "17630035658",
//        "userName": "宋志领",
//        "userId": 4967,
//        "token": "c969499d5ac9cbb9da2691ee7533f065",
//        "loginLogId": 10267,
//        "userPortrait": "http://file.sino-assist.com/group1/M00/04/E1/wKgBzGfZHjCAW8_MAAQsluXYmmc152.jpg?date=2025-03-18",
//        "serviceList": [
//            "故障--平板拖车",
//            "换胎",
//            "搭电",
//            "抢修",
//            "送水",
//            "缺汽油",
//            "缺机油",
//            "事故--平板拖车",
//            "困境救援",
//            "困境-吊车",
//            "困境救援-事故",
//            "困境救援-故障",
//            "电话技术支持",
//            "电话技术解决",
//            "派送备用钥匙",
//            "待命点间调拨",
//            "商品车运输",
//            "故障--大型拖车",
//            "故障--小型拖车",
//            "事故--大型拖车",
//            "事故--小型拖车",
//            "车辆检测",
//            "送防冻液",
//            "其他",
//            "故障拖车（免拖100公里）",
//            "代验车--取车",
//            "代验车--送车",
//            "代验车-取件",
//            "代验车--送件",
//            "应急道路救援",
//            "3吨拖车",
//            "8吨拖车",
//            "25吨拖车",
//            "50吨拖车",
//            "大力神拖车",
//            "代提车-拖车",
//            "现场小修--解档",
//            "地库救援（不含拖车）",
//            "故障拖车（免拖50公里）",
//            "充电拖车-双程",
//            "代客充电",
//            "充气",
//            "移动充电",
//            "代验车--现场代办",
//            "代验车--快递代办",
//            "代验车--取车代办",
//            "长途拖车",
//            "大板运输",
//            "商品车调拨",
//            "失车定位",
//            "医疗急救",
//            "高速救援",
//            "代客洗车",
//            "代提车-代驾",
//            "回程车运输",
//            "上门交付",
//            "充电拖车-单程"
//        ],
//        "vehicleId": 327732,
//        "supplierType": 1,
//        "jobNumber": "宋志领"
//    }
//}
data class LoginWithTaskBean(val supplierName : String? = null,
	val vehicleName : String? = null,
	val supplierId : Int? = null,
	val userPhone : String? = null,
	val userName : String? = null,
	val userId : Int? = null,
	val token : String? = null,
	val loginLogId : Int? = null,
	val userPortrait : String? = null,
	val serviceList : List<String>? = null,
	val jobNumber : String? = null,
	val vehicleId : Int? = null,
	val supplierType : Int? = null)

data class AppNewDriverInfoDTO(val userId : Int? = null,
	val userName : String? = null,
	val userPhone : String? = null,
	val supplierCode : String? = null,
	val appLoginCode : String? = null,
	val supplierId : Int? = null,
	val supplierName : String? = null,
	val supplierType : Int? = null,
	val authStatus : Int? = null,
	val tiedVehicle : VehicleInfo? = null, //绑定的车辆,如果该服务商下面绑定的有车辆，则返回绑定车辆信息
	val loginTime : String? = null) : Parcelable {
	constructor(parcel : Parcel) : this(parcel.readValue(Int::class.java.classLoader) as? Int,
		parcel.readString(),
		parcel.readString(),
		parcel.readString(),
		parcel.readString(),
		parcel.readValue(Int::class.java.classLoader) as? Int,
		parcel.readString(),
		parcel.readValue(Int::class.java.classLoader) as? Int,
		parcel.readValue(Int::class.java.classLoader) as? Int,
		parcel.readParcelable(VehicleInfo::class.java.classLoader),
		parcel.readString()) {
	}

	override fun writeToParcel(parcel : Parcel, flags : Int) {
		parcel.writeValue(userId)
		parcel.writeString(userName)
		parcel.writeString(userPhone)
		parcel.writeString(supplierCode)
		parcel.writeString(appLoginCode)
		parcel.writeValue(supplierId)
		parcel.writeString(supplierName)
		parcel.writeValue(supplierType)
		parcel.writeValue(authStatus)
		parcel.writeParcelable(tiedVehicle, flags)
		parcel.writeString(loginTime)
	}

	override fun describeContents() : Int {
		return 0
	}

	companion object CREATOR : Parcelable.Creator<AppNewDriverInfoDTO> {
		override fun createFromParcel(parcel : Parcel) : AppNewDriverInfoDTO {
			return AppNewDriverInfoDTO(parcel)
		}

		override fun newArray(size : Int) : Array<AppNewDriverInfoDTO?> {
			return arrayOfNulls(size)
		}
	}
}