· 7 years ago · Dec 22, 2018, 10:14 PM
1/*Table structure for table `property` */
2
3DROP TABLE IF EXISTS `property`;
4
5CREATE TABLE `property` (
6 `id` int(11) NOT NULL AUTO_INCREMENT,
7 `title` char(40) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
8 `usage` tinyint(1) NOT NULL DEFAULT '0',
9 `type` tinyint(2) NOT NULL DEFAULT '0',
10 `status` tinyint(1) NOT NULL DEFAULT '0',
11 `bhk` tinyint(2) NOT NULL DEFAULT '0',
12 `baths` tinyint(1) NOT NULL DEFAULT '0',
13 `area_1` smallint(4) NOT NULL DEFAULT '0',
14 `area_2` smallint(4) NOT NULL DEFAULT '0',
15 `province` tinyint(2) NOT NULL DEFAULT '0',
16 `city` smallint(4) NOT NULL DEFAULT '0',
17 `zone` smallint(4) NOT NULL DEFAULT '0',
18 `type_of_road` tinyint(3) NOT NULL DEFAULT '0',
19 `address` varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
20 `floor` tinyint(2) NOT NULL DEFAULT '0',
21 `door` tinyint(1) NOT NULL DEFAULT '0',
22 `beach` smallint(11) NOT NULL DEFAULT '0',
23 `beach_unit` tinyint(1) NOT NULL DEFAULT '0',
24 `sale_price` int(11) NOT NULL DEFAULT '0',
25 `monthly_price` int(11) NOT NULL DEFAULT '0',
26 `buy_option` tinyint(1) NOT NULL DEFAULT '0',
27 `daily_price` int(11) NOT NULL DEFAULT '0',
28 `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
29 `visits` int(11) NOT NULL DEFAULT '0',
30 `main_img` char(41) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '{md5}.jpg',
31 PRIMARY KEY (`id`)
32) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
33
34/*Table structure for table `property_are_demand` */
35
36DROP TABLE IF EXISTS `property_are_demand`;
37
38CREATE TABLE `property_are_demand` (
39 `property_id` int(11) NOT NULL DEFAULT '0' COMMENT 'property.id',
40 `applicant_id` int(11) NOT NULL DEFAULT '0' COMMENT 'address_book.id / client.id'
41) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
42
43/*Table structure for table `property_are_supply` */
44
45DROP TABLE IF EXISTS `property_are_supply`;
46
47CREATE TABLE `property_are_supply` (
48 `property_id` int(11) NOT NULL DEFAULT '0' COMMENT 'property.id',
49 `owner_id` int(11) NOT NULL DEFAULT '0' COMMENT 'address_book.id / client.id'
50) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
51
52/*Table structure for table `property_client` */
53
54DROP TABLE IF EXISTS `property_client`;
55
56CREATE TABLE `property_client` (
57 `property_id` int(11) NOT NULL DEFAULT '0' COMMENT 'property.id',
58 `company_id` int(11) NOT NULL DEFAULT '0' COMMENT 'client.id',
59 `particular_id` int(11) NOT NULL DEFAULT '0' COMMENT 'client.id',
60 PRIMARY KEY (`property_id`)
61) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
62
63/*Table structure for table `property_client_commissions` */
64
65DROP TABLE IF EXISTS `property_client_commissions`;
66
67CREATE TABLE `property_client_commissions` (
68 `sale_percent` tinyint(11) NOT NULL DEFAULT '0',
69 `sale_commission` int(11) NOT NULL DEFAULT '0',
70 `monthly_percent` tinyint(11) NOT NULL DEFAULT '0',
71 `monthly_commission` int(11) NOT NULL DEFAULT '0',
72 `daily_percent` tinyint(11) NOT NULL DEFAULT '0',
73 `daily_commission` int(11) NOT NULL DEFAULT '0',
74 `property_id` int(11) NOT NULL DEFAULT '0' COMMENT 'property_client.property_id',
75 PRIMARY KEY (`property_id`)
76) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
77
78/*Table structure for table `property_client_documentation` */
79
80DROP TABLE IF EXISTS `property_client_documentation`;
81
82CREATE TABLE `property_client_documentation` (
83 `sellers_permit` tinyint(1) NOT NULL DEFAULT '0',
84 `exclusivity` tinyint(1) NOT NULL DEFAULT '0',
85 `owner_nif` tinyint(1) NOT NULL DEFAULT '0',
86 `property_deed` tinyint(1) NOT NULL DEFAULT '0',
87 `lvt_receipt` tinyint(1) NOT NULL DEFAULT '0',
88 `basic_supplies` tinyint(1) NOT NULL DEFAULT '0',
89 `simple_note` tinyint(1) NOT NULL DEFAULT '0',
90 `others` varchar(20) CHARACTER SET utf8 NOT NULL DEFAULT '',
91 `property_id` int(11) NOT NULL DEFAULT '0' COMMENT 'property_client.property_id',
92 PRIMARY KEY (`property_id`)
93) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
94
95/*Table structure for table `property_extras` */
96
97DROP TABLE IF EXISTS `property_extras`;
98
99CREATE TABLE `property_extras` (
100 `furnished` tinyint(1) NOT NULL DEFAULT '0',
101 `air_conditioner` tinyint(1) NOT NULL DEFAULT '0',
102 `heating` tinyint(1) NOT NULL DEFAULT '0',
103 `chimney` tinyint(1) NOT NULL DEFAULT '0',
104 `terrace` tinyint(1) NOT NULL DEFAULT '0',
105 `elevator` tinyint(1) NOT NULL DEFAULT '0',
106 `pool` tinyint(1) NOT NULL DEFAULT '0',
107 `garden` tinyint(1) NOT NULL DEFAULT '0',
108 `wooded` tinyint(1) NOT NULL DEFAULT '0',
109 `garage` tinyint(1) NOT NULL DEFAULT '0',
110 `box_room` tinyint(1) NOT NULL DEFAULT '0',
111 `pets` tinyint(1) NOT NULL DEFAULT '0',
112 `wifi` tinyint(1) NOT NULL DEFAULT '0',
113 `structure_shelter` tinyint(1) NOT NULL DEFAULT '0',
114 `basin_pool` tinyint(1) NOT NULL DEFAULT '0',
115 `water` tinyint(1) NOT NULL DEFAULT '0',
116 `plantation` tinyint(1) NOT NULL DEFAULT '0',
117 `fenced` tinyint(1) NOT NULL DEFAULT '0',
118 `electricity` tinyint(1) NOT NULL DEFAULT '0',
119 `property_id` int(11) NOT NULL DEFAULT '0' COMMENT 'property.id',
120 PRIMARY KEY (`property_id`)
121) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
122
123/*Table structure for table `property_lists_daily` */
124
125DROP TABLE IF EXISTS `property_lists_daily`;
126
127CREATE TABLE `property_lists_daily` (
128 `id` int(11) NOT NULL DEFAULT '0' COMMENT 'property.id',
129 PRIMARY KEY (`id`)
130) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
131
132/*Table structure for table `property_lists_monthly` */
133
134DROP TABLE IF EXISTS `property_lists_monthly`;
135
136CREATE TABLE `property_lists_monthly` (
137 `id` int(11) NOT NULL DEFAULT '0' COMMENT 'property.id',
138 PRIMARY KEY (`id`)
139) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
140
141/*Table structure for table `property_lists_sale` */
142
143DROP TABLE IF EXISTS `property_lists_sale`;
144
145CREATE TABLE `property_lists_sale` (
146 `id` int(11) NOT NULL DEFAULT '0' COMMENT 'property.id',
147 PRIMARY KEY (`id`)
148) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;