SPONSORSHIPOPPORTUNITY

Represents generic sponsorship opportunity

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
ELIGIBILITYCODE tinyint Default = 1 The eligibility state of the sponsorship opportunity.
ELIGIBILITY nvarchar(10) (Computed) yes CASE [ELIGIBILITYCODE] WHEN 0 THEN N'Pending' WHEN 1 THEN N'Eligible' WHEN 2 THEN N'Ineligible' END Provides a translation for the 'ELIGIBILITYCODE' field.
AVAILABILITYCODE tinyint Default = 0 The availability state of the sponsorship opportunity.
AVAILABILITY nvarchar(11) (Computed) yes CASE [AVAILABILITYCODE] WHEN 0 THEN N'Available' WHEN 1 THEN N'Reserved' WHEN 2 THEN N'Unavailable' END Provides a translation for the 'AVAILABILITYCODE' field.
CUSTOMIDENTIFIER nvarchar(100) Default = '' User-definable custom identifier.
SEQUENCEID int Identity column used to increment the default lookupid.
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.
LOOKUPID nvarchar(100) (Computed) yes (CASE LEN(CUSTOMIDENTIFIER) WHEN 0 THEN '8-' + CAST(SEQUENCEID AS nvarchar(20)) ELSE CUSTOMIDENTIFIER END) Unique identifier that supports user defined values as well as system generated values.
LASTDOCUMENTATIONDATE date yes

Foreign Keys

Foreign Key Field Type Null Notes Description
SPONSORSHIPOPPORTUNITYGROUPID uniqueidentifier SPONSORSHIPOPPORTUNITYGROUP.ID FK to SPONSORSHIPOPPORTUNITYGROUP
SPONSORSHIPLOCATIONID uniqueidentifier SPONSORSHIPLOCATION.ID The location for this sponsorship opportunity.
SPONSORSHIPREASONID uniqueidentifier yes SPONSORSHIPREASON.ID The reason why the opportunity is not eligible.
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
RESERVATIONKEYID uniqueidentifier yes SPONSORSHIPOPPORTUNITYRESERVEPROCESS.ID reserved opportunities grouped in a reservation key.

Indexes

Index Name Fields Unique Primary Clustered
IX_SPONSORSHIPOPPORTUNITY_DATEADDED DATEADDED yes
IX_SPONSORSHIPOPPORTUNITY_DATECHANGED DATECHANGED
IX_SPONSORSHIPOPPORTUNITY_RESERVATIONKEYID RESERVATIONKEYID
IX_SPONSORSHIPOPPORTUNITY_SPONSORSHIPLOCATIONID SPONSORSHIPLOCATIONID
IX_SPONSORSHIPOPPORTUNITY_SPONSORSHIPOPPORTUNITYGROUPID SPONSORSHIPOPPORTUNITYGROUPID
IX_SPONSORSHIPOPPORTUNITY_SPONSORSHIPREASONID SPONSORSHIPREASONID
PK_SPONSORSHIPOPPORTUNITY ID yes yes
UC_SPONSORSHIPOPPORTUNITY_LOOKUPID LOOKUPID yes

Triggers

Trigger Name Description
TR_SPONSORSHIPOPPORTUNITY_AUDIT_UPDATE
TR_SPONSORSHIPOPPORTUNITY_AUDIT_DELETE

Referenced by

Referenced by Field
BATCHSPONSORSHIP SPONSORSHIPOPPORTUNITYID
BATCHSPONSORSHIP RESERVEDOPPORTUNITYID
SALESORDERITEMSPONSORSHIP SPONSORSHIPOPPORTUNITYID
SPONSORSHIP SPONSORSHIPOPPORTUNITYID
SPONSORSHIPOPPORTUNITYATTACHMENT SPONSORSHIPOPPORTUNITYID
SPONSORSHIPOPPORTUNITYCHILD ID
SPONSORSHIPOPPORTUNITYLOCK ID
SPONSORSHIPOPPORTUNITYMEDIALINK SPONSORSHIPOPPORTUNITYID
SPONSORSHIPOPPORTUNITYNOTE SPONSORSHIPOPPORTUNITYID
SPONSORSHIPOPPORTUNITYPROJECT ID
SPONSORSHIPOPPORTUNITYREASON SPONSORSHIPOPPORTUNITYID
SPONSORSHIPOPPORTUNITYTRANSFERPROCESS NEWSPONSORSHIPOPPORTUNITYID