Tables [dbo].[SysUserLaborTypeMap]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
HeapYes
Row Count (~)712
Created12:32:29 PM Monday, August 4, 2014
Last Modified9:11:26 AM Friday, December 7, 2018
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Primary Key PK_SysUserLaborTypeMap: SysUserLaborTypeMapIDSysUserLaborTypeMapIDint4
No
1 - 1
Foreign Keys FK_SysUserLaborTypeMap_SysUser: [dbo].[Sysuser].SysUserFIDIndexes IX_SysuserLaborTypeMap_SysUserFID_LaborTypeFID: SysUserFID\LaborTypeFIDSysUserFIDint4
No
Foreign Keys FK_SysUserLaborTypeMap_LaborType: [dbo].[LaborType].LaborTypeFIDIndexes IX_SysuserLaborTypeMap_SysUserFID_LaborTypeFID: SysUserFID\LaborTypeFIDLaborTypeFIDint4
No
VendorIDvarchar(15)15
Yes
Foreign Keys FK_SysUserLaborTypeMap_DateBasis: [dbo].[DateBasis].DateBasisFIDDateBasisFIDint4
Yes
Defaultbit1
No
HourlyWagedecimal(14,4)9
Yes
HourlyWageOverTimedecimal(14,4)9
Yes
HourlyWageDoubleTimedecimal(14,4)9
Yes
Indexes Indexes
NameColumnsUnique
Primary Key PK_SysUserLaborTypeMap: SysUserLaborTypeMapIDPK_SysUserLaborTypeMapSysUserLaborTypeMapID
Yes
IX_SysuserLaborTypeMap_SysUserFID_LaborTypeFIDSysUserFID, LaborTypeFID
Yes
Check Constraints Check Constraints
NameConstraint
CK_SysUser_LongDistanceLaborType([dbo].[CheckSysUserToLongDistanceLaborType]([SysUserLaborTypeMapID],[SysUserFID],[LaborTypeFID])=(1))
Foreign Keys Foreign Keys
NameColumns
FK_SysUserLaborTypeMap_DateBasisDateBasisFID->[dbo].[DateBasis].[DateBasisID]
FK_SysUserLaborTypeMap_LaborTypeLaborTypeFID->[dbo].[LaborType].[PriKey]
FK_SysUserLaborTypeMap_SysUserSysUserFID->[dbo].[Sysuser].[SysUserID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
Extended Properties
NameLevel 2 TypeLevel 2 NameValue
DescriptionHolds a sysuser labor type mapping for a particular sysuser.
DescriptionCOLUMNDefaultFlag indicating whether a record is the default labor type for a sysuser.
DescriptionCOLUMNLaborTypeFIDForeign key to a labor type.
DescriptionCOLUMNSysUserFIDForeign key to a sysuser.
DescriptionCOLUMNSysUserLaborTypeMapIDPrimary key of the SysUserLaborTypeMap table.
SQL Script
CREATE TABLE [dbo].[SysUserLaborTypeMap]
(
[SysUserLaborTypeMapID] [int] NOT NULL IDENTITY(1, 1),
[SysUserFID] [int] NOT NULL,
[LaborTypeFID] [int] NOT NULL,
[VendorID] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DateBasisFID] [int] NULL,
[Default] [bit] NOT NULL,
[HourlyWage] [decimal] (14, 4) NULL,
[HourlyWageOverTime] [decimal] (14, 4) NULL,
[HourlyWageDoubleTime] [decimal] (14, 4) NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SysUserLaborTypeMap] ADD CONSTRAINT [CK_SysUser_LongDistanceLaborType] CHECK (([dbo].[CheckSysUserToLongDistanceLaborType]([SysUserLaborTypeMapID],[SysUserFID],[LaborTypeFID])=(1)))
GO
ALTER TABLE [dbo].[SysUserLaborTypeMap] ADD CONSTRAINT [PK_SysUserLaborTypeMap] PRIMARY KEY NONCLUSTERED  ([SysUserLaborTypeMapID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SysUserLaborTypeMap] ADD CONSTRAINT [IX_SysuserLaborTypeMap_SysUserFID_LaborTypeFID] UNIQUE NONCLUSTERED  ([SysUserFID], [LaborTypeFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SysUserLaborTypeMap] ADD CONSTRAINT [FK_SysUserLaborTypeMap_DateBasis] FOREIGN KEY ([DateBasisFID]) REFERENCES [dbo].[DateBasis] ([DateBasisID])
GO
ALTER TABLE [dbo].[SysUserLaborTypeMap] ADD CONSTRAINT [FK_SysUserLaborTypeMap_LaborType] FOREIGN KEY ([LaborTypeFID]) REFERENCES [dbo].[LaborType] ([PriKey])
GO
ALTER TABLE [dbo].[SysUserLaborTypeMap] ADD CONSTRAINT [FK_SysUserLaborTypeMap_SysUser] FOREIGN KEY ([SysUserFID]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
GRANT SELECT ON  [dbo].[SysUserLaborTypeMap] TO [MssExec]
GRANT INSERT ON  [dbo].[SysUserLaborTypeMap] TO [MssExec]
GRANT DELETE ON  [dbo].[SysUserLaborTypeMap] TO [MssExec]
GRANT UPDATE ON  [dbo].[SysUserLaborTypeMap] TO [MssExec]
GO
EXEC sp_addextendedproperty N'Description', N'Holds a sysuser labor type mapping for a particular sysuser.', 'SCHEMA', N'dbo', 'TABLE', N'SysUserLaborTypeMap', NULL, NULL
GO
EXEC sp_addextendedproperty N'Description', N'Flag indicating whether a record is the default labor type for a sysuser.', 'SCHEMA', N'dbo', 'TABLE', N'SysUserLaborTypeMap', 'COLUMN', N'Default'
GO
EXEC sp_addextendedproperty N'Description', N'Foreign key to a labor type.', 'SCHEMA', N'dbo', 'TABLE', N'SysUserLaborTypeMap', 'COLUMN', N'LaborTypeFID'
GO
EXEC sp_addextendedproperty N'Description', N'Foreign key to a sysuser.', 'SCHEMA', N'dbo', 'TABLE', N'SysUserLaborTypeMap', 'COLUMN', N'SysUserFID'
GO
EXEC sp_addextendedproperty N'Description', N'Primary key of the SysUserLaborTypeMap table.', 'SCHEMA', N'dbo', 'TABLE', N'SysUserLaborTypeMap', 'COLUMN', N'SysUserLaborTypeMapID'
GO
Uses
Used By