TRACKSTAFFRESOURCE

Describes the staff resources used by the track.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
QUANTITYNEEDED int Default = 0 The quantity of the resource needed for this track.
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
TRACKID uniqueidentifier TRACK.ID The track that the resource is used for.
VOLUNTEERTYPEID uniqueidentifier VOLUNTEERTYPE.LOCALID The volunteer type that represents this 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_TRACKSTAFFRESOURCE_DATEADDED DATEADDED yes
IX_TRACKSTAFFRESOURCE_DATECHANGED DATECHANGED
PK_TRACKSTAFFRESOURCE ID yes yes
UIX_TRACKSTAFFRESOURCE_TRACKID_VOLUNTEERTYPEID TRACKID, VOLUNTEERTYPEID yes

Triggers

Trigger Name Description
TR_TRACKSTAFFRESOURCE_AUDIT_UPDATE
TR_TRACKSTAFFRESOURCE_AUDIT_DELETE