import { IMessageHead } from '@/services/socket/trade/protobuf/proto'
import Long from 'long'

declare global {
    namespace Proto {
        /** 违约申请请求 */
        interface PerformanceContractedApplyReq {
            Header?: IMessageHead;
            PerformancePlanID: Long; // uint64 履约计划ID
            BreachType: number; // uint32 违约方类型
            Applicant: number; // uint64 违约申请人
            ApplyRemark?: string; // string 申请备注
            Attachment?: string; // string 附件
        }

        /** 违约申请应答 */
        interface PerformanceContractedApplyRsp {
            Header?: IMessageHead;
            RetCode: number; // int32 返回码
            RetDesc: string; // string 描述信息
            PerformancePlanID: number; // uint64 履约计划ID
        }

        /** 延期申请请求 */
        interface PerformanceDelayApplyReq {
            Header?: IMessageHead;
            PerformancePlanStepID: Long; // uint64 履约计划步骤ID
            delaydays?: number; // uint32 申请延期天数
            applicant: number; // uint64 申请人
            applyremark?: string; // string 申请备注
        }

        /** 延期申请应答 */
        interface PerformanceDelayApplyRsp {
            Header?: IMessageHead;
            RetCode: number; // int32 返回码
            RetDesc: string; // string 描述信息
            PerformancePlanStepID: Long; // uint64 履约计划步骤ID
            applicant: number; // uint64 申请人
        }

        /** 履约手动确认请求 */
        interface PerformanceManualConfirmReq {
            Header?: IMessageHead;
            PerformancePlanStepID: Long; // uint64 履约计划步骤ID
            OverShortAmount?: number; // double 溢短金额
            PerformanceExecuteSide: number; // uint32 履约步骤执行方 1买方 2 卖方
            StepRemark: string; // string 步骤备注
            OverShortQty?: number; // double 溢短数量
            ExpressFee?: number; // double 运费金额
        }

        /** 履约手动确认应答 */
        interface PerformanceManualConfirmRsp {
            Header?: IMessageHead;
            RetCode: number; // int32 返回码
            RetDesc: string; // string 描述信息
            PerformancePlanStepID: number; // uint64 履约计划步骤ID
        }

        /** 履约修改联络信息请求 */
        interface PerformanceModifyContactReq {
            Header?: IMessageHead;
            PerformancePlanID: Long; // uint64 履约计划ID
            AccountID: number; // uint64 账号
            ContactInfo: string; // string 联络信息
        }

        /** 履约修改联络信息回应 */
        interface PerformanceModifyContactRsp {
            Header?: IMessageHead;
            RetCode: number; // int32 返回码
            RetDesc: string; // string 描述信息
            PerformancePlanID: number; // uint64 履约计划ID
            AccountID: number; // uint64 账号
        }
    }
}