pshq_engine 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +7 -0
- data/.travis.yml +3 -0
- data/Gemfile +4 -0
- data/README.md +39 -0
- data/Rakefile +1 -0
- data/app/models/.keep +0 -0
- data/app/models/ability.rb +76 -0
- data/app/models/alert.rb +56 -0
- data/app/models/asset.rb +485 -0
- data/app/models/asset_assignment.rb +13 -0
- data/app/models/asset_image.rb +9 -0
- data/app/models/asset_repair_request.rb +167 -0
- data/app/models/asset_scan.rb +87 -0
- data/app/models/asset_ticket.rb +3 -0
- data/app/models/cancellation.rb +64 -0
- data/app/models/candidate.rb +127 -0
- data/app/models/certification.rb +4 -0
- data/app/models/concerns/.keep +0 -0
- data/app/models/depreciation_setting.rb +10 -0
- data/app/models/dispatch.rb +3 -0
- data/app/models/employee.rb +22 -0
- data/app/models/feedback.rb +24 -0
- data/app/models/history_email.rb +221 -0
- data/app/models/importfile.rb +6 -0
- data/app/models/job.rb +37 -0
- data/app/models/jobs_users.rb +18 -0
- data/app/models/lateness.rb +35 -0
- data/app/models/location.rb +4 -0
- data/app/models/manufacturer.rb +4 -0
- data/app/models/member.rb +65 -0
- data/app/models/member_device.rb +4 -0
- data/app/models/message.rb +33 -0
- data/app/models/note.rb +20 -0
- data/app/models/notification.rb +73 -0
- data/app/models/notification_user.rb +4 -0
- data/app/models/o_auth/base.rb +27 -0
- data/app/models/o_auth/facebook.rb +21 -0
- data/app/models/o_auth/google.rb +18 -0
- data/app/models/organization.rb +189 -0
- data/app/models/plan.rb +4 -0
- data/app/models/project.rb +5 -0
- data/app/models/project_payment.rb +4 -0
- data/app/models/recurring_time_off.rb +4 -0
- data/app/models/response.rb +23 -0
- data/app/models/role.rb +22 -0
- data/app/models/schedule.rb +228 -0
- data/app/models/setting.rb +25 -0
- data/app/models/shift.rb +364 -0
- data/app/models/shift_off.rb +4 -0
- data/app/models/shift_trade.rb +43 -0
- data/app/models/subdomain.rb +5 -0
- data/app/models/swap.rb +82 -0
- data/app/models/task.rb +26 -0
- data/app/models/template.rb +59 -0
- data/app/models/template_asset.rb +3 -0
- data/app/models/timeoff.rb +101 -0
- data/app/models/token.rb +22 -0
- data/app/models/transaction.rb +2 -0
- data/app/models/unavailable.rb +37 -0
- data/app/models/user.rb +392 -0
- data/app/models/user_notification_setting.rb +178 -0
- data/app/models/user_vacation_info.rb +22 -0
- data/app/models/vacation.rb +24 -0
- data/app/models/vendor.rb +130 -0
- data/app/models/vendor_rating.rb +7 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/db/migrate/20140211085026_devise_create_users.rb +58 -0
- data/db/migrate/20140211093822_rolify_create_roles.rb +19 -0
- data/db/migrate/20140211124352_create_subdomains.rb +9 -0
- data/db/migrate/20140211175737_devise_invitable_add_to_users.rb +24 -0
- data/db/migrate/20140222020040_create_schedules.rb +13 -0
- data/db/migrate/20140222020246_create_jobs.rb +11 -0
- data/db/migrate/20140222020348_create_shifts.rb +17 -0
- data/db/migrate/20140222020425_create_organizations.rb +19 -0
- data/db/migrate/20140226070901_create_plans.rb +11 -0
- data/db/migrate/20140302152936_create_feedbacks.rb +12 -0
- data/db/migrate/20140302153059_create_swaps.rb +16 -0
- data/db/migrate/20140302153215_create_timeoffs.rb +19 -0
- data/db/migrate/20140302153302_create_cancellations.rb +13 -0
- data/db/migrate/20140306014858_create_candidates.rb +15 -0
- data/db/migrate/20140314041018_create_shift_trades.rb +15 -0
- data/db/migrate/20140314041210_create_notes.rb +11 -0
- data/db/migrate/20140314041313_create_latenesses.rb +11 -0
- data/db/migrate/20140314041351_create_vacations.rb +11 -0
- data/db/migrate/20140314041440_create_user_vacation_infos.rb +11 -0
- data/db/migrate/20140318072438_create_jobs_users.rb +10 -0
- data/db/migrate/20140325151307_create_tasks.rb +16 -0
- data/db/migrate/20140406040247_create_mailboxer.mailboxer_engine.rb +66 -0
- data/db/migrate/20140406040248_add_conversation_optout.mailboxer_engine.rb +15 -0
- data/db/migrate/20141015085628_create_alerts.rb +14 -0
- data/db/migrate/20141023104634_add_disabled_to_users.rb +5 -0
- data/db/migrate/20141024094518_add_is_viewed_to_schedules.rb +5 -0
- data/db/migrate/20141027091531_add_customer_id_to_users.rb +5 -0
- data/db/migrate/20141029124637_create_unavailables.rb +11 -0
- data/db/migrate/20141029151702_create_certifications.rb +10 -0
- data/db/migrate/20141105091745_add_reminder_time_to_shifts.rb +5 -0
- data/db/migrate/20141106054916_create_certifications_users.rb +10 -0
- data/db/migrate/20141106100123_add_birth_date_to_users.rb +5 -0
- data/db/migrate/20141106134815_add_allow_rolling_v_hrs_to_organizations.rb +5 -0
- data/db/migrate/20141107155319_create_recurring_time_offs.rb +12 -0
- data/db/migrate/20141111084845_add_termination_date_to_users.rb +5 -0
- data/db/migrate/20141111103759_add_requested_weekly_hours_to_users.rb +5 -0
- data/db/migrate/20141113094547_add_api_token_to_users.rb +5 -0
- data/db/migrate/20150105143729_create_templates.rb +9 -0
- data/db/migrate/20150105164236_add_coloumn_is_template.rb +5 -0
- data/db/migrate/20150106121306_add_org_id.rb +5 -0
- data/db/migrate/20150126070904_add_job_id_to_shifts.rb +6 -0
- data/db/migrate/20150203112955_add_time_zone_to_org.rb +5 -0
- data/db/migrate/20150204160711_add_show_owner_to_org.rb +5 -0
- data/db/migrate/20150210165627_add_training_hours_to_shift.rb +9 -0
- data/db/migrate/20150217131509_add_total_hours_to_schedules.rb +5 -0
- data/db/migrate/20150218094709_add_show_disable_users.rb +5 -0
- data/db/migrate/20150225134050_add_notes_to_cancellation.rb +9 -0
- data/db/migrate/20150226125524_add_unexcused_absence_note_to_cancellation.rb +9 -0
- data/db/migrate/20150226125811_add_cancel_shift_to_shifts.rb +9 -0
- data/db/migrate/20150302100542_add_picture_to_user.rb +9 -0
- data/db/migrate/20150304082219_add_priorty_to_user.rb +9 -0
- data/db/migrate/20150304094605_add_time_format_to_organization.rb +8 -0
- data/db/migrate/20150304142621_create_shift_offs.rb +15 -0
- data/db/migrate/20150306120726_add_shiftoff_to_shifts.rb +9 -0
- data/db/migrate/20150310103643_add_email_and_number_to_user.rb +11 -0
- data/db/migrate/20150311110055_add_one_sided_to_candidate.rb +9 -0
- data/db/migrate/20150318083934_add_notes_to_shift_trade.rb +9 -0
- data/db/migrate/20150408180855_add_column_status_to_unavailability.rb +8 -0
- data/db/migrate/20150409140324_create_assets.rb +35 -0
- data/db/migrate/20150409142753_create_vendors.rb +14 -0
- data/db/migrate/20150409144023_create_employees.rb +13 -0
- data/db/migrate/20150409144751_create_assign_assets.rb +16 -0
- data/db/migrate/20150409150449_create_asset_repair_requests.rb +19 -0
- data/db/migrate/20150409151023_create_dispatches.rb +13 -0
- data/db/migrate/20150409151329_create_vendor_ratings.rb +11 -0
- data/db/migrate/20150409151546_create_template_assets.rb +11 -0
- data/db/migrate/20150413101913_create_index_organization.rb +7 -0
- data/db/migrate/20150414153330_change_vendors.rb +16 -0
- data/db/migrate/20150420112003_add_name_to_users.rb +5 -0
- data/db/migrate/20150421074542_add_comment_to_ratings.rb +5 -0
- data/db/migrate/20150421131331_add_retire_column_to_assets.rb +5 -0
- data/db/migrate/20150422135600_add_attachment_avatar_to_assets.rb +11 -0
- data/db/migrate/20150422143242_create_importfiles.rb +8 -0
- data/db/migrate/20150422143301_add_attachment_avatar_to_importfiles.rb +11 -0
- data/db/migrate/20150423080234_change_retire_column.rb +5 -0
- data/db/migrate/20150423170953_add_attachment_avatar_to_vendors.rb +11 -0
- data/db/migrate/20150423225459_add_lockable.rb +7 -0
- data/db/migrate/20150427171842_create_asset_scans.rb +15 -0
- data/db/migrate/20150429211309_add_attachment_logo_to_organizations.rb +11 -0
- data/db/migrate/20150430074555_change_assets_table.rb +8 -0
- data/db/migrate/20150430235920_add_unique_email_index_to_users.rb +5 -0
- data/db/migrate/20150505104834_add_columntouser.rb +8 -0
- data/db/migrate/20150505140926_add_maintenance_cost_to_assets.rb +6 -0
- data/db/migrate/20150505142413_create_asset_images.rb +8 -0
- data/db/migrate/20150505152604_create_pg_search_documents.rb +17 -0
- data/db/migrate/20150506090012_change_employee.rb +12 -0
- data/db/migrate/20150506110441_add_status_to_asset_repair_requests.rb +6 -0
- data/db/migrate/20150507080738_change_phone_in_employees.rb +6 -0
- data/db/migrate/20150507101306_create_manufacturers.rb +12 -0
- data/db/migrate/20150507101446_remove.rb +9 -0
- data/db/migrate/20150507102211_add_index_manufacturer.rb +5 -0
- data/db/migrate/20150507104605_add_website_manufacturer.rb +5 -0
- data/db/migrate/20150507115535_change_refrence_manucaturer.rb +6 -0
- data/db/migrate/20150507150848_create_notifications.rb +9 -0
- data/db/migrate/20150507150855_create_notification_users.rb +10 -0
- data/db/migrate/20150508094912_add_landline_to_organization.rb +5 -0
- data/db/migrate/20150508143536_add_source_to_notifications.rb +7 -0
- data/db/migrate/20150508145048_add_postal_to_profile.rb +5 -0
- data/db/migrate/20150508162219_add_summary_to_notifications.rb +5 -0
- data/db/migrate/20150509220624_remove_responded_from_notifications.rb +5 -0
- data/db/migrate/20150509220625_add_responded_to_notifications.rb +5 -0
- data/db/migrate/20150509225608_change_columns_asset_repair_requests.rb +11 -0
- data/db/migrate/20150511105420_remove_avatar_asset.rb +6 -0
- data/db/migrate/20150514105700_add_unique_asset_id_to_asset.rb +5 -0
- data/db/migrate/20150515110042_add_deleted_at_in_assets.rb +6 -0
- data/db/migrate/20150515111410_add_deleted_at_vendors.rb +6 -0
- data/db/migrate/20150515113054_add_deleted_at_in_employee.rb +6 -0
- data/db/migrate/20150515142228_create_locations.rb +16 -0
- data/db/migrate/20150515142242_add_locations_to_assets.rb +5 -0
- data/db/migrate/20150515142536_add_organization_to_locations.rb +5 -0
- data/db/migrate/20150518123010_change_assign_asset.rb +9 -0
- data/db/migrate/20150518140153_add_asset_id_in_asset_assign.rb +5 -0
- data/db/migrate/20150518144758_rename_assign_assets.rb +8 -0
- data/db/migrate/20150518145248_rename_asset_assignment.rb +8 -0
- data/db/migrate/20150519140425_change_empid_to_string.rb +6 -0
- data/db/migrate/20150521085132_change_uique_asset_id_to_string.rb +6 -0
- data/db/migrate/20150525095045_add_status_to_organizations.rb +5 -0
- data/db/migrate/20150525123202_create_transactions.rb +20 -0
- data/db/migrate/20150526124755_create_settings.rb +16 -0
- data/db/migrate/20150603163451_add_cost_comment_collected_by_to_asset_repair_request.rb +7 -0
- data/db/migrate/20150605144111_collected.rb +5 -0
- data/db/migrate/20150609111725_add_column_notification.rb +5 -0
- data/db/migrate/20150609170014_create_user_notification_settings.rb +13 -0
- data/db/migrate/20150609175555_add_city_to_locations.rb +4 -0
- data/db/migrate/20150612190052_addcity.rb +5 -0
- data/db/migrate/20150614215015_create_members.rb +27 -0
- data/db/migrate/20150616070816_add_organization_to_schedules.rb +9 -0
- data/db/migrate/20150616114344_change_timestape_to_date.rb +4 -0
- data/db/migrate/20150619085555_add_index_repair_scan_to_repair.rb +6 -0
- data/db/migrate/20150623120915_create_depreciation_settings.rb +9 -0
- data/db/migrate/20150624060402_add_depriciation_ref_to_assets.rb +5 -0
- data/db/migrate/20150624085501_add_organization_ref_dep.rb +5 -0
- data/db/migrate/20150624114339_add_user_to_vacation_info.rb +9 -0
- data/db/migrate/20150624131422_change_dep_seeting.rb +6 -0
- data/db/migrate/20150625090838_add_dep_cost_col_in_assets.rb +5 -0
- data/db/migrate/20150626123545_add_vendor_id_to_asset.rb +5 -0
- data/db/migrate/20150629095216_add_depreciated_cost_asset.rb +5 -0
- data/db/migrate/20150629124325_add_allow_vendor_additon_to_setings.rb +7 -0
- data/db/migrate/20150630080925_add_approve_to_vendor.rb +5 -0
- data/db/migrate/20150630112252_add_referrenc_dereciation_to_asset.rb +5 -0
- data/db/migrate/20150630124838_add_ref_dep_organization.rb +5 -0
- data/db/migrate/20150707102850_add_column_sittings_to_delete_ticket.rb +6 -0
- data/db/migrate/20150710150314_add_org_ref_to_subdomain.rb +5 -0
- data/db/migrate/20150713204553_add_hire_dateto_member.rb +9 -0
- data/db/migrate/20150714004440_add_organization_to_notes.rb +9 -0
- data/db/migrate/20150714100444_add_time_format_to_member.rb +9 -0
- data/db/migrate/20150714202050_create_asset_tickets.rb +11 -0
- data/db/migrate/20150722151752_add_invitation_counts_to_user.rb +10 -0
- data/db/migrate/20150723141352_add_invitation_created_at_to_member.rb +10 -0
- data/db/migrate/20150724105130_create_projects.rb +8 -0
- data/db/migrate/20150724105257_create_project_payments.rb +13 -0
- data/db/migrate/20150724220844_add_user_index_to_asset.rb +6 -0
- data/db/migrate/20150727085046_add_projects_to_organization.rb +11 -0
- data/db/migrate/20150727122551_add_coloumn_to_vendors.rb +5 -0
- data/db/migrate/20150727211029_add_column_code_to_asset.rb +5 -0
- data/db/migrate/20150728101649_add_disabled_to_member.rb +9 -0
- data/db/migrate/20150731095354_add_column_repair_date_to_asset.rb +6 -0
- data/db/migrate/20150731104152_add_column_repair_reminder_setting.rb +5 -0
- data/db/migrate/20150806085559_create_member_devices.rb +10 -0
- data/db/migrate/20150807133155_add_view_to_alert.rb +9 -0
- data/db/migrate/20150808151840_app_col_in_member_device.rb +5 -0
- data/db/migrate/20150808180234_add_deleted_at_toalerts.rb +7 -0
- data/db/migrate/20150810110136_add_address_in_4_feilds_vendor.rb +12 -0
- data/db/migrate/20150810172933_change_column_type_in_vendors.rb +6 -0
- data/db/migrate/20150811061019_change_column_in_vendors.rb +5 -0
- data/db/migrate/20150811133002_change_shift_off_time.rb +5 -0
- data/db/migrate/20150811135657_change_column_type_timestamp_to_date.rb +7 -0
- data/db/migrate/20150818131207_create_history_emails.rb +10 -0
- data/db/migrate/20150820115042_change_schedule_total_hours.rb +6 -0
- data/db/migrate/20150820120309_add_column_email_remove.rb +5 -0
- data/db/migrate/20150820121702_add_column_email_organization.rb +5 -0
- data/db/migrate/20150824085019_add_column_asset_purchase_vendor.rb +5 -0
- data/db/migrate/20150826122944_add_column_exipry_notification.rb +5 -0
- data/db/migrate/20150827113937_create_members_roles.rb +9 -0
- data/db/migrate/20150828145913_add_locable_to_member.rb +7 -0
- data/db/migrate/20150903155708_add_vendor_feilds_to_user.rb +8 -0
- data/db/migrate/20150903200953_add_shift_to_candidate.rb +9 -0
- data/db/migrate/20150904082434_add_one_sided_to_trade_shift.rb +9 -0
- data/db/migrate/20150904134529_add_column_in_setting_user_dispatch.rb +5 -0
- data/db/migrate/20150907082501_add_website_for_vendor.rb +6 -0
- data/db/migrate/20150907141100_add_dollar_limit_to_user.rb +5 -0
- data/db/migrate/20150907193030_add_estimate_in_repair.rb +8 -0
- data/db/migrate/20150908123735_add_vendor_aproval_in_repair.rb +10 -0
- data/db/migrate/20150909112005_add_column_amount_into_plan.rb +5 -0
- data/db/migrate/20150916131512_add_plan_name_to_project_payment.rb +9 -0
- data/db/schema.rb +909 -0
- data/db/seeds.rb +23 -0
- data/lib/assets/.keep +0 -0
- data/lib/pshq_engine/version.rb +3 -0
- data/lib/pshq_engine.rb +5 -0
- data/lib/tasks/.keep +0 -0
- data/pshq_engine.gemspec +26 -0
- metadata +330 -0
data/db/schema.rb
ADDED
@@ -0,0 +1,909 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
# This file is auto-generated from the current state of the database. Instead
|
3
|
+
# of editing this file, please use the migrations feature of Active Record to
|
4
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
5
|
+
#
|
6
|
+
# Note that this schema.rb definition is the authoritative source for your
|
7
|
+
# database schema. If you need to create the application database on another
|
8
|
+
# system, you should be using db:schema:load, not running all the migrations
|
9
|
+
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
10
|
+
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
11
|
+
#
|
12
|
+
# It's strongly recommended that you check this file into your version control system.
|
13
|
+
|
14
|
+
ActiveRecord::Schema.define(version: 20150820121702) do
|
15
|
+
|
16
|
+
# These are extensions that must be enabled in order to support this database
|
17
|
+
enable_extension "plpgsql"
|
18
|
+
|
19
|
+
create_table "ahoy_events", id: false, force: true do |t|
|
20
|
+
t.uuid "id", null: false
|
21
|
+
t.uuid "visit_id"
|
22
|
+
t.integer "user_id"
|
23
|
+
t.string "name"
|
24
|
+
t.json "properties"
|
25
|
+
t.datetime "time"
|
26
|
+
end
|
27
|
+
|
28
|
+
add_index "ahoy_events", ["time"], name: "index_ahoy_events_on_time", using: :btree
|
29
|
+
add_index "ahoy_events", ["user_id"], name: "index_ahoy_events_on_user_id", using: :btree
|
30
|
+
add_index "ahoy_events", ["visit_id"], name: "index_ahoy_events_on_visit_id", using: :btree
|
31
|
+
|
32
|
+
create_table "alerts", force: true do |t|
|
33
|
+
t.string "alert_type"
|
34
|
+
t.string "body"
|
35
|
+
t.string "status", default: "Pending"
|
36
|
+
t.integer "alert_type_id"
|
37
|
+
t.integer "organization_id"
|
38
|
+
t.integer "user_id"
|
39
|
+
t.datetime "created_at"
|
40
|
+
t.datetime "updated_at"
|
41
|
+
t.boolean "is_viewed", default: false
|
42
|
+
t.datetime "deleted_at"
|
43
|
+
end
|
44
|
+
|
45
|
+
add_index "alerts", ["deleted_at"], name: "index_alerts_on_deleted_at", using: :btree
|
46
|
+
|
47
|
+
create_table "asset_assignments", force: true do |t|
|
48
|
+
t.date "assg_date"
|
49
|
+
t.date "un_assg_date"
|
50
|
+
t.datetime "created_at"
|
51
|
+
t.datetime "updated_at"
|
52
|
+
t.integer "employee_id"
|
53
|
+
t.integer "assigned_by_id"
|
54
|
+
t.integer "asset_id"
|
55
|
+
end
|
56
|
+
|
57
|
+
add_index "asset_assignments", ["asset_id"], name: "index_asset_assignments_on_asset_id", using: :btree
|
58
|
+
add_index "asset_assignments", ["assigned_by_id"], name: "index_asset_assignments_on_assigned_by_id", using: :btree
|
59
|
+
add_index "asset_assignments", ["employee_id"], name: "index_asset_assignments_on_employee_id", using: :btree
|
60
|
+
|
61
|
+
create_table "asset_images", force: true do |t|
|
62
|
+
t.string "image_file_name"
|
63
|
+
t.string "image_content_type"
|
64
|
+
t.integer "image_file_size"
|
65
|
+
t.datetime "image_updated_at"
|
66
|
+
t.integer "asset_id"
|
67
|
+
end
|
68
|
+
|
69
|
+
create_table "asset_repair_requests", force: true do |t|
|
70
|
+
t.text "comments"
|
71
|
+
t.datetime "created_at"
|
72
|
+
t.datetime "updated_at"
|
73
|
+
t.integer "asset_id"
|
74
|
+
t.integer "requested_by_id"
|
75
|
+
t.integer "vendor_id"
|
76
|
+
t.integer "status"
|
77
|
+
t.datetime "requested_date"
|
78
|
+
t.datetime "responded_date"
|
79
|
+
t.string "responder_comments"
|
80
|
+
t.integer "responded_by_id"
|
81
|
+
t.integer "collected_by_id"
|
82
|
+
t.string "vending_cost"
|
83
|
+
t.string "vendor_comments"
|
84
|
+
t.date "collected_date"
|
85
|
+
end
|
86
|
+
|
87
|
+
add_index "asset_repair_requests", ["asset_id"], name: "index_asset_repair_requests_on_asset_id", using: :btree
|
88
|
+
add_index "asset_repair_requests", ["collected_by_id"], name: "index_asset_repair_requests_on_collected_by_id", using: :btree
|
89
|
+
add_index "asset_repair_requests", ["requested_by_id"], name: "index_asset_repair_requests_on_requested_by_id", using: :btree
|
90
|
+
add_index "asset_repair_requests", ["responded_by_id"], name: "index_asset_repair_requests_on_responded_by_id", using: :btree
|
91
|
+
add_index "asset_repair_requests", ["vendor_id"], name: "index_asset_repair_requests_on_vendor_id", using: :btree
|
92
|
+
|
93
|
+
create_table "asset_scans", force: true do |t|
|
94
|
+
t.string "name"
|
95
|
+
t.text "description"
|
96
|
+
t.date "issue_date"
|
97
|
+
t.date "expiry_date"
|
98
|
+
t.date "start_date"
|
99
|
+
t.string "scans_file_name"
|
100
|
+
t.string "scans_content_type"
|
101
|
+
t.integer "scans_file_size"
|
102
|
+
t.datetime "scans_updated_at"
|
103
|
+
t.datetime "created_at"
|
104
|
+
t.datetime "updated_at"
|
105
|
+
t.integer "asset_id"
|
106
|
+
t.integer "repair_id"
|
107
|
+
end
|
108
|
+
|
109
|
+
add_index "asset_scans", ["repair_id"], name: "index_asset_scans_on_repair_id", using: :btree
|
110
|
+
|
111
|
+
create_table "asset_tickets", force: true do |t|
|
112
|
+
t.string "qrcode"
|
113
|
+
t.string "barcode"
|
114
|
+
t.string "genratenumber"
|
115
|
+
t.integer "asset_id"
|
116
|
+
t.datetime "created_at"
|
117
|
+
t.datetime "updated_at"
|
118
|
+
end
|
119
|
+
|
120
|
+
add_index "asset_tickets", ["asset_id"], name: "index_asset_tickets_on_asset_id", using: :btree
|
121
|
+
|
122
|
+
create_table "assets", force: true do |t|
|
123
|
+
t.string "name"
|
124
|
+
t.text "description"
|
125
|
+
t.string "current_location"
|
126
|
+
t.boolean "is_new", default: true
|
127
|
+
t.boolean "is_traded", default: true
|
128
|
+
t.boolean "electroic_need", default: true
|
129
|
+
t.string "volts"
|
130
|
+
t.string "model_no"
|
131
|
+
t.string "serial_no"
|
132
|
+
t.string "sku"
|
133
|
+
t.date "manufactured_date"
|
134
|
+
t.date "purchased_date"
|
135
|
+
t.string "purchased_from"
|
136
|
+
t.text "info"
|
137
|
+
t.string "replace_priority"
|
138
|
+
t.integer "purchased_cost"
|
139
|
+
t.datetime "created_at"
|
140
|
+
t.datetime "updated_at"
|
141
|
+
t.integer "organization_id"
|
142
|
+
t.boolean "retire", default: false
|
143
|
+
t.integer "maintenance_cost"
|
144
|
+
t.datetime "deleted_at"
|
145
|
+
t.integer "location_id"
|
146
|
+
t.string "unique_asset_id"
|
147
|
+
t.integer "depreciation_cost"
|
148
|
+
t.integer "vendor_id"
|
149
|
+
t.integer "depreciated_cost"
|
150
|
+
t.integer "depreciation_setting_id"
|
151
|
+
t.integer "user_id"
|
152
|
+
t.string "code_number"
|
153
|
+
t.datetime "repair_date"
|
154
|
+
t.string "repair_reminder"
|
155
|
+
end
|
156
|
+
|
157
|
+
add_index "assets", ["deleted_at"], name: "index_assets_on_deleted_at", using: :btree
|
158
|
+
add_index "assets", ["depreciation_setting_id"], name: "index_assets_on_depreciation_setting_id", using: :btree
|
159
|
+
add_index "assets", ["location_id"], name: "index_assets_on_location_id", using: :btree
|
160
|
+
add_index "assets", ["organization_id"], name: "index_assets_on_organization_id", using: :btree
|
161
|
+
|
162
|
+
create_table "cancellations", force: true do |t|
|
163
|
+
t.integer "shift_id"
|
164
|
+
t.string "reason"
|
165
|
+
t.string "status", default: "pending"
|
166
|
+
t.datetime "approved_date"
|
167
|
+
t.integer "approved_by"
|
168
|
+
t.datetime "created_at"
|
169
|
+
t.datetime "updated_at"
|
170
|
+
t.text "notes"
|
171
|
+
t.text "unexcused_note"
|
172
|
+
end
|
173
|
+
|
174
|
+
create_table "candidates", force: true do |t|
|
175
|
+
t.integer "swap_id"
|
176
|
+
t.integer "alert_type_id"
|
177
|
+
t.integer "user_id"
|
178
|
+
t.string "body", default: "Swap Shift Request to Approve"
|
179
|
+
t.string "alert_type", default: "Swap"
|
180
|
+
t.string "status", default: "initial"
|
181
|
+
t.integer "organization_id"
|
182
|
+
t.datetime "created_at"
|
183
|
+
t.datetime "updated_at"
|
184
|
+
t.boolean "one_sided", default: false
|
185
|
+
end
|
186
|
+
|
187
|
+
create_table "certifications", force: true do |t|
|
188
|
+
t.string "name"
|
189
|
+
t.integer "organization_id"
|
190
|
+
t.datetime "created_at"
|
191
|
+
t.datetime "updated_at"
|
192
|
+
end
|
193
|
+
|
194
|
+
create_table "certifications_users", force: true do |t|
|
195
|
+
t.integer "user_id"
|
196
|
+
t.integer "certification_id"
|
197
|
+
t.datetime "created_at"
|
198
|
+
t.datetime "updated_at"
|
199
|
+
end
|
200
|
+
|
201
|
+
create_table "depreciation_settings", force: true do |t|
|
202
|
+
t.string "name"
|
203
|
+
t.string "percentage"
|
204
|
+
t.datetime "created_at"
|
205
|
+
t.datetime "updated_at"
|
206
|
+
t.integer "organization_id"
|
207
|
+
end
|
208
|
+
|
209
|
+
add_index "depreciation_settings", ["organization_id"], name: "index_depreciation_settings_on_organization_id", using: :btree
|
210
|
+
|
211
|
+
create_table "dispatches", force: true do |t|
|
212
|
+
t.date "dispatch_date"
|
213
|
+
t.date "return_date"
|
214
|
+
t.text "comments"
|
215
|
+
t.datetime "created_at"
|
216
|
+
t.datetime "updated_at"
|
217
|
+
t.integer "asset_repair_request_id"
|
218
|
+
end
|
219
|
+
|
220
|
+
add_index "dispatches", ["asset_repair_request_id"], name: "index_dispatches_on_asset_repair_request_id", using: :btree
|
221
|
+
|
222
|
+
create_table "employees", force: true do |t|
|
223
|
+
t.string "designation"
|
224
|
+
t.string "department"
|
225
|
+
t.datetime "created_at"
|
226
|
+
t.datetime "updated_at"
|
227
|
+
t.integer "organization_id"
|
228
|
+
t.string "fullName"
|
229
|
+
t.string "email"
|
230
|
+
t.string "phone_number"
|
231
|
+
t.datetime "deleted_at"
|
232
|
+
t.string "employeeId"
|
233
|
+
end
|
234
|
+
|
235
|
+
add_index "employees", ["deleted_at"], name: "index_employees_on_deleted_at", using: :btree
|
236
|
+
add_index "employees", ["organization_id"], name: "index_employees_on_organization_id", using: :btree
|
237
|
+
|
238
|
+
create_table "feedbacks", force: true do |t|
|
239
|
+
t.integer "user_id"
|
240
|
+
t.string "message"
|
241
|
+
t.boolean "in_trash", default: false
|
242
|
+
t.string "ancestry"
|
243
|
+
t.datetime "created_at"
|
244
|
+
t.datetime "updated_at"
|
245
|
+
end
|
246
|
+
|
247
|
+
create_table "history_emails", force: true do |t|
|
248
|
+
t.integer "user_id"
|
249
|
+
t.string "email_type"
|
250
|
+
t.boolean "email_seen"
|
251
|
+
t.datetime "created_at"
|
252
|
+
t.datetime "updated_at"
|
253
|
+
t.integer "effected_id"
|
254
|
+
t.integer "organization_id"
|
255
|
+
end
|
256
|
+
|
257
|
+
create_table "importfiles", force: true do |t|
|
258
|
+
t.datetime "created_at"
|
259
|
+
t.datetime "updated_at"
|
260
|
+
t.string "avatar_file_name"
|
261
|
+
t.string "avatar_content_type"
|
262
|
+
t.integer "avatar_file_size"
|
263
|
+
t.datetime "avatar_updated_at"
|
264
|
+
end
|
265
|
+
|
266
|
+
create_table "impressions", force: true do |t|
|
267
|
+
t.string "impressionable_type"
|
268
|
+
t.integer "impressionable_id"
|
269
|
+
t.integer "user_id"
|
270
|
+
t.string "controller_name"
|
271
|
+
t.string "action_name"
|
272
|
+
t.string "view_name"
|
273
|
+
t.string "request_hash"
|
274
|
+
t.string "ip_address"
|
275
|
+
t.string "session_hash"
|
276
|
+
t.text "message"
|
277
|
+
t.text "referrer"
|
278
|
+
t.datetime "created_at"
|
279
|
+
t.datetime "updated_at"
|
280
|
+
end
|
281
|
+
|
282
|
+
add_index "impressions", ["controller_name", "action_name", "ip_address"], name: "controlleraction_ip_index", using: :btree
|
283
|
+
add_index "impressions", ["controller_name", "action_name", "request_hash"], name: "controlleraction_request_index", using: :btree
|
284
|
+
add_index "impressions", ["controller_name", "action_name", "session_hash"], name: "controlleraction_session_index", using: :btree
|
285
|
+
add_index "impressions", ["impressionable_type", "impressionable_id", "ip_address"], name: "poly_ip_index", using: :btree
|
286
|
+
add_index "impressions", ["impressionable_type", "impressionable_id", "request_hash"], name: "poly_request_index", using: :btree
|
287
|
+
add_index "impressions", ["impressionable_type", "impressionable_id", "session_hash"], name: "poly_session_index", using: :btree
|
288
|
+
add_index "impressions", ["impressionable_type", "message", "impressionable_id"], name: "impressionable_type_message_index", using: :btree
|
289
|
+
add_index "impressions", ["user_id"], name: "index_impressions_on_user_id", using: :btree
|
290
|
+
|
291
|
+
create_table "jobs", force: true do |t|
|
292
|
+
t.integer "organization_id"
|
293
|
+
t.string "name"
|
294
|
+
t.string "color", default: "#ffffff"
|
295
|
+
t.datetime "created_at"
|
296
|
+
t.datetime "updated_at"
|
297
|
+
end
|
298
|
+
|
299
|
+
create_table "jobs_users", force: true do |t|
|
300
|
+
t.integer "job_id"
|
301
|
+
t.integer "user_id"
|
302
|
+
t.datetime "created_at"
|
303
|
+
t.datetime "updated_at"
|
304
|
+
end
|
305
|
+
|
306
|
+
create_table "latenesses", force: true do |t|
|
307
|
+
t.string "reason"
|
308
|
+
t.integer "shift_id"
|
309
|
+
t.boolean "notify", default: false
|
310
|
+
t.datetime "created_at"
|
311
|
+
t.datetime "updated_at"
|
312
|
+
end
|
313
|
+
|
314
|
+
create_table "locations", force: true do |t|
|
315
|
+
t.string "name"
|
316
|
+
t.string "description"
|
317
|
+
t.string "street1"
|
318
|
+
t.string "street2"
|
319
|
+
t.string "state"
|
320
|
+
t.string "zip"
|
321
|
+
t.string "country"
|
322
|
+
t.string "latitude"
|
323
|
+
t.string "longitude"
|
324
|
+
t.datetime "created_at"
|
325
|
+
t.datetime "updated_at"
|
326
|
+
t.integer "organization_id"
|
327
|
+
t.string "city"
|
328
|
+
end
|
329
|
+
|
330
|
+
add_index "locations", ["organization_id"], name: "index_locations_on_organization_id", using: :btree
|
331
|
+
|
332
|
+
create_table "mailboxer_conversation_opt_outs", force: true do |t|
|
333
|
+
t.integer "unsubscriber_id"
|
334
|
+
t.string "unsubscriber_type"
|
335
|
+
t.integer "conversation_id"
|
336
|
+
end
|
337
|
+
|
338
|
+
create_table "mailboxer_conversations", force: true do |t|
|
339
|
+
t.string "subject", default: ""
|
340
|
+
t.datetime "created_at", null: false
|
341
|
+
t.datetime "updated_at", null: false
|
342
|
+
end
|
343
|
+
|
344
|
+
create_table "mailboxer_notifications", force: true do |t|
|
345
|
+
t.string "type"
|
346
|
+
t.text "body"
|
347
|
+
t.string "subject", default: ""
|
348
|
+
t.integer "sender_id"
|
349
|
+
t.string "sender_type"
|
350
|
+
t.integer "conversation_id"
|
351
|
+
t.boolean "draft", default: false
|
352
|
+
t.string "notification_code"
|
353
|
+
t.integer "notified_object_id"
|
354
|
+
t.string "notified_object_type"
|
355
|
+
t.string "attachment"
|
356
|
+
t.datetime "updated_at", null: false
|
357
|
+
t.datetime "created_at", null: false
|
358
|
+
t.boolean "global", default: false
|
359
|
+
t.datetime "expires"
|
360
|
+
end
|
361
|
+
|
362
|
+
add_index "mailboxer_notifications", ["conversation_id"], name: "index_mailboxer_notifications_on_conversation_id", using: :btree
|
363
|
+
|
364
|
+
create_table "mailboxer_receipts", force: true do |t|
|
365
|
+
t.integer "receiver_id"
|
366
|
+
t.string "receiver_type"
|
367
|
+
t.integer "notification_id", null: false
|
368
|
+
t.boolean "is_read", default: false
|
369
|
+
t.boolean "trashed", default: false
|
370
|
+
t.boolean "deleted", default: false
|
371
|
+
t.string "mailbox_type", limit: 25
|
372
|
+
t.datetime "created_at", null: false
|
373
|
+
t.datetime "updated_at", null: false
|
374
|
+
end
|
375
|
+
|
376
|
+
add_index "mailboxer_receipts", ["notification_id"], name: "index_mailboxer_receipts_on_notification_id", using: :btree
|
377
|
+
|
378
|
+
create_table "manufacturers", force: true do |t|
|
379
|
+
t.string "company_name"
|
380
|
+
t.string "company_phone"
|
381
|
+
t.text "company_detail"
|
382
|
+
t.text "comapny_address"
|
383
|
+
t.text "company_other"
|
384
|
+
t.datetime "created_at"
|
385
|
+
t.datetime "updated_at"
|
386
|
+
t.string "company_website"
|
387
|
+
t.integer "asset_id"
|
388
|
+
end
|
389
|
+
|
390
|
+
add_index "manufacturers", ["asset_id"], name: "index_manufacturers_on_asset_id", using: :btree
|
391
|
+
|
392
|
+
create_table "member_devices", force: true do |t|
|
393
|
+
t.integer "member_id"
|
394
|
+
t.string "device"
|
395
|
+
t.string "push_token"
|
396
|
+
t.datetime "created_at"
|
397
|
+
t.datetime "updated_at"
|
398
|
+
t.integer "project_id_id"
|
399
|
+
end
|
400
|
+
|
401
|
+
add_index "member_devices", ["member_id"], name: "index_member_devices_on_member_id", using: :btree
|
402
|
+
add_index "member_devices", ["project_id_id"], name: "index_member_devices_on_project_id_id", using: :btree
|
403
|
+
|
404
|
+
create_table "members", force: true do |t|
|
405
|
+
t.integer "user_id"
|
406
|
+
t.integer "organization_id"
|
407
|
+
t.boolean "email_notify", default: true
|
408
|
+
t.boolean "sms_notify", default: true
|
409
|
+
t.integer "vacation_id"
|
410
|
+
t.integer "time_off_limit"
|
411
|
+
t.boolean "in_train"
|
412
|
+
t.integer "reminder_time"
|
413
|
+
t.date "termination_date"
|
414
|
+
t.integer "request_weekly_hours"
|
415
|
+
t.integer "priority", default: 0
|
416
|
+
t.boolean "show_email", default: true
|
417
|
+
t.boolean "show_number", default: true
|
418
|
+
t.integer "invited_by_id"
|
419
|
+
t.datetime "invitation_sent_at"
|
420
|
+
t.datetime "invitation_accepted_at"
|
421
|
+
t.datetime "created_at"
|
422
|
+
t.datetime "updated_at"
|
423
|
+
t.date "hire_date"
|
424
|
+
t.boolean "time_format", default: false
|
425
|
+
t.boolean "disabled", default: false
|
426
|
+
t.string "invitation_token"
|
427
|
+
t.datetime "invitation_created_at"
|
428
|
+
end
|
429
|
+
|
430
|
+
add_index "members", ["organization_id"], name: "index_members_on_organization_id", using: :btree
|
431
|
+
add_index "members", ["user_id"], name: "index_members_on_user_id", using: :btree
|
432
|
+
|
433
|
+
create_table "notes", force: true do |t|
|
434
|
+
t.integer "user_id"
|
435
|
+
t.text "content"
|
436
|
+
t.integer "created_by"
|
437
|
+
t.datetime "created_at"
|
438
|
+
t.datetime "updated_at"
|
439
|
+
t.integer "organization_id"
|
440
|
+
end
|
441
|
+
|
442
|
+
create_table "notification_users", force: true do |t|
|
443
|
+
t.boolean "seen"
|
444
|
+
t.integer "notification_id"
|
445
|
+
t.integer "user_id"
|
446
|
+
end
|
447
|
+
|
448
|
+
add_index "notification_users", ["notification_id"], name: "index_notification_users_on_notification_id", using: :btree
|
449
|
+
add_index "notification_users", ["user_id"], name: "index_notification_users_on_user_id", using: :btree
|
450
|
+
|
451
|
+
create_table "notifications", force: true do |t|
|
452
|
+
t.string "notification_type"
|
453
|
+
t.datetime "created_at"
|
454
|
+
t.datetime "updated_at"
|
455
|
+
t.integer "notified_by_id"
|
456
|
+
t.integer "source_id"
|
457
|
+
t.string "source_type"
|
458
|
+
t.string "summary"
|
459
|
+
t.boolean "responded"
|
460
|
+
t.boolean "notifications_status"
|
461
|
+
end
|
462
|
+
|
463
|
+
add_index "notifications", ["notified_by_id"], name: "index_notifications_on_notified_by_id", using: :btree
|
464
|
+
|
465
|
+
create_table "organizations", force: true do |t|
|
466
|
+
t.string "name"
|
467
|
+
t.text "description"
|
468
|
+
t.integer "subdomain_id"
|
469
|
+
t.string "country"
|
470
|
+
t.string "state"
|
471
|
+
t.string "address"
|
472
|
+
t.string "postal_code"
|
473
|
+
t.string "code"
|
474
|
+
t.string "city"
|
475
|
+
t.boolean "m_to_s", default: true
|
476
|
+
t.boolean "mul_schedule", default: false
|
477
|
+
t.datetime "created_at"
|
478
|
+
t.datetime "updated_at"
|
479
|
+
t.boolean "allow_rolling_v_hrs", default: false
|
480
|
+
t.string "timezone", default: "Central Time (US & Canada)"
|
481
|
+
t.boolean "show_owner", default: false
|
482
|
+
t.boolean "show_disabled_users", default: false
|
483
|
+
t.boolean "time_format", default: false
|
484
|
+
t.string "logo_file_name"
|
485
|
+
t.string "logo_content_type"
|
486
|
+
t.integer "logo_file_size"
|
487
|
+
t.datetime "logo_updated_at"
|
488
|
+
t.string "phone"
|
489
|
+
t.boolean "status", default: true
|
490
|
+
t.boolean "tma_access", default: false
|
491
|
+
t.boolean "myt2w_access", default: false
|
492
|
+
end
|
493
|
+
|
494
|
+
add_index "organizations", ["code"], name: "index_organizations_on_code", unique: true, using: :btree
|
495
|
+
|
496
|
+
create_table "pg_search_documents", force: true do |t|
|
497
|
+
t.text "content"
|
498
|
+
t.integer "searchable_id"
|
499
|
+
t.string "searchable_type"
|
500
|
+
t.datetime "created_at", null: false
|
501
|
+
t.datetime "updated_at", null: false
|
502
|
+
end
|
503
|
+
|
504
|
+
add_index "pg_search_documents", ["searchable_id", "searchable_type"], name: "index_pg_search_documents_on_searchable_id_and_searchable_type", using: :btree
|
505
|
+
|
506
|
+
create_table "plans", force: true do |t|
|
507
|
+
t.string "stripe_id"
|
508
|
+
t.integer "display_order"
|
509
|
+
t.string "name"
|
510
|
+
t.datetime "created_at"
|
511
|
+
t.datetime "updated_at"
|
512
|
+
end
|
513
|
+
|
514
|
+
create_table "project_payments", force: true do |t|
|
515
|
+
t.integer "organization_id"
|
516
|
+
t.integer "project_id"
|
517
|
+
t.integer "plan_id"
|
518
|
+
t.string "stripe_token"
|
519
|
+
t.string "stripe_customer_id"
|
520
|
+
t.string "stripe_subscriber_id"
|
521
|
+
t.datetime "created_at"
|
522
|
+
t.datetime "updated_at"
|
523
|
+
end
|
524
|
+
|
525
|
+
add_index "project_payments", ["organization_id"], name: "index_project_payments_on_organization_id", using: :btree
|
526
|
+
add_index "project_payments", ["project_id"], name: "index_project_payments_on_project_id", using: :btree
|
527
|
+
|
528
|
+
create_table "projects", force: true do |t|
|
529
|
+
t.string "name"
|
530
|
+
t.datetime "created_at"
|
531
|
+
t.datetime "updated_at"
|
532
|
+
end
|
533
|
+
|
534
|
+
create_table "recurring_time_offs", force: true do |t|
|
535
|
+
t.integer "timeoff_id"
|
536
|
+
t.string "recurring_option"
|
537
|
+
t.integer "user_id"
|
538
|
+
t.string "status"
|
539
|
+
t.datetime "created_at"
|
540
|
+
t.datetime "updated_at"
|
541
|
+
end
|
542
|
+
|
543
|
+
create_table "roles", force: true do |t|
|
544
|
+
t.string "name"
|
545
|
+
t.integer "resource_id"
|
546
|
+
t.string "resource_type"
|
547
|
+
t.datetime "created_at"
|
548
|
+
t.datetime "updated_at"
|
549
|
+
end
|
550
|
+
|
551
|
+
add_index "roles", ["name", "resource_type", "resource_id"], name: "index_roles_on_name_and_resource_type_and_resource_id", using: :btree
|
552
|
+
add_index "roles", ["name"], name: "index_roles_on_name", using: :btree
|
553
|
+
|
554
|
+
create_table "schedules", force: true do |t|
|
555
|
+
t.boolean "publish"
|
556
|
+
t.integer "user_id"
|
557
|
+
t.date "start_date"
|
558
|
+
t.date "end_date"
|
559
|
+
t.datetime "created_at"
|
560
|
+
t.datetime "updated_at"
|
561
|
+
t.boolean "is_viewed", default: false
|
562
|
+
t.integer "template_id"
|
563
|
+
t.integer "organization_id"
|
564
|
+
t.float "total_hours"
|
565
|
+
end
|
566
|
+
|
567
|
+
create_table "settings", force: true do |t|
|
568
|
+
t.boolean "maintenance"
|
569
|
+
t.boolean "reminder"
|
570
|
+
t.boolean "multiple_assignment"
|
571
|
+
t.boolean "user_delete"
|
572
|
+
t.boolean "multiple_delete"
|
573
|
+
t.string "alerts"
|
574
|
+
t.string "currency"
|
575
|
+
t.string "from_email"
|
576
|
+
t.datetime "created_at"
|
577
|
+
t.datetime "updated_at"
|
578
|
+
t.integer "organization_id"
|
579
|
+
t.boolean "add_vendor", default: true
|
580
|
+
t.boolean "add_vendor_approval", default: true
|
581
|
+
t.boolean "user_delete_ticket", default: true
|
582
|
+
t.boolean "vendor_repair", default: true
|
583
|
+
end
|
584
|
+
|
585
|
+
add_index "settings", ["organization_id"], name: "index_settings_on_organization_id", using: :btree
|
586
|
+
|
587
|
+
create_table "shift_offs", force: true do |t|
|
588
|
+
t.integer "organization_id"
|
589
|
+
t.text "name"
|
590
|
+
t.time "off_time"
|
591
|
+
t.text "am_pm"
|
592
|
+
t.datetime "created_at"
|
593
|
+
t.datetime "updated_at"
|
594
|
+
end
|
595
|
+
|
596
|
+
create_table "shift_trades", force: true do |t|
|
597
|
+
t.string "status", default: "initial"
|
598
|
+
t.integer "candidate_id"
|
599
|
+
t.integer "shift_id"
|
600
|
+
t.integer "organization_id"
|
601
|
+
t.integer "user_id"
|
602
|
+
t.string "body", default: "Swap Shift Request to Approve"
|
603
|
+
t.string "alert_type", default: "Swap"
|
604
|
+
t.datetime "created_at"
|
605
|
+
t.datetime "updated_at"
|
606
|
+
t.text "note"
|
607
|
+
end
|
608
|
+
|
609
|
+
create_table "shifts", force: true do |t|
|
610
|
+
t.integer "day_of_week"
|
611
|
+
t.time "start_time"
|
612
|
+
t.time "end_time"
|
613
|
+
t.time "hours"
|
614
|
+
t.integer "schedule_id"
|
615
|
+
t.boolean "absence_excused", default: false
|
616
|
+
t.boolean "absence_wo_excuse", default: false
|
617
|
+
t.text "comments"
|
618
|
+
t.time "late"
|
619
|
+
t.date "due_date"
|
620
|
+
t.datetime "created_at"
|
621
|
+
t.datetime "updated_at"
|
622
|
+
t.integer "job_id"
|
623
|
+
t.time "training_hours", default: '2000-01-01 00:00:00'
|
624
|
+
t.boolean "cancel_shift", default: false
|
625
|
+
t.integer "shift_off_id"
|
626
|
+
end
|
627
|
+
|
628
|
+
create_table "subdomains", force: true do |t|
|
629
|
+
t.string "name"
|
630
|
+
t.datetime "created_at"
|
631
|
+
t.datetime "updated_at"
|
632
|
+
t.integer "organization_id"
|
633
|
+
end
|
634
|
+
|
635
|
+
add_index "subdomains", ["organization_id"], name: "index_subdomains_on_organization_id", using: :btree
|
636
|
+
|
637
|
+
create_table "swaps", force: true do |t|
|
638
|
+
t.integer "shift_id"
|
639
|
+
t.string "reason"
|
640
|
+
t.string "status", default: "pending"
|
641
|
+
t.boolean "in_trash", default: false
|
642
|
+
t.boolean "viewed", default: false
|
643
|
+
t.boolean "alert", default: false
|
644
|
+
t.datetime "approved_date"
|
645
|
+
t.integer "approved_by"
|
646
|
+
t.datetime "created_at"
|
647
|
+
t.datetime "updated_at"
|
648
|
+
end
|
649
|
+
|
650
|
+
create_table "tasks", force: true do |t|
|
651
|
+
t.integer "organization_id"
|
652
|
+
t.integer "user_id"
|
653
|
+
t.string "task_name"
|
654
|
+
t.time "duty_time"
|
655
|
+
t.boolean "accept", default: false
|
656
|
+
t.boolean "done", default: false
|
657
|
+
t.date "duty_date"
|
658
|
+
t.text "comment"
|
659
|
+
t.datetime "created_at"
|
660
|
+
t.datetime "updated_at"
|
661
|
+
end
|
662
|
+
|
663
|
+
create_table "template_assets", force: true do |t|
|
664
|
+
t.string "name"
|
665
|
+
t.datetime "created_at"
|
666
|
+
t.datetime "updated_at"
|
667
|
+
t.integer "template_id"
|
668
|
+
end
|
669
|
+
|
670
|
+
add_index "template_assets", ["template_id"], name: "index_template_assets_on_template_id", using: :btree
|
671
|
+
|
672
|
+
create_table "templates", force: true do |t|
|
673
|
+
t.string "name"
|
674
|
+
t.datetime "created_at"
|
675
|
+
t.datetime "updated_at"
|
676
|
+
t.integer "organization_id"
|
677
|
+
end
|
678
|
+
|
679
|
+
create_table "timeoffs", force: true do |t|
|
680
|
+
t.integer "day_of_week"
|
681
|
+
t.string "reason"
|
682
|
+
t.boolean "all_day", default: false
|
683
|
+
t.time "start_time"
|
684
|
+
t.time "end_time"
|
685
|
+
t.string "status", default: "pending"
|
686
|
+
t.integer "user_id"
|
687
|
+
t.date "off_date"
|
688
|
+
t.datetime "approved_date"
|
689
|
+
t.integer "approved_by"
|
690
|
+
t.datetime "cancelled_date"
|
691
|
+
t.boolean "vacation", default: false
|
692
|
+
t.datetime "created_at"
|
693
|
+
t.datetime "updated_at"
|
694
|
+
end
|
695
|
+
|
696
|
+
create_table "transactions", force: true do |t|
|
697
|
+
t.string "type_of_event"
|
698
|
+
t.string "event_id"
|
699
|
+
t.string "subscription_id"
|
700
|
+
t.string "livemode"
|
701
|
+
t.string "status"
|
702
|
+
t.string "customer_id"
|
703
|
+
t.string "interval_count"
|
704
|
+
t.string "amount"
|
705
|
+
t.string "interval"
|
706
|
+
t.string "plan_name"
|
707
|
+
t.string "current_period_end"
|
708
|
+
t.string "current_period_start"
|
709
|
+
t.string "organization_id"
|
710
|
+
t.datetime "created_at"
|
711
|
+
t.datetime "updated_at"
|
712
|
+
end
|
713
|
+
|
714
|
+
create_table "unavailables", force: true do |t|
|
715
|
+
t.string "reason"
|
716
|
+
t.integer "shift_id"
|
717
|
+
t.boolean "notify", default: false
|
718
|
+
t.datetime "created_at"
|
719
|
+
t.datetime "updated_at"
|
720
|
+
t.string "status", default: "pending"
|
721
|
+
t.string "approved_by"
|
722
|
+
t.string "notes"
|
723
|
+
t.string "approved_date"
|
724
|
+
end
|
725
|
+
|
726
|
+
create_table "user_notification_settings", force: true do |t|
|
727
|
+
t.string "email_date", default: "immediately"
|
728
|
+
t.string "repair_count", default: "10"
|
729
|
+
t.integer "cost", default: 10
|
730
|
+
t.string "waranty_date", default: "warnty_month"
|
731
|
+
t.integer "user_id"
|
732
|
+
t.string "organization_id"
|
733
|
+
t.datetime "created_at"
|
734
|
+
t.datetime "updated_at"
|
735
|
+
end
|
736
|
+
|
737
|
+
create_table "user_vacation_infos", force: true do |t|
|
738
|
+
t.integer "user_id"
|
739
|
+
t.integer "vacation_id"
|
740
|
+
t.float "spent_hours", default: 0.0
|
741
|
+
t.datetime "created_at"
|
742
|
+
t.datetime "updated_at"
|
743
|
+
t.integer "member_id"
|
744
|
+
end
|
745
|
+
|
746
|
+
create_table "users", force: true do |t|
|
747
|
+
t.string "email", default: "", null: false
|
748
|
+
t.string "encrypted_password", default: ""
|
749
|
+
t.string "reset_password_token"
|
750
|
+
t.datetime "reset_password_sent_at"
|
751
|
+
t.datetime "remember_created_at"
|
752
|
+
t.integer "sign_in_count", default: 0, null: false
|
753
|
+
t.datetime "current_sign_in_at"
|
754
|
+
t.datetime "last_sign_in_at"
|
755
|
+
t.string "current_sign_in_ip"
|
756
|
+
t.string "last_sign_in_ip"
|
757
|
+
t.string "provider"
|
758
|
+
t.string "uid"
|
759
|
+
t.integer "subdomain_id"
|
760
|
+
t.boolean "profile_completed", default: false
|
761
|
+
t.string "avatar"
|
762
|
+
t.integer "organization_id"
|
763
|
+
t.string "stripe_token"
|
764
|
+
t.string "coupon"
|
765
|
+
t.integer "plan_id"
|
766
|
+
t.string "phone_number"
|
767
|
+
t.boolean "email_notify", default: false
|
768
|
+
t.boolean "sms_notify", default: false
|
769
|
+
t.integer "vacation_id"
|
770
|
+
t.integer "time_off_limit"
|
771
|
+
t.boolean "in_train", default: false
|
772
|
+
t.string "first_name"
|
773
|
+
t.string "last_name"
|
774
|
+
t.date "anniversary_date"
|
775
|
+
t.datetime "created_at"
|
776
|
+
t.datetime "updated_at"
|
777
|
+
t.string "invitation_token"
|
778
|
+
t.datetime "invitation_created_at"
|
779
|
+
t.datetime "invitation_sent_at"
|
780
|
+
t.datetime "invitation_accepted_at"
|
781
|
+
t.integer "invitation_limit"
|
782
|
+
t.integer "invited_by_id"
|
783
|
+
t.string "invited_by_type"
|
784
|
+
t.boolean "disabled", default: false
|
785
|
+
t.string "customer_id"
|
786
|
+
t.integer "reminder_time"
|
787
|
+
t.date "birth_date"
|
788
|
+
t.date "temination_date"
|
789
|
+
t.integer "request_weekly_hours"
|
790
|
+
t.string "api_token", default: "a"
|
791
|
+
t.string "avatar_file_name"
|
792
|
+
t.string "avatar_content_type"
|
793
|
+
t.integer "avatar_file_size"
|
794
|
+
t.datetime "avatar_updated_at"
|
795
|
+
t.integer "priority", default: 0
|
796
|
+
t.boolean "show_email", default: true
|
797
|
+
t.boolean "show_number", default: true
|
798
|
+
t.string "AddNameToUsers", default: ""
|
799
|
+
t.integer "failed_attempts", default: 0
|
800
|
+
t.string "unlock_token"
|
801
|
+
t.datetime "locked_at"
|
802
|
+
t.text "address"
|
803
|
+
t.string "state"
|
804
|
+
t.string "city"
|
805
|
+
t.string "country"
|
806
|
+
t.string "zipcode"
|
807
|
+
t.integer "invitations_count", default: 0
|
808
|
+
end
|
809
|
+
|
810
|
+
add_index "users", ["email", "subdomain_id"], name: "index_users_on_email_and_subdomain_id", unique: true, using: :btree
|
811
|
+
add_index "users", ["email"], name: "index_users_on_email", unique: true, using: :btree
|
812
|
+
add_index "users", ["invitation_token"], name: "index_users_on_invitation_token", unique: true, using: :btree
|
813
|
+
add_index "users", ["invitations_count"], name: "index_users_on_invitations_count", using: :btree
|
814
|
+
add_index "users", ["invited_by_id"], name: "index_users_on_invited_by_id", using: :btree
|
815
|
+
add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree
|
816
|
+
|
817
|
+
create_table "users_roles", id: false, force: true do |t|
|
818
|
+
t.integer "user_id"
|
819
|
+
t.integer "role_id"
|
820
|
+
end
|
821
|
+
|
822
|
+
add_index "users_roles", ["user_id", "role_id"], name: "index_users_roles_on_user_id_and_role_id", using: :btree
|
823
|
+
|
824
|
+
create_table "vacations", force: true do |t|
|
825
|
+
t.string "name"
|
826
|
+
t.integer "total_hours"
|
827
|
+
t.integer "organization_id"
|
828
|
+
t.datetime "created_at"
|
829
|
+
t.datetime "updated_at"
|
830
|
+
end
|
831
|
+
|
832
|
+
create_table "vendor_ratings", force: true do |t|
|
833
|
+
t.integer "rating"
|
834
|
+
t.datetime "created_at"
|
835
|
+
t.datetime "updated_at"
|
836
|
+
t.integer "vendor_id"
|
837
|
+
t.integer "user_id"
|
838
|
+
t.string "comment", default: ""
|
839
|
+
end
|
840
|
+
|
841
|
+
add_index "vendor_ratings", ["user_id"], name: "index_vendor_ratings_on_user_id", using: :btree
|
842
|
+
add_index "vendor_ratings", ["vendor_id"], name: "index_vendor_ratings_on_vendor_id", using: :btree
|
843
|
+
|
844
|
+
create_table "vendors", force: true do |t|
|
845
|
+
t.string "name"
|
846
|
+
t.string "description"
|
847
|
+
t.string "website"
|
848
|
+
t.string "fax"
|
849
|
+
t.string "email"
|
850
|
+
t.string "contact_person"
|
851
|
+
t.integer "organization_id"
|
852
|
+
t.string "avatar_file_name"
|
853
|
+
t.string "avatar_content_type"
|
854
|
+
t.integer "avatar_file_size"
|
855
|
+
t.datetime "avatar_updated_at"
|
856
|
+
t.datetime "deleted_at"
|
857
|
+
t.integer "asset_id"
|
858
|
+
t.boolean "approve"
|
859
|
+
t.datetime "created_at"
|
860
|
+
t.string "cell_number"
|
861
|
+
t.string "office_number"
|
862
|
+
t.string "street"
|
863
|
+
t.string "city"
|
864
|
+
t.string "state"
|
865
|
+
t.string "postal_code"
|
866
|
+
end
|
867
|
+
|
868
|
+
add_index "vendors", ["asset_id"], name: "index_vendors_on_asset_id", using: :btree
|
869
|
+
add_index "vendors", ["deleted_at"], name: "index_vendors_on_deleted_at", using: :btree
|
870
|
+
add_index "vendors", ["organization_id"], name: "index_vendors_on_organization_id", using: :btree
|
871
|
+
|
872
|
+
create_table "visits", id: false, force: true do |t|
|
873
|
+
t.uuid "id", null: false
|
874
|
+
t.uuid "visitor_id"
|
875
|
+
t.string "ip"
|
876
|
+
t.text "user_agent"
|
877
|
+
t.text "referrer"
|
878
|
+
t.text "landing_page"
|
879
|
+
t.integer "user_id"
|
880
|
+
t.string "referring_domain"
|
881
|
+
t.string "search_keyword"
|
882
|
+
t.string "browser"
|
883
|
+
t.string "os"
|
884
|
+
t.string "device_type"
|
885
|
+
t.integer "screen_height"
|
886
|
+
t.integer "screen_width"
|
887
|
+
t.string "country"
|
888
|
+
t.string "region"
|
889
|
+
t.string "city"
|
890
|
+
t.string "postal_code"
|
891
|
+
t.decimal "latitude"
|
892
|
+
t.decimal "longitude"
|
893
|
+
t.string "utm_source"
|
894
|
+
t.string "utm_medium"
|
895
|
+
t.string "utm_term"
|
896
|
+
t.string "utm_content"
|
897
|
+
t.string "utm_campaign"
|
898
|
+
t.datetime "started_at"
|
899
|
+
end
|
900
|
+
|
901
|
+
add_index "visits", ["user_id"], name: "index_visits_on_user_id", using: :btree
|
902
|
+
|
903
|
+
add_foreign_key "mailboxer_conversation_opt_outs", "mailboxer_conversations", name: "mb_opt_outs_on_conversations_id", column: "conversation_id"
|
904
|
+
|
905
|
+
add_foreign_key "mailboxer_notifications", "mailboxer_conversations", name: "notifications_on_conversation_id", column: "conversation_id"
|
906
|
+
|
907
|
+
add_foreign_key "mailboxer_receipts", "mailboxer_notifications", name: "receipts_on_notification_id", column: "notification_id"
|
908
|
+
|
909
|
+
end
|