Repository navigation
Expand file tree
/
Copy pathsql dump.sql
More file actions
1658 lines (1210 loc) · 41.7 KB
/
Copy pathsql dump.sql
File metadata and controls
1658 lines (1210 loc) · 41.7 KB
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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
--
-- PostgreSQL database dump
--
-- Dumped from database version 17.2
-- Dumped by pg_dump version 17.2
-- Started on 2024-12-24 07:33:27
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET transaction_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;
--
-- TOC entry 249 (class 1255 OID 18471)
-- Name: bos_masalar_listele(); Type: FUNCTION; Schema: public; Owner: postgres
--
CREATE FUNCTION public.bos_masalar_listele() RETURNS TABLE(masano integer, kapasite integer, durum character varying)
LANGUAGE plpgsql
AS $$
BEGIN
RETURN QUERY
SELECT m.masaNo, m.kapasite, m.durum
FROM masalar m
WHERE m.durum = 'bos';
END;
$$;
ALTER FUNCTION public.bos_masalar_listele() OWNER TO postgres;
--
-- TOC entry 250 (class 1255 OID 18516)
-- Name: degerlendirme_ortalama(); Type: FUNCTION; Schema: public; Owner: postgres
--
CREATE FUNCTION public.degerlendirme_ortalama() RETURNS numeric
LANGUAGE plpgsql
AS $$
DECLARE
ortalama NUMERIC;
BEGIN
SELECT AVG(d.puan)
INTO ortalama
FROM Degerlendirmeler d;
RETURN COALESCE(ortalama, 0);
END;
$$;
ALTER FUNCTION public.degerlendirme_ortalama() OWNER TO postgres;
--
-- TOC entry 265 (class 1255 OID 18451)
-- Name: kritik_stok_ekle(); Type: FUNCTION; Schema: public; Owner: postgres
--
CREATE FUNCTION public.kritik_stok_ekle() RETURNS trigger
LANGUAGE plpgsql
AS $$
BEGIN
IF NEW.stok < 5 THEN
INSERT INTO KritikStok (urunNo, ad, mevcutStok, kategoriNo, tarih)
VALUES (NEW.urunNo, NEW.ad, NEW.stok, NEW.kategoriNo, CURRENT_TIMESTAMP)
ON CONFLICT (urunNo) DO UPDATE
SET mevcutStok = EXCLUDED.mevcutStok,
tarih = CURRENT_TIMESTAMP;
ELSE
DELETE FROM KritikStok WHERE urunNo = NEW.urunNo;
END IF;
RETURN NEW;
END;
$$;
ALTER FUNCTION public.kritik_stok_ekle() OWNER TO postgres;
--
-- TOC entry 246 (class 1255 OID 18437)
-- Name: masa_durum_guncelle(); Type: FUNCTION; Schema: public; Owner: postgres
--
CREATE FUNCTION public.masa_durum_guncelle() RETURNS trigger
LANGUAGE plpgsql
AS $$
BEGIN
IF TG_OP = 'INSERT' THEN
UPDATE masalar
SET durum = 'dolu'
WHERE masaNo = NEW.masaNo;
RETURN NEW;
END IF;
IF TG_OP = 'DELETE' THEN
UPDATE masalar
SET durum = 'bos'
WHERE masaNo = OLD.masaNo;
RETURN OLD;
END IF;
RETURN NULL;
END;
$$;
ALTER FUNCTION public.masa_durum_guncelle() OWNER TO postgres;
--
-- TOC entry 267 (class 1255 OID 18525)
-- Name: odeme(integer, timestamp without time zone, character varying); Type: FUNCTION; Schema: public; Owner: postgres
--
CREATE FUNCTION public.odeme(siparis_id integer, tarih timestamp without time zone, odeme_turu character varying) RETURNS void
LANGUAGE plpgsql
AS $$
DECLARE
toplam_tutar NUMERIC(10,2);
BEGIN
SELECT SUM(u.fiyat * su.miktar)
INTO toplam_tutar
FROM siparisurunleri su
JOIN urunler u ON su.urunNo = u.urunNo
WHERE su.siparisNo = siparis_id;
INSERT INTO Odemeler (siparisNo, tutar, tarih, odemeTuru)
VALUES (siparis_id, toplam_tutar, tarih, odeme_turu);
END;
$$;
ALTER FUNCTION public.odeme(siparis_id integer, tarih timestamp without time zone, odeme_turu character varying) OWNER TO postgres;
--
-- TOC entry 253 (class 1255 OID 18708)
-- Name: rezervasyon_iptal(integer); Type: FUNCTION; Schema: public; Owner: postgres
--
CREATE FUNCTION public.rezervasyon_iptal(p_rezervasyonno integer) RETURNS void
LANGUAGE plpgsql
AS $$
BEGIN
DELETE FROM Rezervasyonlar WHERE rezervasyonNo = p_rezervasyonNo;
END;
$$;
ALTER FUNCTION public.rezervasyon_iptal(p_rezervasyonno integer) OWNER TO postgres;
--
-- TOC entry 251 (class 1255 OID 18517)
-- Name: siparis_stok_azalt(); Type: FUNCTION; Schema: public; Owner: postgres
--
CREATE FUNCTION public.siparis_stok_azalt() RETURNS trigger
LANGUAGE plpgsql
AS $$
BEGIN
PERFORM stok_guncelle(NEW.urunNo, NEW.miktar, false);
RETURN NEW;
END;
$$;
ALTER FUNCTION public.siparis_stok_azalt() OWNER TO postgres;
--
-- TOC entry 247 (class 1255 OID 18439)
-- Name: siparis_urun_temizle(); Type: FUNCTION; Schema: public; Owner: postgres
--
CREATE FUNCTION public.siparis_urun_temizle() RETURNS trigger
LANGUAGE plpgsql
AS $$
BEGIN
DELETE FROM siparisurunleri
WHERE siparisNo = OLD.siparisNo;
RETURN OLD;
END;
$$;
ALTER FUNCTION public.siparis_urun_temizle() OWNER TO postgres;
--
-- TOC entry 266 (class 1255 OID 18467)
-- Name: stok_artir(); Type: FUNCTION; Schema: public; Owner: postgres
--
CREATE FUNCTION public.stok_artir() RETURNS trigger
LANGUAGE plpgsql
AS $$
BEGIN
UPDATE urunler
SET stok = stok + OLD.miktar
WHERE urunNo = OLD.urunNo;
RETURN OLD;
END;
$$;
ALTER FUNCTION public.stok_artir() OWNER TO postgres;
--
-- TOC entry 248 (class 1255 OID 18469)
-- Name: stok_guncelle(integer, integer, boolean); Type: FUNCTION; Schema: public; Owner: postgres
--
CREATE FUNCTION public.stok_guncelle(urun_id integer, miktar integer, artirma boolean) RETURNS void
LANGUAGE plpgsql
AS $$
BEGIN
IF artirma THEN
UPDATE urunler
SET stok = stok + miktar
WHERE urunNo = urun_id;
ELSE
UPDATE urunler
SET stok = stok - miktar
WHERE urunNo = urun_id;
END IF;
END;
$$;
ALTER FUNCTION public.stok_guncelle(urun_id integer, miktar integer, artirma boolean) OWNER TO postgres;
--
-- TOC entry 245 (class 1255 OID 18429)
-- Name: toplam_tutar_hesapla(integer); Type: FUNCTION; Schema: public; Owner: postgres
--
CREATE FUNCTION public.toplam_tutar_hesapla(siparis_id integer) RETURNS numeric
LANGUAGE plpgsql
AS $$
DECLARE
toplam NUMERIC;
BEGIN
SELECT SUM(u.fiyat * su.miktar)
INTO toplam
FROM siparisurunleri su
JOIN urunler u ON su.urunNo = u.urunNo
WHERE su.siparisNo = siparis_id;
RETURN toplam;
END;
$$;
ALTER FUNCTION public.toplam_tutar_hesapla(siparis_id integer) OWNER TO postgres;
--
-- TOC entry 252 (class 1255 OID 18707)
-- Name: yeni_kisi_ekle(integer, character varying, character varying); Type: FUNCTION; Schema: public; Owner: postgres
--
CREATE FUNCTION public.yeni_kisi_ekle(p_kisino integer, p_ad character varying, p_kisituru character varying) RETURNS void
LANGUAGE plpgsql
AS $$
BEGIN
INSERT INTO Kisiler (kisiNo, ad, kisiTuru) VALUES (p_kisiNo, p_ad, p_kisiTuru);
END;
$$;
ALTER FUNCTION public.yeni_kisi_ekle(p_kisino integer, p_ad character varying, p_kisituru character varying) OWNER TO postgres;
SET default_tablespace = '';
SET default_table_access_method = heap;
--
-- TOC entry 243 (class 1259 OID 18495)
-- Name: calisanlar; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.calisanlar (
kisino integer NOT NULL,
rol character varying(30) NOT NULL,
iletisim character varying(50) NOT NULL,
performans integer,
vardiya integer,
kullaniciadi character varying(100) NOT NULL,
sifre character varying(100) NOT NULL
);
ALTER TABLE public.calisanlar OWNER TO postgres;
--
-- TOC entry 223 (class 1259 OID 18314)
-- Name: degerlendirmeler; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.degerlendirmeler (
degerlendirmeno integer NOT NULL,
kisino integer,
puan integer
);
ALTER TABLE public.degerlendirmeler OWNER TO postgres;
--
-- TOC entry 222 (class 1259 OID 18313)
-- Name: degerlendirmeler_degerlendirmeno_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.degerlendirmeler_degerlendirmeno_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE public.degerlendirmeler_degerlendirmeno_seq OWNER TO postgres;
--
-- TOC entry 4978 (class 0 OID 0)
-- Dependencies: 222
-- Name: degerlendirmeler_degerlendirmeno_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.degerlendirmeler_degerlendirmeno_seq OWNED BY public.degerlendirmeler.degerlendirmeno;
--
-- TOC entry 218 (class 1259 OID 18263)
-- Name: kisiler; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.kisiler (
kisino integer NOT NULL,
ad character varying(50) NOT NULL,
kisituru character varying(20)
);
ALTER TABLE public.kisiler OWNER TO postgres;
--
-- TOC entry 217 (class 1259 OID 18262)
-- Name: kisiler_kisino_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.kisiler_kisino_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE public.kisiler_kisino_seq OWNER TO postgres;
--
-- TOC entry 4979 (class 0 OID 0)
-- Dependencies: 217
-- Name: kisiler_kisino_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.kisiler_kisino_seq OWNED BY public.kisiler.kisino;
--
-- TOC entry 240 (class 1259 OID 18443)
-- Name: kritikstok; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.kritikstok (
urunno integer NOT NULL,
ad text NOT NULL,
mevcutstok integer NOT NULL,
kategorino integer,
tarih timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);
ALTER TABLE public.kritikstok OWNER TO postgres;
--
-- TOC entry 238 (class 1259 OID 18408)
-- Name: malzemeler; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.malzemeler (
malzemeno integer NOT NULL,
ad character varying(50),
stok integer
);
ALTER TABLE public.malzemeler OWNER TO postgres;
--
-- TOC entry 237 (class 1259 OID 18407)
-- Name: malzemeler_malzemeno_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.malzemeler_malzemeno_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE public.malzemeler_malzemeno_seq OWNER TO postgres;
--
-- TOC entry 4980 (class 0 OID 0)
-- Dependencies: 237
-- Name: malzemeler_malzemeno_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.malzemeler_malzemeno_seq OWNED BY public.malzemeler.malzemeno;
--
-- TOC entry 225 (class 1259 OID 18326)
-- Name: masalar; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.masalar (
masano integer NOT NULL,
kapasite integer,
durum character varying(20)
);
ALTER TABLE public.masalar OWNER TO postgres;
--
-- TOC entry 224 (class 1259 OID 18325)
-- Name: masalar_masano_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.masalar_masano_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE public.masalar_masano_seq OWNER TO postgres;
--
-- TOC entry 4981 (class 0 OID 0)
-- Dependencies: 224
-- Name: masalar_masano_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.masalar_masano_seq OWNED BY public.masalar.masano;
--
-- TOC entry 233 (class 1259 OID 18374)
-- Name: menu; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.menu (
kategorino integer NOT NULL,
kategoriad character varying(50)
);
ALTER TABLE public.menu OWNER TO postgres;
--
-- TOC entry 232 (class 1259 OID 18373)
-- Name: menu_kategorino_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.menu_kategorino_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE public.menu_kategorino_seq OWNER TO postgres;
--
-- TOC entry 4982 (class 0 OID 0)
-- Dependencies: 232
-- Name: menu_kategorino_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.menu_kategorino_seq OWNED BY public.menu.kategorino;
--
-- TOC entry 219 (class 1259 OID 18269)
-- Name: musteriler; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.musteriler (
kisino integer NOT NULL
);
ALTER TABLE public.musteriler OWNER TO postgres;
--
-- TOC entry 231 (class 1259 OID 18362)
-- Name: odemeler; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.odemeler (
odemeno integer NOT NULL,
siparisno integer,
tutar numeric(10,2),
tarih timestamp without time zone,
odemeturu character varying(20),
durum character varying(1),
CONSTRAINT durum CHECK ((upper((durum)::text) = ANY (ARRAY['A'::text, 'P'::text])))
);
ALTER TABLE public.odemeler OWNER TO postgres;
--
-- TOC entry 230 (class 1259 OID 18361)
-- Name: odemeler_odemeno_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.odemeler_odemeno_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE public.odemeler_odemeno_seq OWNER TO postgres;
--
-- TOC entry 4983 (class 0 OID 0)
-- Dependencies: 230
-- Name: odemeler_odemeno_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.odemeler_odemeno_seq OWNED BY public.odemeler.odemeno;
--
-- TOC entry 242 (class 1259 OID 18488)
-- Name: performans; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.performans (
performansno integer NOT NULL,
puan character varying(10)
);
ALTER TABLE public.performans OWNER TO postgres;
--
-- TOC entry 241 (class 1259 OID 18487)
-- Name: performans_performansno_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.performans_performansno_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE public.performans_performansno_seq OWNER TO postgres;
--
-- TOC entry 4984 (class 0 OID 0)
-- Dependencies: 241
-- Name: performans_performansno_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.performans_performansno_seq OWNED BY public.performans.performansno;
--
-- TOC entry 227 (class 1259 OID 18333)
-- Name: rezervasyonlar; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.rezervasyonlar (
rezervasyonno integer NOT NULL,
kisino integer,
masano integer,
ad character varying(50),
kisisayisi integer,
zaman timestamp without time zone
);
ALTER TABLE public.rezervasyonlar OWNER TO postgres;
--
-- TOC entry 226 (class 1259 OID 18332)
-- Name: rezervasyonlar_rezervasyonno_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.rezervasyonlar_rezervasyonno_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE public.rezervasyonlar_rezervasyonno_seq OWNER TO postgres;
--
-- TOC entry 4985 (class 0 OID 0)
-- Dependencies: 226
-- Name: rezervasyonlar_rezervasyonno_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.rezervasyonlar_rezervasyonno_seq OWNED BY public.rezervasyonlar.rezervasyonno;
--
-- TOC entry 229 (class 1259 OID 18350)
-- Name: siparisler; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.siparisler (
siparisno integer NOT NULL,
masano integer,
zaman timestamp without time zone,
durum character(1),
CONSTRAINT durum CHECK ((upper((durum)::text) = ANY (ARRAY['A'::text, 'P'::text])))
);
ALTER TABLE public.siparisler OWNER TO postgres;
--
-- TOC entry 228 (class 1259 OID 18349)
-- Name: siparisler_siparisno_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.siparisler_siparisno_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE public.siparisler_siparisno_seq OWNER TO postgres;
--
-- TOC entry 4986 (class 0 OID 0)
-- Dependencies: 228
-- Name: siparisler_siparisno_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.siparisler_siparisno_seq OWNED BY public.siparisler.siparisno;
--
-- TOC entry 236 (class 1259 OID 18392)
-- Name: siparisurunleri; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.siparisurunleri (
siparisno integer NOT NULL,
urunno integer NOT NULL,
miktar integer
);
ALTER TABLE public.siparisurunleri OWNER TO postgres;
--
-- TOC entry 235 (class 1259 OID 18381)
-- Name: urunler; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.urunler (
urunno integer NOT NULL,
kategorino integer,
ad character varying(50),
fiyat numeric(10,2),
stok integer,
resim character varying(500)
);
ALTER TABLE public.urunler OWNER TO postgres;
--
-- TOC entry 234 (class 1259 OID 18380)
-- Name: urunler_urunno_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.urunler_urunno_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE public.urunler_urunno_seq OWNER TO postgres;
--
-- TOC entry 4987 (class 0 OID 0)
-- Dependencies: 234
-- Name: urunler_urunno_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.urunler_urunno_seq OWNED BY public.urunler.urunno;
--
-- TOC entry 239 (class 1259 OID 18414)
-- Name: urunmalzemeleri; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.urunmalzemeleri (
urunno integer NOT NULL,
malzemeno integer NOT NULL,
stok integer
);
ALTER TABLE public.urunmalzemeleri OWNER TO postgres;
--
-- TOC entry 221 (class 1259 OID 18302)
-- Name: vardiyalar; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.vardiyalar (
vardiyano integer NOT NULL,
vardiya character varying(20)
);
ALTER TABLE public.vardiyalar OWNER TO postgres;
--
-- TOC entry 220 (class 1259 OID 18301)
-- Name: vardiyalar_vardiyano_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.vardiyalar_vardiyano_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE public.vardiyalar_vardiyano_seq OWNER TO postgres;
--
-- TOC entry 4988 (class 0 OID 0)
-- Dependencies: 220
-- Name: vardiyalar_vardiyano_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.vardiyalar_vardiyano_seq OWNED BY public.vardiyalar.vardiyano;
--
-- TOC entry 244 (class 1259 OID 18587)
-- Name: yoneticiler; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.yoneticiler (
kisino integer NOT NULL,
kullaniciadi character varying(100) NOT NULL,
sifre character varying(100) NOT NULL
);
ALTER TABLE public.yoneticiler OWNER TO postgres;
--
-- TOC entry 4729 (class 2604 OID 18317)
-- Name: degerlendirmeler degerlendirmeno; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.degerlendirmeler ALTER COLUMN degerlendirmeno SET DEFAULT nextval('public.degerlendirmeler_degerlendirmeno_seq'::regclass);
--
-- TOC entry 4727 (class 2604 OID 18266)
-- Name: kisiler kisino; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.kisiler ALTER COLUMN kisino SET DEFAULT nextval('public.kisiler_kisino_seq'::regclass);
--
-- TOC entry 4736 (class 2604 OID 18411)
-- Name: malzemeler malzemeno; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.malzemeler ALTER COLUMN malzemeno SET DEFAULT nextval('public.malzemeler_malzemeno_seq'::regclass);
--
-- TOC entry 4730 (class 2604 OID 18329)
-- Name: masalar masano; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.masalar ALTER COLUMN masano SET DEFAULT nextval('public.masalar_masano_seq'::regclass);
--
-- TOC entry 4734 (class 2604 OID 18377)
-- Name: menu kategorino; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.menu ALTER COLUMN kategorino SET DEFAULT nextval('public.menu_kategorino_seq'::regclass);
--
-- TOC entry 4733 (class 2604 OID 18365)
-- Name: odemeler odemeno; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.odemeler ALTER COLUMN odemeno SET DEFAULT nextval('public.odemeler_odemeno_seq'::regclass);
--
-- TOC entry 4738 (class 2604 OID 18491)
-- Name: performans performansno; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.performans ALTER COLUMN performansno SET DEFAULT nextval('public.performans_performansno_seq'::regclass);
--
-- TOC entry 4731 (class 2604 OID 18336)
-- Name: rezervasyonlar rezervasyonno; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.rezervasyonlar ALTER COLUMN rezervasyonno SET DEFAULT nextval('public.rezervasyonlar_rezervasyonno_seq'::regclass);
--
-- TOC entry 4732 (class 2604 OID 18353)
-- Name: siparisler siparisno; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.siparisler ALTER COLUMN siparisno SET DEFAULT nextval('public.siparisler_siparisno_seq'::regclass);
--
-- TOC entry 4735 (class 2604 OID 18384)
-- Name: urunler urunno; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.urunler ALTER COLUMN urunno SET DEFAULT nextval('public.urunler_urunno_seq'::regclass);
--
-- TOC entry 4728 (class 2604 OID 18305)
-- Name: vardiyalar vardiyano; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.vardiyalar ALTER COLUMN vardiyano SET DEFAULT nextval('public.vardiyalar_vardiyano_seq'::regclass);
--
-- TOC entry 4971 (class 0 OID 18495)
-- Dependencies: 243
-- Data for Name: calisanlar; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.calisanlar (kisino, rol, iletisim, performans, vardiya, kullaniciadi, sifre) FROM stdin;
4 Garson 05552341111 4 2 osman.dere osman123
\.
--
-- TOC entry 4951 (class 0 OID 18314)
-- Dependencies: 223
-- Data for Name: degerlendirmeler; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.degerlendirmeler (degerlendirmeno, kisino, puan) FROM stdin;
2 4 2
3 3 3
\.
--
-- TOC entry 4946 (class 0 OID 18263)
-- Dependencies: 218
-- Data for Name: kisiler; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.kisiler (kisino, ad, kisituru) FROM stdin;
4 Osman Dere Müşteri
3 Mehmet Şimşek Garson
2 Ali Veli Müşteri
\.
--
-- TOC entry 4968 (class 0 OID 18443)
-- Dependencies: 240
-- Data for Name: kritikstok; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.kritikstok (urunno, ad, mevcutstok, kategorino, tarih) FROM stdin;
8 Makarna 0 1 2024-12-24 05:56:49.246661
\.
--
-- TOC entry 4966 (class 0 OID 18408)
-- Dependencies: 238
-- Data for Name: malzemeler; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.malzemeler (malzemeno, ad, stok) FROM stdin;
1 Köfte 200
2 Tavuk 250
\.
--
-- TOC entry 4953 (class 0 OID 18326)
-- Dependencies: 225
-- Data for Name: masalar; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.masalar (masano, kapasite, durum) FROM stdin;
1 4 dolu
2 2 bos
\.
--
-- TOC entry 4961 (class 0 OID 18374)
-- Dependencies: 233
-- Data for Name: menu; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.menu (kategorino, kategoriad) FROM stdin;
1 Yiyecek
2 İçecek
3 Alkollü İçecekler
\.
--
-- TOC entry 4947 (class 0 OID 18269)
-- Dependencies: 219
-- Data for Name: musteriler; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.musteriler (kisino) FROM stdin;
4
3
\.
--
-- TOC entry 4959 (class 0 OID 18362)
-- Dependencies: 231
-- Data for Name: odemeler; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.odemeler (odemeno, siparisno, tutar, tarih, odemeturu, durum) FROM stdin;
1 1 500.00 2024-12-20 21:56:23.241128 Nakit A