staff_contract

23 rows


Description

Holds all staff contracts (e.g. work/employment contract)

Columns

Column Type Size Nulls Auto Default Children Parents Comments
id bigserial 19 nextval('staff_contract_id_seq'::regclass)

Unique ID

id_tenant int4 10 1
tenant.id fk_staff_contract_id_tenant R

Reference to the tenant

created_at timestamp 29,6 now()

Timestamp of creation

updated_at timestamp 29,6 now()

Timestamp of last update

id_creator int4 10 null
user.id fk_staff_contract_id_creator R

Reference to the creator

id_updater int4 10 null
user.id fk_staff_contract_id_updater R

Reference to the last updater

id_staff int4 10 null
staff.id fk_staff_contract_id_staff R

Reference to the staff record

valid_from timestamp 29,6 null

Timestamp when the contract is valid from

valid_to timestamp 29,6 null

Timestamp until the contract is valid to

personnelnumber text 2147483647 null

The assigned personnel number in the periode (valid_from to valid_to)

note text 2147483647 null

A note for this contract

id_jobtitle int2 5 null
jobtitle.id fk_staff_contract_id_jobtitle R

Reference to the job title

Indexes

Constraint Name Type Sort Column(s)
pk_staff_contract_id Primary key Asc id
no_overlap_staff_contract Performance Asc id_staff
u_staff_contract_id_staff_valid_from Must be unique Asc/Asc id_staff + valid_from

Check Constraints

Constraint Name Constraint
c_staff_contract_to_after_from ((valid_from < valid_to))

Relationships