import { v4 as uuidv4 } from 'uuid';
import { PayloadBody } from './PayloadBody';

export abstract class Payload {
    protected msgId: string;
    protected msgTye: string;
    body: PayloadBody;

    constructor(body?: PayloadBody) {
        this.msgId = uuidv4().replace(/-/g, '')
        this.msgTye = 'kt_ec'
        this.body = body;
    }

    abstract getTopic(): string

    abstract getVersion(): string

    abstract getMajorVersion(): number

    getMsgId(): string {
        return this.msgId
    }
}