import { v4 as uuidv4 } from 'uuid';
import { Payload, PayloadBody } from 'ec-base';

export class WexinFinishOrderPayload extends Payload {
    static TOPIC: string = 'wexin-finish-order';
    static VERSION: string = '1.0';
    body: WexinFinishOrderPayloadBody;
    constructor() {
        super()
        super.msgId = uuidv4().replace(/-/g, '')
        super.msgTye = 'kt_ec'
        super.topic = 'wexin-finish-order'
        super.version = '1.0'
    }
}

export class WexinFinishOrderPayloadBody implements PayloadBody {
    name?: string
    age?: number
    sex?: number
    birthday?: Date
    enable?: boolean
}