-
Notifications
You must be signed in to change notification settings - Fork 4
/
sql.sql
198 lines (178 loc) · 9.41 KB
/
sql.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
-- --------------------------------------------------------
-- Sunucu: temsilci.com
-- Sunucu sürümü: 10.1.41-MariaDB - MariaDB Server
-- Sunucu İşletim Sistemi: Linux
-- HeidiSQL Sürüm: 9.5.0.5371
-- --------------------------------------------------------
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-- tablo yapısı dökülüyor phpscrip_musteri.bolge
CREATE TABLE IF NOT EXISTS `bolge` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`firma_id` int(11) NOT NULL,
`bolgeadi` varchar(100) NOT NULL,
`urun_id` int(11) NOT NULL,
`birimfiyat` float NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
-- phpscrip_musteri.bolge: ~1 rows (yaklaşık) tablosu için veriler indiriliyor
/*!40000 ALTER TABLE `bolge` DISABLE KEYS */;
INSERT INTO `bolge` (`id`, `firma_id`, `bolgeadi`, `urun_id`, `birimfiyat`) VALUES
(1, 1, 'Avrupa', 1, 5);
/*!40000 ALTER TABLE `bolge` ENABLE KEYS */;
-- tablo yapısı dökülüyor phpscrip_musteri.firma
CREATE TABLE IF NOT EXISTS `firma` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`firmaadi` varchar(100) COLLATE utf8_turkish_ci NOT NULL,
`yetkili` varchar(100) COLLATE utf8_turkish_ci NOT NULL,
`email` varchar(100) COLLATE utf8_turkish_ci NOT NULL,
`telefon` varchar(100) COLLATE utf8_turkish_ci NOT NULL,
`deger` varchar(100) COLLATE utf8_turkish_ci NOT NULL,
`bitis_tarihi` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_turkish_ci;
-- phpscrip_musteri.firma: ~0 rows (yaklaşık) tablosu için veriler indiriliyor
/*!40000 ALTER TABLE `firma` DISABLE KEYS */;
INSERT INTO `firma` (`id`, `firmaadi`, `yetkili`, `email`, `telefon`, `deger`, `bitis_tarihi`) VALUES
(1, 'DEMO FİRMA', 'ANIL ERGÜL', '[email protected]', '5351234567', '', '2020-02-12 00:21:58');
/*!40000 ALTER TABLE `firma` ENABLE KEYS */;
-- tablo yapısı dökülüyor phpscrip_musteri.gunluk
CREATE TABLE IF NOT EXISTS `gunluk` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`firma_id` int(11) NOT NULL,
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`durum` int(11) NOT NULL,
`aciklama` varchar(200) COLLATE utf8_turkish_ci NOT NULL,
`user_id` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_turkish_ci;
-- phpscrip_musteri.gunluk: ~0 rows (yaklaşık) tablosu için veriler indiriliyor
/*!40000 ALTER TABLE `gunluk` DISABLE KEYS */;
/*!40000 ALTER TABLE `gunluk` ENABLE KEYS */;
-- tablo yapısı dökülüyor phpscrip_musteri.hesap
CREATE TABLE IF NOT EXISTS `hesap` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`siparis_id` int(11) NOT NULL,
`tutar` float NOT NULL,
`fiyat` float NOT NULL,
`miktar` int(11) NOT NULL,
`firma_id` int(11) NOT NULL,
`musteri_id` int(11) NOT NULL,
`urun_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`durum` tinyint(4) NOT NULL,
`tarih` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`tip` varchar(100) NOT NULL,
`aciklama` varchar(100) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
-- phpscrip_musteri.hesap: ~1 rows (yaklaşık) tablosu için veriler indiriliyor
/*!40000 ALTER TABLE `hesap` DISABLE KEYS */;
INSERT INTO `hesap` (`id`, `siparis_id`, `tutar`, `fiyat`, `miktar`, `firma_id`, `musteri_id`, `urun_id`, `user_id`, `durum`, `tarih`, `tip`, `aciklama`) VALUES
(1, 4, 5, 1, 5, 1, 2, 1, 0, 1, '2020-02-12 00:56:31', 'SATIS', 'Testtt ');
/*!40000 ALTER TABLE `hesap` ENABLE KEYS */;
-- tablo yapısı dökülüyor phpscrip_musteri.ozellik
CREATE TABLE IF NOT EXISTS `ozellik` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`ad` varchar(100) NOT NULL,
`grup` varchar(100) NOT NULL,
`deger` varchar(100) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
-- phpscrip_musteri.ozellik: ~4 rows (yaklaşık) tablosu için veriler indiriliyor
/*!40000 ALTER TABLE `ozellik` DISABLE KEYS */;
INSERT INTO `ozellik` (`id`, `ad`, `grup`, `deger`) VALUES
(1, 'A 30', 'paket', '30'),
(2, 'B 60', 'paket', '60'),
(3, 'Kg', 'birim', 'Kg'),
(4, 'Adet', 'birim', 'Adet');
/*!40000 ALTER TABLE `ozellik` ENABLE KEYS */;
-- tablo yapısı dökülüyor phpscrip_musteri.siparis
CREATE TABLE IF NOT EXISTS `siparis` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`musteri_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`urun_id` int(11) NOT NULL,
`miktar` int(11) NOT NULL,
`fiyat` float NOT NULL,
`tutar` float NOT NULL,
`aciklama` varchar(200) NOT NULL,
`durum` int(11) NOT NULL,
`firma_id` int(11) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
-- phpscrip_musteri.siparis: ~4 rows (yaklaşık) tablosu için veriler indiriliyor
/*!40000 ALTER TABLE `siparis` DISABLE KEYS */;
INSERT INTO `siparis` (`id`, `musteri_id`, `user_id`, `urun_id`, `miktar`, `fiyat`, `tutar`, `aciklama`, `durum`, `firma_id`, `created_at`, `updated_at`) VALUES
(1, 2, 2, 1, 1000, 1, 1000, 'Test Sipari?i', 1, 1, '2020-02-12 00:54:21', '2020-02-12 00:54:45'),
(2, 2, 2, 2, 333, 3, 999, 'test', 1, 1, '2020-02-12 00:55:10', '2020-02-12 00:55:10'),
(3, 2, 2, 1, 3, 1, 3, 'tesr 123123', 1, 1, '2020-02-12 00:55:49', '2020-02-12 00:55:49'),
(4, 2, 2, 1, 5, 1, 5, 'Testtt ', 1, 1, '2020-02-12 00:56:34', '2020-02-12 00:56:34');
/*!40000 ALTER TABLE `siparis` ENABLE KEYS */;
-- tablo yapısı dökülüyor phpscrip_musteri.urun
CREATE TABLE IF NOT EXISTS `urun` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`firma_id` int(11) NOT NULL,
`birim` varchar(100) COLLATE utf8_turkish_ci NOT NULL,
`urunadi` varchar(100) COLLATE utf8_turkish_ci NOT NULL,
`fiyat` float NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_turkish_ci;
-- phpscrip_musteri.urun: ~2 rows (yaklaşık) tablosu için veriler indiriliyor
/*!40000 ALTER TABLE `urun` DISABLE KEYS */;
INSERT INTO `urun` (`id`, `firma_id`, `birim`, `urunadi`, `fiyat`) VALUES
(1, 1, 'Adet', 'Test Ürünü 1', 1),
(2, 1, 'Adet', 'Test Ürünü 2', 3);
/*!40000 ALTER TABLE `urun` ENABLE KEYS */;
-- tablo yapısı dökülüyor phpscrip_musteri.urun_fiyat
CREATE TABLE IF NOT EXISTS `urun_fiyat` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`musteri_id` int(11) NOT NULL,
`urun_id` int(11) NOT NULL,
`tip` int(11) NOT NULL,
`bolge_id` int(11) NOT NULL,
`firma_id` int(11) NOT NULL,
`fiyat` float NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_turkish_ci;
-- phpscrip_musteri.urun_fiyat: ~3 rows (yaklaşık) tablosu için veriler indiriliyor
/*!40000 ALTER TABLE `urun_fiyat` DISABLE KEYS */;
INSERT INTO `urun_fiyat` (`id`, `musteri_id`, `urun_id`, `tip`, `bolge_id`, `firma_id`, `fiyat`) VALUES
(1, 0, 2, 0, 0, 1, 3),
(2, 2, 1, 2, 0, 1, 1),
(3, 0, 1, 1, 1, 1, 5);
/*!40000 ALTER TABLE `urun_fiyat` ENABLE KEYS */;
-- tablo yapısı dökülüyor phpscrip_musteri.users
CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`tip` int(11) NOT NULL DEFAULT '0',
`email` varchar(200) COLLATE utf8_turkish_ci NOT NULL,
`firma_id` int(11) NOT NULL,
`remember_token` varchar(100) COLLATE utf8_turkish_ci NOT NULL,
`password` varchar(200) COLLATE utf8_turkish_ci NOT NULL,
`adres` varchar(100) COLLATE utf8_turkish_ci NOT NULL,
`tel` varchar(20) COLLATE utf8_turkish_ci NOT NULL,
`gsm` varchar(20) COLLATE utf8_turkish_ci NOT NULL,
`name` varchar(100) COLLATE utf8_turkish_ci NOT NULL,
`bolge_id` int(11) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`durum` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_turkish_ci;
-- phpscrip_musteri.users: ~3 rows (yaklaşık) tablosu için veriler indiriliyor
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
INSERT INTO `users` (`id`, `tip`, `email`, `firma_id`, `remember_token`, `password`, `adres`, `tel`, `gsm`, `name`, `bolge_id`, `created_at`, `updated_at`, `durum`) VALUES
(2, 1, '[email protected]', 1, 'd96P0mKe4feO5I6YUOuqFdjd3m4pXYxLcSQGgkArU5beEXplc7dXPMjpmzBQ', '$2y$10$trz1VRE0PH92YQTidmA7ueITicjs3kJ.KOVn4nElcKEcQJBRTqHTy', '', '', '', 'ANIL', 0, '2020-02-12 00:48:54', '2020-02-11 21:41:54', 1),
(3, 0, '[email protected]', 1, '', '$2y$10$pR.dJYNKIw/OXTDLs7pUx.hsPIU/xZRoUJ62wCPUPVvdcC7qzLQ7u', 'test', '', '35352342342', 'test', 1, '2020-02-11 21:57:28', '0000-00-00 00:00:00', 0),
(4, 0, '[email protected]', 1, '', '$2y$10$dCb07qihom0JEUbbnCoWDuo5rWfaFOwTa2AubS3ejtTkhA2hstFQC', 'antalya', '', '05555555555', 'yusuf sarı', 1, '2020-02-12 16:20:37', '0000-00-00 00:00:00', 0);
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;