-
Notifications
You must be signed in to change notification settings - Fork 0
/
kos.sql
55 lines (42 loc) · 1.75 KB
/
kos.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
/*
SQLyog Ultimate v12.4.1 (64 bit)
MySQL - 10.1.13-MariaDB : Database - kos
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!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' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/`kos` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `kos`;
/*Table structure for table `kos` */
DROP TABLE IF EXISTS `kos`;
CREATE TABLE `kos` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`nama` varchar(200) DEFAULT NULL,
`alamat` text,
`latitude` varchar(255) DEFAULT NULL,
`longitude` varchar(255) DEFAULT NULL,
`alamat_map` varchar(255) DEFAULT NULL,
`id_user` bigint(20) unsigned DEFAULT NULL,
`gambar` varchar(200) DEFAULT NULL COMMENT 'gunakan ; jika gambar lebih dari 1',
`harga` double DEFAULT NULL,
`periode_sewa` enum('harian','bulanan','tahunan') DEFAULT 'bulanan',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=48 DEFAULT CHARSET=latin1;
/*Table structure for table `user` */
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`nama` varchar(200) DEFAULT NULL,
`username` varchar(200) DEFAULT NULL,
`password` text,
`level` enum('pemilik_kos','admin') DEFAULT 'pemilik_kos',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=latin1;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;