DESIGNATIONGOAL

Stores goal information pertaining to designations.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
GOAL money Default = 0 The amount of the goal.
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.
ORGANIZATIONGOAL money Default = 0 Amount of the goal in organization currency.

Foreign Keys

Foreign Key Field Type Null Notes Description
DESIGNATIONID uniqueidentifier DESIGNATION.ID The parent record for this goal.
DESIGNATIONLEVELGOALID uniqueidentifier DESIGNATIONLEVELGOAL.ID The parent goal record for this goal.
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
ORGANIZATIONEXCHANGERATEID uniqueidentifier yes CURRENCYEXCHANGERATE.ID The exchange rate used to convert from goal amount to organization goal amount.
BASECURRENCYID uniqueidentifier yes CURRENCY.ID The base currency associated with this goal.

Indexes

Index Name Fields Unique Primary Clustered
IX_DESIGNATIONGOAL_BASECURRENCYID BASECURRENCYID
IX_DESIGNATIONGOAL_DATEADDED DATEADDED yes
IX_DESIGNATIONGOAL_DATECHANGED DATECHANGED
IX_DESIGNATIONGOAL_ORGANIZATIONEXCHANGERATEID ORGANIZATIONEXCHANGERATEID
PK_DESIGNATIONGOAL ID yes yes
UIX_DESIGNATIONGOAL_DESIGNATIONID_DESIGNATIONLEVELGOALID DESIGNATIONID, DESIGNATIONLEVELGOALID yes

Triggers

Trigger Name Description
TR_DESIGNATIONGOAL_AUDIT_UPDATE
TR_DESIGNATIONGOAL_AUDIT_DELETE
TR_DESIGNATIONGOAL_INSERTUPDATE_CURRENCY