package com.fs.hospital580.dto;

import com.fs.hospital580.util.ObjectApiSignUtil;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.Date;

@Setter
@Getter
public class CommonDto implements Serializable {
    private String clientId;
    private String timeStamp;
    private String sign;

    public void initCommonDto(String clientId, String secretKey) {
        this.clientId = clientId;
        this.timeStamp = new Date().getTime() + "";
        this.sign = ObjectApiSignUtil.getSign(this, secretKey);
    }
}
