EVENTRESOURCE

Contains the resources and quantity of those resources used for an event.

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 the event.
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.
PERTICKETQUANTITY int Default = 0 The number of items used per each ticket sold, only valid when this is a per ticket item.

Foreign Keys

Foreign Key Field Type Null Notes Description
EVENTID uniqueidentifier yes EVENT.ID The event that this resource is added to.
RESOURCEID uniqueidentifier RESOURCE.ID The resource that we are adding to the program.
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
EVENTCONFLICTID uniqueidentifier yes EVENTCONFLICT.ID This is the conflict generated if this event could not be scheduled for any reason.

Indexes

Index Name Fields Unique Primary Clustered
IX_EVENTRESOURCE_DATEADDED DATEADDED yes
IX_EVENTRESOURCE_DATECHANGED DATECHANGED
PK_EVENTRESOURCE ID yes yes
UIX_EVENTRESOURCE_EVENTID_EVENTCONFLICTID_RESOURCEID EVENTID, EVENTCONFLICTID, RESOURCEID yes

Triggers

Trigger Name Description
TR_EVENTRESOURCE_AUDIT_UPDATE
TR_EVENTRESOURCE_AUDIT_DELETE