CREATE TABLE [dbo].[Tb_AdsAckHareket](
	[AcHId] [decimal](18, 0) IDENTITY(1,1) NOT NULL,
	[AcHAckId] [decimal](18, 0) NULL,
	[AcHStGr] [smallint] NULL,
	[AcHGrupKod] [nvarchar](5) NULL,
	[AcHStokId] [decimal](18, 0) NULL,
	[AcHSira] [smallint] NULL,
 CONSTRAINT [PK_Tb_AdsAckHareket] PRIMARY KEY CLUSTERED 
(
	[AcHId] 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
CREATE TABLE [dbo].[Tb_AdsAdisyon](
	[AdBId] [decimal](18, 0) IDENTITY(1,1) NOT NULL,
	[AdBTur] [tinyint] NULL,
	[AdbTarih] [date] NULL,
	[AdbSaat] [nvarchar](5) NULL,
	[AdBCariId] [decimal](18, 0) NULL,
	[AdBNo] [nvarchar](20) NULL,
	[AdBIskOran1] [money] NULL,
	[AdBIskTutar] [money] NULL,
	[AdBKisiSayisi] [smallint] NULL,
	[AdBMalToplam] [money] NULL,
	[AdBKalIsk] [money] NULL,
	[AdBTopIsk] [money] NULL,
	[AdBGenTop] [money] NULL,
	[AdBKayKullanici] [nvarchar](20) NULL,
	[AdBMasaId] [decimal](18, 0) NULL,
	[AdBKatAdi] [nvarchar](30) NULL,
	[AdBMasaAd] [nvarchar](30) NULL,
	[AdBKapandi] [tinyint] NULL,
	[AdBIptalNot] [nvarchar](50) NULL,
	[AdBYeniEski] [nvarchar](10) NULL,
	[AdBPersId] [decimal](18, 0) NULL,
	[AdbUrunHazir] [tinyint] NULL,
	[AdBUretildi] [tinyint] NULL,
	[AdBYzKsId] [decimal](18, 0) NULL,
 CONSTRAINT [PK_Tb_AdsAdisyon] PRIMARY KEY CLUSTERED 
(
	[AdBId] 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
ALTER TABLE [dbo].[Tb_AdsAdisyon] ADD  CONSTRAINT [DF_Tb_AdsAdisyon_AdBKapandi]  DEFAULT ((0)) FOR [AdBKapandi]
GO
ALTER TABLE [dbo].[Tb_AdsAdisyon] ADD  CONSTRAINT [DF_Tb_AdsAdisyon_AdBYeniEski]  DEFAULT ('') FOR [AdBYeniEski]
GO
ALTER TABLE [dbo].[Tb_AdsAdisyon] ADD  CONSTRAINT [DF_Tb_AdsAdisyon_AdBUretildi]  DEFAULT ((0)) FOR [AdBUretildi]
GO
CREATE TABLE [dbo].[Tb_AdsAdsKalem](
	[AdKId] [decimal](18, 0) IDENTITY(1,1) NOT NULL,
	[AdKBaslikId] [decimal](18, 0) NULL,
	[AdKSatirTipi] [smallint] NULL,
	[AdKStokId] [decimal](18, 0) NULL,
	[AdKMiktar] [money] NULL,
	[AdKFiyat] [money] NULL,
	[AdKTutar] [money] NULL,
	[AdKKdvOran] [money] NULL,
	[AdKBirim] [nvarchar](10) NULL,
	[AdKKoltukNo] [tinyint] NULL,
	[AdKPorsiyon] [tinyint] NULL,
	[AdKDepoId] [decimal](18, 0) NULL,
	[AdKTarih] [date] NULL,
	[AdKMasaAd] [nvarchar](30) NULL,
	[AdkKatAd] [nvarchar](15) NULL,
	[AdKCins] [nvarchar](50) NULL,
	[AdKPersId] [decimal](18, 0) NULL,
	[AdKIptalNot] [nvarchar](50) NULL,
	[AdKSira] [smallint] NULL,
	[AdKMasaId] [decimal](18, 0) NULL,
	[AdKTur] [tinyint] NULL,
	[AdKUrunHazir] [tinyint] NULL,
	[AdKPrint] [tinyint] NULL,
	[AdKYeni] [tinyint] NULL,
	[AdKExMiktar] [money] NULL,
 CONSTRAINT [PK_Tb_AdsAdsKalem] PRIMARY KEY CLUSTERED 
(
	[AdKId] 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
ALTER TABLE [dbo].[Tb_AdsAdsKalem] ADD  CONSTRAINT [DF_Tb_AdsAdsKalem_AdKPrint]  DEFAULT ((1)) FOR [AdKPrint]
GO
CREATE TABLE [dbo].[Tb_AdsEkMalzeme](
	[EkMId] [decimal](18, 0) IDENTITY(1,1) NOT NULL,
	[EkMStGr] [smallint] NULL,
	[EkMGrupKod] [nvarchar](5) NULL,
	[EkMStokId] [decimal](18, 0) NULL,
	[EkMFiyat] [money] NULL,
	[EkMSepetId] [decimal](18, 0) NULL,
	[EkMSpStokId] [decimal](18, 0) NULL,
	[EkMSatirId] [decimal](18, 0) NULL,
 CONSTRAINT [PK_Tb_AdsEkMalzeme] PRIMARY KEY CLUSTERED 
(
	[EkMId] 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
CREATE TABLE [dbo].[Tb_AdsRecete](
	[RecId] [decimal](18, 0) IDENTITY(1,1) NOT NULL,
	[RecBaslikId] [decimal](18, 0) NULL,
	[RecStokId] [decimal](18, 0) NULL,
	[RecBirim] [nvarchar](10) NULL,
	[RecAciklama] [nvarchar](200) NULL,
	[RecAnaStokId] [decimal](18, 0) NULL,
	[RecTipi] [tinyint] NULL,
	[RecFiyat] [money] NULL,
	[RecOpsAd] [nvarchar](20) NULL,
	[RecOpsGrb] [tinyint] NULL,
	[RecPorsiyonM] [money] NULL,
	[RecYarimM] [money] NULL,
	[RecBirBucukM] [money] NULL,
	[RecDubleM] [money] NULL,
	[RecSatFiyat] [money] NULL,
 CONSTRAINT [PK_Tb_AdsRecete] PRIMARY KEY CLUSTERED 
(
	[RecId] 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
CREATE TABLE [dbo].[Tb_AdsTahsilat](
	[AdTId] [decimal](18, 0) IDENTITY(1,1) NOT NULL,
	[AdTTur] [nvarchar](30) NULL,
	[AdTTutar] [money] NULL,
	[AdTTip] [tinyint] NULL,
	[AdTSaat] [nvarchar](5) NULL,
	[AdTTarih] [date] NULL,
	[AdTKarsiHsId] [decimal](18, 0) NULL,
	[AdTKoltukNo] [tinyint] NULL,
	[AdTCariId] [decimal](18, 0) NULL,
	[AdTAdisyonId] [decimal](18, 0) NULL,
	[AdTPersId] [decimal](18, 0) NULL,
	[AdTTaksit] [tinyint] NULL,
	[AdTKullanici] [nvarchar](20) NULL,
 CONSTRAINT [PK_Tb_AdsTahsilat] PRIMARY KEY CLUSTERED 
(
	[AdTId] 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