UNPKG

@lomray/microservice-payment-stripe

Version:

Stripe payment microservice based on NodeJS & inverted json.

28 lines (24 loc) 1.78 kB
'use strict'; var tslib = require('tslib'); class payout1704980509990 { constructor() { this.name = 'payout1704980509990'; } up(queryRunner) { return tslib.__awaiter(this, void 0, void 0, function* () { yield queryRunner.query(`CREATE TYPE "public"."payout_method_enum" AS ENUM('standard', 'instant')`); yield queryRunner.query(`CREATE TYPE "public"."payout_type_enum" AS ENUM('card', 'bankAccount')`); yield queryRunner.query(`CREATE TYPE "public"."payout_status_enum" AS ENUM('paid', 'pending', 'inTransit', 'canceled', 'failed')`); yield queryRunner.query(`CREATE TABLE "payout" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "payoutId" character varying(66) NOT NULL, "amount" integer NOT NULL, "destination" character varying(66) NOT NULL, "method" "public"."payout_method_enum" NOT NULL, "type" "public"."payout_type_enum" NOT NULL, "status" "public"."payout_status_enum" NOT NULL, "currency" character varying(10) NOT NULL, "failureCode" character varying(20), "failureMessage" text, "description" text, "arrivalDate" TIMESTAMP WITH TIME ZONE NOT NULL, "params" json NOT NULL DEFAULT '{}', "createdAt" TIMESTAMP NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "payout(pk):id" PRIMARY KEY ("id"))`); }); } down(queryRunner) { return tslib.__awaiter(this, void 0, void 0, function* () { yield queryRunner.query(`DROP TYPE "public"."payout_status_enum"`); yield queryRunner.query(`DROP TYPE "public"."payout_type_enum"`); yield queryRunner.query(`DROP TYPE "public"."payout_method_enum"`); yield queryRunner.query(`DROP TABLE "payout"`); }); } } module.exports = payout1704980509990;