-ActiveRecord::Schema[7.0].define(version: 2024_10_25_095358) do
+ActiveRecord::Schema[7.0].define(version: 2024_11_13_073245) do
# These are extensions that must be enabled in order to support this database
enable_extension "citext"
enable_extension "hstore"
@@ -918,11 +918,19 @@
t.boolean "claimable", default: false, null: false
t.boolean "second_approval_required", default: false
t.datetime "deleted_at", precision: nil
+ t.boolean "prezzee", default: false
t.index ["code"], name: "index_custom_expense_types_on_code"
t.index ["deleted_at"], name: "index_custom_expense_types_on_deleted_at"
t.index ["employment_fund"], name: "index_custom_expense_types_on_employment_fund"
end
+ create_table "custom_expense_types_prezzee_gift_card_denominations", id: false, force: :cascade do |t|
+ t.bigint "custom_expense_type_id", null: false
+ t.bigint "prezzee_gift_card_denomination_id", null: false
+ t.index ["custom_expense_type_id", "prezzee_gift_card_denomination_id"], name: "index_custom_expense_types_prezzee_gift_card_denominations_ids"
+ t.index ["prezzee_gift_card_denomination_id", "custom_expense_type_id"], name: "index_prezzee_gift_card_denominations_custom_expense_types_ids"
+ end
+
create_table "decision_interruption_reasons", force: :cascade do |t|
t.text "name", null: false
t.datetime "deleted_at"
@@ -1272,9 +1280,13 @@
t.text "tags", default: [], array: true
t.integer "group_event_schedule_id"
t.uuid "quest_form_id"
+ t.boolean "remind_by_sms", default: false
+ t.datetime "remind_at", precision: nil
+ t.bigint "reminder_sms_template_id"
t.index ["event_calendar_id"], name: "idst_id_idx"
t.index ["jobseeker_id"], name: "index_event_calendar_schedules_on_jobseeker_id"
t.index ["quest_form_id"], name: "index_event_calendar_schedules_on_quest_form_id"
+ t.index ["reminder_sms_template_id"], name: "index_event_calendar_schedules_on_reminder_sms_template_id"
t.index ["schedule_event_id"], name: "index_event_calendar_schedules_on_schedule_event_id"
t.index ["schedule_location_id"], name: "index_event_calendar_schedules_on_schedule_location_id"
t.index ["stream_participant_id"], name: "index_event_calendar_schedules_on_stream_participant_id"
@@ -1502,6 +1514,8 @@
t.integer "finance_status_id", default: 2, null: false
t.string "payment_id"
t.boolean "linked", default: false
+ t.boolean "prezzee", default: false
+ t.string "sub_status"
t.index ["approver_id"], name: "index_expenses_on_approver_id"
t.index ["bank_transaction_id"], name: "index_expenses_on_bank_transaction_id"
t.index ["expense_payment_type_id"], name: "index_expenses_on_expense_payment_type_id"
@@ -1518,6 +1532,13 @@
t.index ["wage_subsidy_payment_schedule_id"], name: "index_expenses_on_wage_subsidy_payment_schedule_id"
end
+ create_table "expenses_prezzee_gift_card_denominations", id: false, force: :cascade do |t|
+ t.bigint "expense_id", null: false
+ t.bigint "prezzee_gift_card_denomination_id", null: false
+ t.index ["expense_id", "prezzee_gift_card_denomination_id"], name: "index_expenses_prezzee_gift_card_denominations_on_ids"
+ t.index ["prezzee_gift_card_denomination_id", "expense_id"], name: "index_prezzee_gift_card_denominations_expenses_on_ids"
+ end
+
create_table "exportling_exports", id: :serial, force: :cascade do |t|
t.integer "owner_id"
t.string "klass", null: false
@@ -2667,6 +2688,52 @@
t.index ["type"], name: "index_pps_records_on_type"
end
+ create_table "prezzee_gift_card_denominations", force: :cascade do |t|
+ t.integer "amount"
+ t.string "currency"
+ t.integer "price"
+ t.string "price_currency"
+ t.string "stock_level"
+ t.boolean "available", default: false
+ t.bigint "prezzee_gift_card_id", null: false
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ t.index ["prezzee_gift_card_id"], name: "index_prezzee_gift_card_denominations_on_prezzee_gift_card_id"
+ end
+
+ create_table "prezzee_gift_cards", force: :cascade do |t|
+ t.string "name"
+ t.string "code"
+ t.jsonb "json_data"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ end
+
+ create_table "prezzee_order_items", force: :cascade do |t|
+ t.string "reference"
+ t.string "product_code"
+ t.integer "amount"
+ t.jsonb "json_data"
+ t.bigint "prezzee_order_id", null: false
+ t.bigint "prezzee_gift_card_denomination_id", null: false
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ t.index ["prezzee_gift_card_denomination_id"], name: "index_prezzee_order_items_on_prezzee_gift_card_denomination_id"
+ t.index ["prezzee_order_id"], name: "index_prezzee_order_items_on_prezzee_order_id"
+ end
+
+ create_table "prezzee_orders", force: :cascade do |t|
+ t.string "order_uuid"
+ t.string "reference"
+ t.string "status"
+ t.integer "amount"
+ t.jsonb "json_data"
+ t.bigint "expense_id", null: false
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ t.index ["expense_id"], name: "index_prezzee_orders_on_expense_id"
+ end
+
create_table "professional_service_activities", id: :serial, force: :cascade do |t|
t.integer "jobseeker_id", null: false
t.integer "intervention_provided_by_id", null: false
@@ -4501,6 +4568,7 @@
add_foreign_key "ess_wage_subsidy_agreements", "users", column: "ended_by_id"
add_foreign_key "event_calendar_schedules", "event_calendars"
add_foreign_key "event_calendar_schedules", "quest_forms"
+ add_foreign_key "event_calendar_schedules", "sms_templates", column: "reminder_sms_template_id"
add_foreign_key "expense_approvals", "expenses"
add_foreign_key "expense_credit_cards", "users"
add_foreign_key "expense_imports", "expense_exports"
@@ -4572,6 +4640,10 @@
add_foreign_key "placements", "users", column: "pps_managed_by_id"
add_foreign_key "placements", "users", column: "pps_updated_by_id"
add_foreign_key "pps_records", "placements"
+ add_foreign_key "prezzee_gift_card_denominations", "prezzee_gift_cards"
+ add_foreign_key "prezzee_order_items", "prezzee_gift_card_denominations"
+ add_foreign_key "prezzee_order_items", "prezzee_orders"
+ add_foreign_key "prezzee_orders", "expenses"
add_foreign_key "professional_service_activities", "appointments"
add_foreign_key "professional_service_activities", "program_referrals"
add_foreign_key "professional_service_staff", "users"