BATCHCONSTITUENTPHONE

Stores constituent phone batch information.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
NUMBER nvarchar(100) Default = ''
ISPRIMARY bit Default = 0
SEQUENCE int Default = 0
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.
STARTTIME UDT_HOURMINUTE Default = '' Time that the phone number becomes valid.
ENDTIME UDT_HOURMINUTE Default = '' Time that the phone number becomes no longer valid.
STARTDATE date yes The date the phone number becomes valid.
SEASONALSTARTDATE UDT_MONTHDAY Default = '0000' For seasonal phone types only: DD/MM start date of when this phone should be considered.
SEASONALENDDATE UDT_MONTHDAY Default = '0000' For seasonal phone types only: DD/MM end date of when this phone should be considered.
INFOSOURCECOMMENTS nvarchar(256) Default = ''

Foreign Keys

Foreign Key Field Type Null Notes Description
BATCHCONSTITUENTID uniqueidentifier BATCHCONSTITUENT.ID FK to BATCHCONSTITUENT
PHONETYPECODEID uniqueidentifier yes PHONETYPECODE.LOCALID FK to PHONETYPECODE
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
COUNTRYID uniqueidentifier yes COUNTRY.LOCALID The country for this phone number.
INFOSOURCECODEID uniqueidentifier yes INFOSOURCECODE.ID

Indexes

Index Name Fields Unique Primary Clustered
IX_BATCHCONSTITUENTPHONE_DATEADDED DATEADDED yes
IX_BATCHCONSTITUENTPHONE_DATECHANGED DATECHANGED
PK_BATCHCONSTITUENTPHONE ID yes yes
UIX_BATCHCONSTITUENTPHONE_BATCHCONSTITUENTID_PHONETYPECODEID_NUMBER BATCHCONSTITUENTID, PHONETYPECODEID, NUMBER yes

Triggers

Trigger Name Description
TR_BATCHCONSTITUENTPHONE_AUDIT_UPDATE
TR_BATCHCONSTITUENTPHONE_AUDIT_DELETE