This repository has been archived by the owner on Jun 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 115
/
db_toko.sql
149 lines (113 loc) · 4.79 KB
/
db_toko.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
/*
SQLyog Professional v12.5.1 (64 bit)
MySQL - 10.6.11-MariaDB-log : Database - db_toko
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
/*Table structure for table `barang` */
DROP TABLE IF EXISTS `barang`;
CREATE TABLE `barang` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_barang` varchar(255) NOT NULL,
`id_kategori` int(11) NOT NULL,
`nama_barang` text NOT NULL,
`merk` varchar(255) NOT NULL,
`harga_beli` varchar(255) NOT NULL,
`harga_jual` varchar(255) NOT NULL,
`satuan_barang` varchar(255) NOT NULL,
`stok` text NOT NULL,
`tgl_input` varchar(255) NOT NULL,
`tgl_update` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*Data for the table `barang` */
insert into `barang`(`id`,`id_barang`,`id_kategori`,`nama_barang`,`merk`,`harga_beli`,`harga_jual`,`satuan_barang`,`stok`,`tgl_input`,`tgl_update`) values
(1,'BR001',1,'Pensil','Fabel Castel','1500','3000','PCS','98','6 October 2020, 0:41',NULL),
(2,'BR002',5,'Sabun','Lifeboy','1800','3000','PCS','38','6 October 2020, 0:41','6 October 2020, 0:54'),
(3,'BR003',1,'Pulpen','Standard','1500','2000','PCS','70','6 October 2020, 1:34',NULL);
/*Table structure for table `kategori` */
DROP TABLE IF EXISTS `kategori`;
CREATE TABLE `kategori` (
`id_kategori` int(11) NOT NULL AUTO_INCREMENT,
`nama_kategori` varchar(255) NOT NULL,
`tgl_input` varchar(255) NOT NULL,
PRIMARY KEY (`id_kategori`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*Data for the table `kategori` */
insert into `kategori`(`id_kategori`,`nama_kategori`,`tgl_input`) values
(1,'ATK','7 May 2017, 10:23'),
(5,'Sabun','7 May 2017, 10:28'),
(6,'Snack','6 October 2020, 0:19'),
(7,'Minuman','6 October 2020, 0:20');
/*Table structure for table `login` */
DROP TABLE IF EXISTS `login`;
CREATE TABLE `login` (
`id_login` int(11) NOT NULL AUTO_INCREMENT,
`user` varchar(255) NOT NULL,
`pass` char(32) NOT NULL,
`id_member` int(11) NOT NULL,
PRIMARY KEY (`id_login`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*Data for the table `login` */
insert into `login`(`id_login`,`user`,`pass`,`id_member`) values
(1,'admin','202cb962ac59075b964b07152d234b70',1);
/*Table structure for table `member` */
DROP TABLE IF EXISTS `member`;
CREATE TABLE `member` (
`id_member` int(11) NOT NULL AUTO_INCREMENT,
`nm_member` varchar(255) NOT NULL,
`alamat_member` text NOT NULL,
`telepon` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`gambar` text NOT NULL,
`NIK` text NOT NULL,
PRIMARY KEY (`id_member`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*Data for the table `member` */
insert into `member`(`id_member`,`nm_member`,`alamat_member`,`telepon`,`email`,`gambar`,`NIK`) values
(1,'Fauzan Falah','uj harapan','081234567890','example@gmail.com','unnamed.jpg','12314121');
/*Table structure for table `nota` */
DROP TABLE IF EXISTS `nota`;
CREATE TABLE `nota` (
`id_nota` int(11) NOT NULL AUTO_INCREMENT,
`id_barang` varchar(255) NOT NULL,
`id_member` int(11) NOT NULL,
`jumlah` varchar(255) NOT NULL,
`total` varchar(255) NOT NULL,
`tanggal_input` varchar(255) NOT NULL,
`periode` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id_nota`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*Data for the table `nota` */
/*Table structure for table `penjualan` */
DROP TABLE IF EXISTS `penjualan`;
CREATE TABLE `penjualan` (
`id_penjualan` int(11) NOT NULL AUTO_INCREMENT,
`id_barang` varchar(255) NOT NULL,
`id_member` int(11) NOT NULL,
`jumlah` varchar(255) NOT NULL,
`total` varchar(255) NOT NULL,
`tanggal_input` varchar(255) NOT NULL,
PRIMARY KEY (`id_penjualan`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*Data for the table `penjualan` */
/*Table structure for table `toko` */
DROP TABLE IF EXISTS `toko`;
CREATE TABLE `toko` (
`id_toko` int(11) NOT NULL AUTO_INCREMENT,
`nama_toko` varchar(255) NOT NULL,
`alamat_toko` text NOT NULL,
`tlp` varchar(255) NOT NULL,
`nama_pemilik` varchar(255) NOT NULL,
PRIMARY KEY (`id_toko`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*Data for the table `toko` */
insert into `toko`(`id_toko`,`nama_toko`,`alamat_toko`,`tlp`,`nama_pemilik`) values
(1,'CV Daruttaqwa','Ujung Harapan','081234567890','Fauzan Falah');
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;