USE Vertragsverwaltung
GO

/****** Object:  Table [dbo].[Faktoren]    Script Date: 12.04.2013 20:10:19 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[Faktoren](
	[Eintragnr] [int] NOT NULL,
	[Bezeichnung] [varchar](50) NULL,
	[Beschreibung] [varchar](255) NULL,
	[Faktor_Prod_Tage] [float] NULL,
	[Fuehrungsanteil] [float] NULL,
	[Standard] [bit] NULL,
	[Aktiv] [bit] NULL,
	[Erstellt_am] [datetime] NULL,
	[Mutiert_am] [datetime] NULL,
	[Mutierer] [int] NULL,
 CONSTRAINT [PK_Faktoren] PRIMARY KEY CLUSTERED 
(
	[Eintragnr] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

/****** Object:  Table [dbo].[Jahrestabelle]    Script Date: 12.04.2013 20:10:19 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[Jahrestabelle](
	[Eintragnr] [int] NOT NULL,
	[Jahr] [int] NULL,
	[Monat] [int] NULL,
	[Plantage] [int] NULL,
	[FaktorNr] [int] NULL,
	[Arbeitstage] [int] NULL,
	[Aktiv] [bit] NULL,
	[Erstellt_am] [datetime] NULL,
	[Mutiert_am] [datetime] NULL,
	[Mutierer] [int] NULL,
 CONSTRAINT [PK_Jahrestabelle] PRIMARY KEY CLUSTERED 
(
	[Eintragnr] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

/****** Object:  Table [dbo].[MA]    Script Date: 12.04.2013 20:10:19 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[MA](
	[MANr] [int] NOT NULL,
	[Name] [varchar](50) NULL,
	[Vorname] [varchar](50) NULL,
	[TGNummer] [varchar](50) NULL,
	[Kurzzeichen] [varchar](50) NULL,
	[Aktiv] [bit] NULL,
	[Erstellt_am] [datetime] NULL,
	[Mutiert_am] [datetime] NULL,
	[Mutierer] [int] NULL,
	[Gueltig_bis] [datetime] NULL,
	[Sortierung] [int] NULL,
 CONSTRAINT [PK_MA] PRIMARY KEY CLUSTERED 
(
	[MANr] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

/****** Object:  Table [dbo].[MADetails]    Script Date: 12.04.2013 20:10:19 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[MADetails](
	[MADetailNr] [int] NOT NULL,
	[MANr] [int] NULL,
	[MitarbeiterTypNr] [int] NULL,
	[OENr] [int] NULL,
	[Engagement] [int] NULL,
	[Gueltig_ab] [datetime] NULL,
	[Bemerkung] [varchar](1024) NULL,
	[Aktiv] [bit] NULL,
	[Erstellt_am] [datetime] NULL,
	[Mutiert_am] [datetime] NULL,
	[Mutierer] [int] NULL,
 CONSTRAINT [PK_MADetails] PRIMARY KEY CLUSTERED 
(
	[MADetailNr] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

/****** Object:  Table [dbo].[MAEngagement]    Script Date: 12.04.2013 20:10:19 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[MAEngagement](
	[MAEngagementNr] [int] NOT NULL,
	[MANr] [int] NULL,
	[Engagement] [decimal](18, 0) NULL,
	[Gueltig_ab] [datetime] NULL,
	[Gueltib_bis] [datetime] NULL,
	[Aktiv] [bit] NULL,
	[Erstellt_am] [datetime] NULL,
	[Mutiert_am] [datetime] NULL,
	[Mutierer] [int] NULL,
 CONSTRAINT [PK_MitarbeiterEngagement] PRIMARY KEY CLUSTERED 
(
	[MAEngagementNr] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

/****** Object:  Table [dbo].[MitarbeiterTyp]    Script Date: 12.04.2013 20:10:19 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[MitarbeiterTyp](
	[MitarbeiterTypNr] [int] NOT NULL,
	[Bezeichnung] [varchar](50) NULL,
	[Beschreibung] [varchar](50) NULL,
	[Fuehrungsanteil] [int] NULL,
	[Aktiv] [bit] NULL,
	[Erstellt_am] [datetime] NULL,
	[Mutiert_am] [datetime] NULL,
	[Mutierer] [int] NULL,
 CONSTRAINT [PK_MitarbeiterTyp] PRIMARY KEY CLUSTERED 
(
	[MitarbeiterTypNr] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO


