FAFCOMMUNICATIONSLOG

FAF Participant communications log

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
EMAILADDRESS UDT_EMAILADDRESS Default = '' Email Address of the Contact Record
MESSAGETYPECODE tinyint Default = 1 Message Type
MESSAGETYPE nvarchar(18) (Computed) yes CASE [MESSAGETYPECODE] WHEN 1 THEN N'Email' WHEN 2 THEN N'Personal Page Post' WHEN 3 THEN N'Text' WHEN 4 THEN N'Letter' WHEN 5 THEN N'Facebook' WHEN 6 THEN N'Twitter' END Provides a translation for the 'MESSAGETYPECODE' field.
DATESENT datetime Message sent date
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.
PAGEVISITS int Default = 0 How many times email recipient visited senders personal/team page

Foreign Keys

Foreign Key Field Type Null Notes Description
CLIENTUSERSID int ClientUsers.ID userid of the client
ADDRESSBOOKID uniqueidentifier yes ADDRESSBOOKFAF.ID Addressbook id
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CONSTITUENTID uniqueidentifier yes CONSTITUENT.LOCALID FK to CONSTITUENT
EMAILJOBID int yes EmailJob.ID FK to EMAILJOB
EVENTID uniqueidentifier EVENT.ID FK to EVENT

Indexes

Index Name Fields Unique Primary Clustered
IX_FAFCOMMUNICATIONSLOG_CLIENTUSERSID_EVENTID CLIENTUSERSID, EVENTID
IX_FAFCOMMUNICATIONSLOG_CONSTITUENTID CONSTITUENTID
IX_FAFCOMMUNICATIONSLOG_DATEADDED DATEADDED yes
IX_FAFCOMMUNICATIONSLOG_DATECHANGED DATECHANGED
PK_FAFCOMMUNICATIONSLOG ID yes yes

Triggers

Trigger Name Description
TR_FAFCOMMUNICATIONSLOG_AUDIT_UPDATE
TR_FAFCOMMUNICATIONSLOG_AUDIT_DELETE