CYCLEDAY

Cycle Days

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
DAY nvarchar(3) Default = '' The name of the cycle day.
DESCRIPTION nvarchar(60) Default = '' The description of the cycle day.
CODE nvarchar(1) Default = '' The code for the cycle day.
SEQUENCE int Default = 0 sequence
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.
COLORSTYLECODE tinyint Default = 0 The color style to use for the calendar when showing the block.
COLORSTYLE nvarchar(13) (Computed) yes CASE [COLORSTYLECODE] WHEN 0 THEN N'Yellow' WHEN 1 THEN N'Coral' WHEN 2 THEN N'Lilac' WHEN 3 THEN N'Periwinkle' WHEN 4 THEN N'Turquoise' WHEN 5 THEN N'Sea Green' WHEN 6 THEN N'Khaki' WHEN 7 THEN N'Yellow-Orange' WHEN 8 THEN N'Mauve' WHEN 9 THEN N'Blue' WHEN 10 THEN N'Tan' WHEN 11 THEN N'Violet' WHEN 12 THEN N'Purple' WHEN 13 THEN N'Royal Blue' WHEN 14 THEN N'Blue-Green' WHEN 15 THEN N'Green' WHEN 16 THEN N'Orange' WHEN 17 THEN N'Red' WHEN 18 THEN N'Olive' WHEN 19 THEN N'Brown' END Provides a translation for the 'COLORSTYLECODE' field.

Foreign Keys

Foreign Key Field Type Null Notes Description
CYCLEID uniqueidentifier CYCLE.ID The cycle for which this cycle day is defined
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.

Indexes

Index Name Fields Unique Primary Clustered
IX_CYCLEDAY_DATEADDED DATEADDED yes
IX_CYCLEDAY_DATECHANGED DATECHANGED
PK_CYCLEDAY ID yes yes
UIX_CYCLEDAY_CYCLEID_DAY CYCLEID, DAY yes

Triggers

Trigger Name Description
TR_CYCLEDAY_AUDIT_UPDATE
TR_CYCLEDAY_AUDIT_DELETE

Referenced by

Referenced by Field
CLASSMEETINGTEMPLATE CYCLEDAYID
TIMETABLEDAY CYCLEDAYID