package com.zhongshu.card.client.model.dahua;

import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class BaseRequestModel {


    /**
     * 接口名称
     */
    private String service;

    /**
     * 接入平台id
     */
    String accesser_id;


    /**
     * 签名方式
     */
    final String sign_type = "SHA-256";


    /**
     * 请求时间
     */
    private String request_date;

    /**
     * 请求流水号
     */
    private String request_seq;


    public BaseRequestModel(String service) {
        Date date = new Date();
        request_date = DateUtil.format(date, "yyyyMMddhhmmss");
        request_seq = IdUtil.simpleUUID();
        this.service = service;
    }

}
