public.placements¶
Columns¶
| Name | Type | Default | Nullable | Children | Parents | Comment |
|---|---|---|---|---|---|---|
| company_id | bigint | false | public.companies | |||
| confirmed_at | timestamp with time zone | true | ||||
| discontinuation_reason | varchar(1500) | false | ||||
| discontinued_at | timestamp with time zone | true | ||||
| discontinued_by_id | bigint | true | public.users | |||
| end_date | date | true | ||||
| hours_per_week | numeric(5,2) | true | ||||
| id | bigint | false | public.docusign_envelopes public.generated_arrival_contact_documents public.generated_employment_declaration_documents public.generated_placement_documents public.reviews public.weekly_timesheets | |||
| is_confirmed_by_worker | boolean | false | ||||
| is_read | boolean | false | ||||
| item_number | varchar(255) | false | ||||
| job_id | bigint | false | public.jobs | |||
| offer_id | bigint | true | public.offers | |||
| rejected_at | timestamp with time zone | true | ||||
| rejection_reason | varchar(50) | false | ||||
| rejection_reason_description | text | false | ||||
| resource_number | varchar(255) | false | ||||
| salesforce_ref | varchar(255) | false | ||||
| start_date | date | true | ||||
| status | varchar(20) | false | ||||
| worker_id | bigint | false | public.contacts |
Constraints¶
| Name | Type | Definition |
|---|---|---|
| placement_end_after_start | CHECK | CHECK (((end_date IS NULL) OR (end_date >= start_date))) |
| placements_company_id_e4cf8a47_fk_companies_id | FOREIGN KEY | FOREIGN KEY (company_id) REFERENCES companies(id) DEFERRABLE INITIALLY DEFERRED |
| placements_discontinued_by_id_7904fd2a_fk_users_id | FOREIGN KEY | FOREIGN KEY (discontinued_by_id) REFERENCES users(id) DEFERRABLE INITIALLY DEFERRED |
| placements_job_id_72f88da2_fk_jobs_id | FOREIGN KEY | FOREIGN KEY (job_id) REFERENCES jobs(id) DEFERRABLE INITIALLY DEFERRED |
| placements_offer_id_a6b9541e_fk_offers_id | FOREIGN KEY | FOREIGN KEY (offer_id) REFERENCES offers(id) DEFERRABLE INITIALLY DEFERRED |
| placements_pkey | PRIMARY KEY | PRIMARY KEY (id) |
| placements_worker_id_87dc7617_fk_contacts_id | FOREIGN KEY | FOREIGN KEY (worker_id) REFERENCES contacts(id) DEFERRABLE INITIALLY DEFERRED |
Indexes¶
| Name | Definition |
|---|---|
| placements_company_id_e4cf8a47 | CREATE INDEX placements_company_id_e4cf8a47 ON public.placements USING btree (company_id) |
| placements_discontinued_by_id_7904fd2a | CREATE INDEX placements_discontinued_by_id_7904fd2a ON public.placements USING btree (discontinued_by_id) |
| placements_job_id_72f88da2 | CREATE INDEX placements_job_id_72f88da2 ON public.placements USING btree (job_id) |
| placements_offer_id_a6b9541e | CREATE INDEX placements_offer_id_a6b9541e ON public.placements USING btree (offer_id) |
| placements_pkey | CREATE UNIQUE INDEX placements_pkey ON public.placements USING btree (id) |
| placements_salesfo_51dcfd_idx | CREATE INDEX placements_salesfo_51dcfd_idx ON public.placements USING btree (salesforce_ref) |
| placements_worker_id_87dc7617 | CREATE INDEX placements_worker_id_87dc7617 ON public.placements USING btree (worker_id) |
Generated by tbls