FAFEVENTCOMMUNICATIONCHANNELREVENUE

Store Communication Channel tracking data for donation

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
CHANNELCODE tinyint Default = 0 Communication channel code
CHANNEL nvarchar(8) (Computed) yes CASE [CHANNELCODE] WHEN 0 THEN N'Others' WHEN 1 THEN N'Email' WHEN 2 THEN N'Facebook' WHEN 3 THEN N'Twitter' END Provides a translation for the 'CHANNELCODE' field.
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
REVENUEID uniqueidentifier FINANCIALTRANSACTION.ID Revenue ID
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.

Indexes

Index Name Fields Unique Primary Clustered
IX_FAFEVENTCOMMUNICATIONCHANNELREVENUE_DATEADDED DATEADDED yes
IX_FAFEVENTCOMMUNICATIONCHANNELREVENUE_DATECHANGED DATECHANGED
IX_FAFEVENTCOMMUNICATIONCHANNELREVENUE_REVENUEID REVENUEID
PK_FAFEVENTCOMMUNICATIONCHANNELREVENUE ID yes yes

Triggers

Trigger Name Description
TR_FAFEVENTCOMMUNICATIONCHANNELREVENUE_AUDIT_UPDATE
TR_FAFEVENTCOMMUNICATIONCHANNELREVENUE_AUDIT_DELETE