Afrostream / afrostream-back-end

Simple backo for afrostream
1 stars 0 forks source link

database: importing billings custom types inside afrostream backend #415

Open syndr0m opened 7 years ago

syndr0m commented 7 years ago
CREATE TYPE chartmogul_merge_status AS ENUM
   ('slave',
    'master',
    'pending',
    'waiting',
    'failed',
    'ignore');

CREATE TYPE collection_mode AS ENUM
   ('automatic',
    'manual');

CREATE TYPE coupon_action AS ENUM
   ('sale_update',
    'stock_update',
    'expire',
    'incident_update',
    'destruction_update');

CREATE TYPE coupon_campaign_type AS ENUM
   ('standard',
    'sponsorship',
    'prepaid',
    'promo');

CREATE TYPE coupon_status AS ENUM
   ('waiting',
    'expired',
    'redeemed',
    'pending');

CREATE TYPE discount_duration AS ENUM
   ('once',
    'forever',
    'repeating');

CREATE TYPE discount_duration_unit AS ENUM
   ('month',
    'year');

CREATE TYPE discount_type AS ENUM
   ('none',
    'amount',
    'percent');

CREATE TYPE generated_mode AS ENUM
   ('single',
    'bulk');

CREATE TYPE partner_order_processing_status AS ENUM
   ('waiting',
    'pending',
    'processing',
    'processed',
    'error',
    'aborted');

CREATE TYPE partner_order_type AS ENUM
   ('coupons');

CREATE TYPE payment_method_type AS ENUM
   ('card',
    'sepa',
    'paypal',
    'applepay',
    'googlepay',
    'coupon_standard',
    'coupon_prepaid',
    'coupon_sponsorship',
    'carrier_billing',
    'default',
    'bitcoin',
    'mobile_money',
    'standard',
    'prepaid',
    'sponsorship');

CREATE TYPE plan_cycle AS ENUM
   ('once',
    'auto');

CREATE TYPE plan_period_unit AS ENUM
   ('day',
    'month',
    'year');

CREATE TYPE processing_status AS ENUM
   ('waiting',
    'running',
    'done',
    'error',
    'aborted',
    'postponed');

CREATE TYPE processing_type AS ENUM
   ('subs_request_renew',
    'subs_response_renew',
    'subs_request_cancel',
    'subs_response_cancel',
    'subs_refresh',
    'subs_expire_canceled',
    'subs_expire_ended',
    'transactions_export',
    'subscriptions_export',
    'stats_generator',
    'csvs_generator',
    'sync_customers',
    'merge_customers',
    'chartmogul_sync_customers',
    'chartmogul_merge_customers',
    'logista_sales_reporting',
    'logista_stocks_reporting',
    'logista_incidents_reporting',
    'logista_destruction_reporting');

CREATE TYPE sold_status AS ENUM
   ('unsold',
    'sold');

CREATE TYPE subscription_action AS ENUM
   ('request_renew',
    'response_renew',
    'request_cancel',
    'response_cancel',
    'refresh',
    'refresh_renew',
    'refresh_cancel',
    'expire',
    'refresh_expire');

CREATE TYPE subscription_status AS ENUM
   ('active',
    'canceled',
    'expired',
    'future',
    'pending_active',
    'pending_canceled',
    'pending_expired',
    'requesting_canceled');

CREATE TYPE transaction_status AS ENUM
   ('waiting',
    'success',
    'declined',
    'void',
    'failed',
    'canceled');

CREATE TYPE transaction_type AS ENUM
   ('purchase',
    'refund',
    'verify');

CREATE TYPE trial_period_unit AS ENUM
   ('day',
    'month');

CREATE TYPE update_type AS ENUM
   ('hook',
    'api',
    'import',
    'sync');