Open cjavier opened 9 years ago
ORGANIZATION MEMBERS t.integer "user_id", :null => false t.integer "organization_id", :null => false t.string "level", :null => false t.datetime "created_at", :null => false t.datetime "updated_at", :null => false t.string "payment_code" t.date "paid_at" t.string "stripe_customer_id" t.integer "cc_exp_month" t.integer "cc_exp_year" t.string "cc_last4" t.string "cc_type" t.string "stripe_charge_id"
create_table "organizations", :force => true do |t| t.string "name", :null => false t.string "organization_type" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false t.string "stripe_customer_id" t.integer "cc_exp_month" t.integer "cc_exp_year" t.string "cc_last4" t.string "cc_type" t.integer "cc_user_id" t.string "brightidea_api_key" t.date "trial_end_date" t.boolean "invoice_billing", :default => false, :null => false t.boolean "auto_locked", :default => false, :null => false t.boolean "admin_locked", :default => false, :null => false t.text "admin_comments" t.integer "promotion_id" t.datetime "promotion_expires_at" t.decimal "member_price", :precision => 10, :scale => 2
create_table "promotions", :force => true do |t| t.string "name", :null => false t.string "code", :null => false t.integer "monthly_discount_percent" t.integer "months" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false end
create_table "subscription_levels", :force => true do |t| t.string "name", :null => false t.string "tagline" t.text "description" t.boolean "available", :default => true, :null => false t.decimal "monthly_price", :precision => 10, :scale => 2 t.decimal "yearly_price", :precision => 10, :scale => 2 t.integer "max_projects" t.integer "max_members" t.integer "max_storage_mb" t.boolean "support_email", :default => true, :null => false t.boolean "support_chat", :default => false, :null => false t.boolean "support_phone", :default => false, :null => false t.datetime "created_at", :null => false t.datetime "updated_at", :null => false end
create_table "subscriptions", :force => true do |t| t.integer "organization_id", :null => false t.integer "subscription_level_id", :null => false t.boolean "yearly", :default => false, :null => false t.decimal "price", :precision => 10, :scale => 2, :null => false t.date "start_date", :null => false t.date "end_date" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false end
create_table "charges", :force => true do |t| t.integer "organization_id" t.decimal "amount", :precision => 10, :scale => 2 t.integer "num_members" t.decimal "member_price", :precision => 10, :scale => 2 t.text "comments" t.date "period_start", :null => false t.date "period_end", :null => false t.string "stripe_charge_id" t.datetime "created_at", :null => false t.datetime "updated_at",
PROJECTS "stripe_customer_id" t.integer "cc_exp_month" t.integer "cc_exp_year" t.string "cc_last4" t.string "cc_type" t.integer "cc_user_id" t.decimal "price", :precision => 10, :scale => 2 t.string "payment_code" t.date "paid_at"