Add billing (#329)

This commit is contained in:
Riccardo Graziosi
2024-05-03 18:11:07 +02:00
committed by GitHub
parent fc36c967af
commit bea146e612
63 changed files with 1354 additions and 27 deletions

View File

@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2024_04_04_161306) do
ActiveRecord::Schema.define(version: 2024_04_27_140300) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -130,6 +130,20 @@ ActiveRecord::Schema.define(version: 2024_04_04_161306) do
t.index ["user_id"], name: "index_posts_on_user_id"
end
create_table "tenant_billings", force: :cascade do |t|
t.bigint "tenant_id", null: false
t.integer "status", default: 0, null: false
t.datetime "trial_ends_at"
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.string "customer_id"
t.datetime "subscription_ends_at"
t.string "slug"
t.string "auth_token"
t.index ["slug"], name: "index_tenant_billings_on_slug", unique: true
t.index ["tenant_id"], name: "index_tenant_billings_on_tenant_id"
end
create_table "tenant_default_o_auths", force: :cascade do |t|
t.bigint "tenant_id", null: false
t.bigint "o_auth_id", null: false
@@ -211,6 +225,7 @@ ActiveRecord::Schema.define(version: 2024_04_04_161306) do
add_foreign_key "posts", "post_statuses"
add_foreign_key "posts", "tenants"
add_foreign_key "posts", "users"
add_foreign_key "tenant_billings", "tenants"
add_foreign_key "tenant_default_o_auths", "o_auths"
add_foreign_key "tenant_default_o_auths", "tenants"
add_foreign_key "tenant_settings", "tenants"