TRACKITEMSTAFFRESOURCE

Describes the staff resources used by the track item.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
QUANTITYNEEDED int Default = 0 The quantity of this staff resource needed for the track item.
FILLEDBYCODE tinyint Default = 0 The type of staff resource needed for this track.
FILLEDBY nvarchar(9) (Computed) yes CASE [FILLEDBYCODE] WHEN 0 THEN N'Volunteer' WHEN 1 THEN N'Staff' WHEN 2 THEN N'Board' END Provides a translation for the 'FILLEDBYCODE' field.
JOBNAME nvarchar(100) Default = '' The name of the job to create when the track is used.
JOBDESCRIPTION nvarchar(255) Default = '' The description of the job to create when the track is used
DATEADDED datetime Default = getdate() Indicates the date this record was added.
DATECHANGED datetime Default = getdate() Indicates the date this record was last changed.
TS timestamp Timestamp.
TSLONG bigint (Computed) yes CONVERT(bigint, TS) Numeric representation of the timestamp.

Foreign Keys

Foreign Key Field Type Null Notes Description
TRACKITEMID uniqueidentifier TRACKITEM.ID The track item that this staff resource is for.
VOLUNTEERTYPEID uniqueidentifier VOLUNTEERTYPE.LOCALID The volunteer type id that is associated with this staff resource.
JOBID uniqueidentifier yes JOB.ID The job associated with this track item staff resource.
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.

Indexes

Index Name Fields Unique Primary Clustered
IX_TRACKITEMSTAFFRESOURCE_DATEADDED DATEADDED yes
IX_TRACKITEMSTAFFRESOURCE_DATECHANGED DATECHANGED
PK_TRACKITEMSTAFFRESOURCE ID yes yes
UIX_TRACKITEMSTAFFRESOURCE_TRACKITEMID_VOLUNTEERTYPEID TRACKITEMID, VOLUNTEERTYPEID yes

Triggers

Trigger Name Description
TR_TRACKITEMSTAFFRESOURCE_AUDIT_UPDATE
TR_TRACKITEMSTAFFRESOURCE_AUDIT_DELETE