| 1 | CREATE TABLE dtb_kiyaku ( |
|---|
| 2 | kiyaku_id int auto_increment primary key NOT NULL, |
|---|
| 3 | kiyaku_title text NOT NULL, |
|---|
| 4 | kiyaku_text text NOT NULL, |
|---|
| 5 | rank int NOT NULL DEFAULT 0, |
|---|
| 6 | creator_id int NOT NULL, |
|---|
| 7 | create_date datetime NOT NULL , |
|---|
| 8 | update_date datetime NOT NULL, |
|---|
| 9 | del_flg smallint NOT NULL DEFAULT 0 |
|---|
| 10 | ); |
|---|
| 11 | |
|---|
| 12 | CREATE TABLE mtb_zip ( |
|---|
| 13 | code text, |
|---|
| 14 | old_zipcode text, |
|---|
| 15 | zipcode text, |
|---|
| 16 | state_kana text, |
|---|
| 17 | city_kana text, |
|---|
| 18 | town_kana text, |
|---|
| 19 | state text, |
|---|
| 20 | city text, |
|---|
| 21 | town text, |
|---|
| 22 | flg1 text, |
|---|
| 23 | flg2 text, |
|---|
| 24 | flg3 text, |
|---|
| 25 | flg4 text, |
|---|
| 26 | flg5 text, |
|---|
| 27 | flg6 text |
|---|
| 28 | ); |
|---|
| 29 | |
|---|
| 30 | CREATE TABLE dtb_bat_order_daily_age ( |
|---|
| 31 | order_count numeric NOT NULL DEFAULT 0, |
|---|
| 32 | total numeric NOT NULL DEFAULT 0, |
|---|
| 33 | total_average numeric NOT NULL DEFAULT 0, |
|---|
| 34 | start_age smallint, |
|---|
| 35 | end_age smallint, |
|---|
| 36 | member smallint, |
|---|
| 37 | order_date datetime , |
|---|
| 38 | create_date datetime NOT NULL |
|---|
| 39 | ); |
|---|
| 40 | |
|---|
| 41 | CREATE TABLE dtb_update ( |
|---|
| 42 | module_id int NOT NULL UNIQUE, |
|---|
| 43 | module_name text NOT NULL, |
|---|
| 44 | now_version text, |
|---|
| 45 | latest_version text NOT NULL, |
|---|
| 46 | module_explain text, |
|---|
| 47 | main_php text NOT NULL, |
|---|
| 48 | extern_php text NOT NULL, |
|---|
| 49 | sql text, |
|---|
| 50 | uninstall_sql text, |
|---|
| 51 | other_files text, |
|---|
| 52 | del_flg smallint NOT NULL DEFAULT 0, |
|---|
| 53 | create_date datetime NOT NULL , |
|---|
| 54 | update_date datetime, |
|---|
| 55 | release_date datetime NOT NULL |
|---|
| 56 | ); |
|---|
| 57 | |
|---|
| 58 | CREATE TABLE dtb_baseinfo ( |
|---|
| 59 | company_name text, |
|---|
| 60 | company_kana text, |
|---|
| 61 | zip01 text, |
|---|
| 62 | zip02 text, |
|---|
| 63 | pref smallint, |
|---|
| 64 | addr01 text, |
|---|
| 65 | addr02 text, |
|---|
| 66 | tel01 text, |
|---|
| 67 | tel02 text, |
|---|
| 68 | tel03 text, |
|---|
| 69 | fax01 text, |
|---|
| 70 | fax02 text, |
|---|
| 71 | fax03 text, |
|---|
| 72 | business_hour text, |
|---|
| 73 | law_company text, |
|---|
| 74 | law_manager text, |
|---|
| 75 | law_zip01 text, |
|---|
| 76 | law_zip02 text, |
|---|
| 77 | law_pref smallint, |
|---|
| 78 | law_addr01 text, |
|---|
| 79 | law_addr02 text, |
|---|
| 80 | law_tel01 text, |
|---|
| 81 | law_tel02 text, |
|---|
| 82 | law_tel03 text, |
|---|
| 83 | law_fax01 text, |
|---|
| 84 | law_fax02 text, |
|---|
| 85 | law_fax03 text, |
|---|
| 86 | law_email text, |
|---|
| 87 | law_url text, |
|---|
| 88 | law_term01 text, |
|---|
| 89 | law_term02 text, |
|---|
| 90 | law_term03 text, |
|---|
| 91 | law_term04 text, |
|---|
| 92 | law_term05 text, |
|---|
| 93 | law_term06 text, |
|---|
| 94 | law_term07 text, |
|---|
| 95 | law_term08 text, |
|---|
| 96 | law_term09 text, |
|---|
| 97 | law_term10 text, |
|---|
| 98 | tax numeric DEFAULT 5, |
|---|
| 99 | tax_rule smallint DEFAULT 1, |
|---|
| 100 | email01 text, |
|---|
| 101 | email02 text, |
|---|
| 102 | email03 text, |
|---|
| 103 | email04 text, |
|---|
| 104 | email05 text, |
|---|
| 105 | free_rule numeric, |
|---|
| 106 | shop_name text, |
|---|
| 107 | shop_kana text, |
|---|
| 108 | point_rate numeric, |
|---|
| 109 | welcome_point numeric, |
|---|
| 110 | update_date datetime, |
|---|
| 111 | top_tpl text, |
|---|
| 112 | product_tpl text, |
|---|
| 113 | detail_tpl text, |
|---|
| 114 | mypage_tpl text, |
|---|
| 115 | good_traded text, |
|---|
| 116 | message text |
|---|
| 117 | ); |
|---|
| 118 | |
|---|
| 119 | CREATE TABLE dtb_deliv ( |
|---|
| 120 | deliv_id int auto_increment primary key NOT NULL, |
|---|
| 121 | name text, |
|---|
| 122 | service_name text, |
|---|
| 123 | confirm_url text, |
|---|
| 124 | rank int, |
|---|
| 125 | status smallint NOT NULL DEFAULT 1, |
|---|
| 126 | del_flg smallint NOT NULL DEFAULT 0, |
|---|
| 127 | creator_id int NOT NULL, |
|---|
| 128 | create_date datetime NOT NULL , |
|---|
| 129 | update_date datetime |
|---|
| 130 | ); |
|---|
| 131 | |
|---|
| 132 | CREATE TABLE dtb_delivtime ( |
|---|
| 133 | deliv_id int NOT NULL, |
|---|
| 134 | time_id int auto_increment primary key NOT NULL, |
|---|
| 135 | deliv_time text NOT NULL |
|---|
| 136 | ); |
|---|
| 137 | |
|---|
| 138 | CREATE TABLE dtb_delivfee ( |
|---|
| 139 | deliv_id int NOT NULL, |
|---|
| 140 | fee_id int auto_increment primary key NOT NULL, |
|---|
| 141 | fee text NOT NULL, |
|---|
| 142 | pref smallint |
|---|
| 143 | ); |
|---|
| 144 | |
|---|
| 145 | CREATE TABLE dtb_payment ( |
|---|
| 146 | payment_id int auto_increment primary key NOT NULL, |
|---|
| 147 | payment_method text, |
|---|
| 148 | charge numeric, |
|---|
| 149 | rule numeric, |
|---|
| 150 | deliv_id int DEFAULT 0, |
|---|
| 151 | rank int, |
|---|
| 152 | note text, |
|---|
| 153 | fix smallint, |
|---|
| 154 | status smallint NOT NULL DEFAULT 1, |
|---|
| 155 | del_flg smallint NOT NULL DEFAULT 0, |
|---|
| 156 | creator_id int NOT NULL, |
|---|
| 157 | create_date datetime NOT NULL , |
|---|
| 158 | update_date datetime, |
|---|
| 159 | payment_image text, |
|---|
| 160 | upper_rule numeric |
|---|
| 161 | ); |
|---|
| 162 | |
|---|
| 163 | CREATE TABLE dtb_mailtemplate ( |
|---|
| 164 | template_id int NOT NULL, |
|---|
| 165 | subject text, |
|---|
| 166 | header text, |
|---|
| 167 | footer text, |
|---|
| 168 | creator_id int NOT NULL, |
|---|
| 169 | del_flg smallint NOT NULL DEFAULT 0, |
|---|
| 170 | create_date datetime NOT NULL , |
|---|
| 171 | update_date datetime NOT NULL |
|---|
| 172 | ); |
|---|
| 173 | |
|---|
| 174 | CREATE TABLE dtb_mailmaga_template ( |
|---|
| 175 | template_id int auto_increment primary key NOT NULL UNIQUE, |
|---|
| 176 | subject text, |
|---|
| 177 | charge_image text, |
|---|
| 178 | mail_method int, |
|---|
| 179 | header text, |
|---|
| 180 | body text, |
|---|
| 181 | main_title text, |
|---|
| 182 | main_comment text, |
|---|
| 183 | main_product_id int, |
|---|
| 184 | sub_title text, |
|---|
| 185 | sub_comment text, |
|---|
| 186 | sub_product_id01 int, |
|---|
| 187 | sub_product_id02 int, |
|---|
| 188 | sub_product_id03 int, |
|---|
| 189 | sub_product_id04 int, |
|---|
| 190 | sub_product_id05 int, |
|---|
| 191 | sub_product_id06 int, |
|---|
| 192 | sub_product_id07 int, |
|---|
| 193 | sub_product_id08 int, |
|---|
| 194 | sub_product_id09 int, |
|---|
| 195 | sub_product_id10 int, |
|---|
| 196 | sub_product_id11 int, |
|---|
| 197 | sub_product_id12 int, |
|---|
| 198 | del_flg smallint NOT NULL DEFAULT 0, |
|---|
| 199 | creator_id int NOT NULL, |
|---|
| 200 | create_date datetime NOT NULL , |
|---|
| 201 | update_date datetime |
|---|
| 202 | ); |
|---|
| 203 | |
|---|
| 204 | CREATE TABLE dtb_send_history ( |
|---|
| 205 | send_id int auto_increment primary key NOT NULL, |
|---|
| 206 | mail_method smallint, |
|---|
| 207 | subject text, |
|---|
| 208 | body text, |
|---|
| 209 | send_count int, |
|---|
| 210 | complete_count int NOT NULL DEFAULT 0, |
|---|
| 211 | start_date datetime, |
|---|
| 212 | end_date datetime, |
|---|
| 213 | search_data text, |
|---|
| 214 | del_flg smallint NOT NULL DEFAULT 0, |
|---|
| 215 | creator_id int NOT NULL, |
|---|
| 216 | create_date datetime NOT NULL , |
|---|
| 217 | update_date datetime NOT NULL |
|---|
| 218 | ); |
|---|
| 219 | |
|---|
| 220 | CREATE TABLE dtb_send_customer ( |
|---|
| 221 | customer_id int, |
|---|
| 222 | send_id int auto_increment primary key NOT NULL, |
|---|
| 223 | email text, |
|---|
| 224 | name text, |
|---|
| 225 | send_flag smallint |
|---|
| 226 | ); |
|---|
| 227 | |
|---|
| 228 | CREATE TABLE dtb_products ( |
|---|
| 229 | product_id int auto_increment primary key NOT NULL UNIQUE, |
|---|
| 230 | name text, |
|---|
| 231 | deliv_fee numeric, |
|---|
| 232 | sale_limit numeric, |
|---|
| 233 | sale_unlimited smallint DEFAULT 0, |
|---|
| 234 | category_id int, |
|---|
| 235 | rank int, |
|---|
| 236 | status smallint NOT NULL DEFAULT 2, |
|---|
| 237 | product_flag text, |
|---|
| 238 | point_rate numeric, |
|---|
| 239 | comment1 text, |
|---|
| 240 | comment2 text, |
|---|
| 241 | comment3 mediumtext, |
|---|
| 242 | comment4 text, |
|---|
| 243 | comment5 text, |
|---|
| 244 | comment6 text, |
|---|
| 245 | file1 text, |
|---|
| 246 | file2 text, |
|---|
| 247 | file3 text, |
|---|
| 248 | file4 text, |
|---|
| 249 | file5 text, |
|---|
| 250 | file6 text, |
|---|
| 251 | main_list_comment text, |
|---|
| 252 | main_list_image text, |
|---|
| 253 | main_comment mediumtext, |
|---|
| 254 | main_image text, |
|---|
| 255 | main_large_image text, |
|---|
| 256 | sub_title1 text, |
|---|
| 257 | sub_comment1 mediumtext, |
|---|
| 258 | sub_image1 text, |
|---|
| 259 | sub_large_image1 text, |
|---|
| 260 | sub_title2 text, |
|---|
| 261 | sub_comment2 mediumtext, |
|---|
| 262 | sub_image2 text, |
|---|
| 263 | sub_large_image2 text, |
|---|
| 264 | sub_title3 text, |
|---|
| 265 | sub_comment3 mediumtext, |
|---|
| 266 | sub_image3 text, |
|---|
| 267 | sub_large_image3 text, |
|---|
| 268 | sub_title4 text, |
|---|
| 269 | sub_comment4 mediumtext, |
|---|
| 270 | sub_image4 text, |
|---|
| 271 | sub_large_image4 text, |
|---|
| 272 | sub_title5 text, |
|---|
| 273 | sub_comment5 mediumtext, |
|---|
| 274 | sub_image5 text, |
|---|
| 275 | sub_large_image5 text, |
|---|
| 276 | sub_title6 text, |
|---|
| 277 | sub_comment6 mediumtext, |
|---|
| 278 | sub_image6 text, |
|---|
| 279 | sub_large_image6 text, |
|---|
| 280 | del_flg smallint NOT NULL DEFAULT 0, |
|---|
| 281 | creator_id int NOT NULL, |
|---|
| 282 | create_date datetime NOT NULL , |
|---|
| 283 | update_date datetime, |
|---|
| 284 | deliv_date_id int |
|---|
| 285 | ); |
|---|
| 286 | |
|---|
| 287 | CREATE TABLE dtb_products_class ( |
|---|
| 288 | product_class_id int auto_increment primary key NOT NULL UNIQUE, |
|---|
| 289 | product_id int NOT NULL, |
|---|
| 290 | classcategory_id1 int NOT NULL DEFAULT 0, |
|---|
| 291 | classcategory_id2 int NOT NULL DEFAULT 0, |
|---|
| 292 | product_code text, |
|---|
| 293 | stock numeric, |
|---|
| 294 | stock_unlimited smallint DEFAULT 0, |
|---|
| 295 | sale_limit numeric, |
|---|
| 296 | price01 numeric, |
|---|
| 297 | price02 numeric, |
|---|
| 298 | status smallint, |
|---|
| 299 | creator_id int NOT NULL, |
|---|
| 300 | create_date datetime NOT NULL , |
|---|
| 301 | update_date datetime |
|---|
| 302 | ); |
|---|
| 303 | |
|---|
| 304 | CREATE TABLE dtb_class ( |
|---|
| 305 | class_id int auto_increment primary key NOT NULL, |
|---|
| 306 | name text, |
|---|
| 307 | status smallint, |
|---|
| 308 | rank int, |
|---|
| 309 | creator_id int NOT NULL, |
|---|
| 310 | create_date datetime NOT NULL , |
|---|
| 311 | update_date datetime, |
|---|
| 312 | del_flg smallint NOT NULL DEFAULT 0, |
|---|
| 313 | product_id int |
|---|
| 314 | ); |
|---|
| 315 | |
|---|
| 316 | CREATE TABLE dtb_classcategory ( |
|---|
| 317 | classcategory_id int auto_increment primary key NOT NULL, |
|---|
| 318 | name text, |
|---|
| 319 | class_id int NOT NULL, |
|---|
| 320 | status smallint, |
|---|
| 321 | rank int, |
|---|
| 322 | creator_id int NOT NULL, |
|---|
| 323 | create_date datetime NOT NULL , |
|---|
| 324 | update_date datetime, |
|---|
| 325 | del_flg smallint NOT NULL DEFAULT 0 |
|---|
| 326 | ); |
|---|
| 327 | |
|---|
| 328 | CREATE TABLE dtb_category ( |
|---|
| 329 | category_id int auto_increment primary key NOT NULL, |
|---|
| 330 | category_name text, |
|---|
| 331 | parent_category_id int NOT NULL DEFAULT 0, |
|---|
| 332 | level int NOT NULL, |
|---|
| 333 | rank int, |
|---|
| 334 | creator_id int NOT NULL, |
|---|
| 335 | create_date datetime NOT NULL , |
|---|
| 336 | update_date datetime, |
|---|
| 337 | del_flg smallint NOT NULL DEFAULT 0 |
|---|
| 338 | ); |
|---|
| 339 | |
|---|
| 340 | CREATE TABLE dtb_bat_order_daily ( |
|---|
| 341 | total_order numeric NOT NULL DEFAULT 0, |
|---|
| 342 | member numeric NOT NULL DEFAULT 0, |
|---|
| 343 | nonmember numeric NOT NULL DEFAULT 0, |
|---|
| 344 | men numeric NOT NULL DEFAULT 0, |
|---|
| 345 | women numeric NOT NULL DEFAULT 0, |
|---|
| 346 | men_member numeric NOT NULL DEFAULT 0, |
|---|
| 347 | men_nonmember numeric NOT NULL DEFAULT 0, |
|---|
| 348 | women_member numeric NOT NULL DEFAULT 0, |
|---|
| 349 | women_nonmember numeric NOT NULL DEFAULT 0, |
|---|
| 350 | total numeric NOT NULL DEFAULT 0, |
|---|
| 351 | total_average numeric NOT NULL DEFAULT 0, |
|---|
| 352 | order_date datetime NOT NULL , |
|---|
| 353 | create_date datetime NOT NULL , |
|---|
| 354 | year smallint NOT NULL, |
|---|
| 355 | month smallint NOT NULL, |
|---|
| 356 | day smallint NOT NULL, |
|---|
| 357 | wday smallint NOT NULL, |
|---|
| 358 | key_day text NOT NULL, |
|---|
| 359 | key_month text NOT NULL, |
|---|
| 360 | key_year text NOT NULL, |
|---|
| 361 | key_wday text NOT NULL |
|---|
| 362 | ); |
|---|
| 363 | |
|---|
| 364 | CREATE TABLE dtb_bat_order_daily_hour ( |
|---|
| 365 | total_order numeric NOT NULL DEFAULT 0, |
|---|
| 366 | member numeric NOT NULL DEFAULT 0, |
|---|
| 367 | nonmember numeric NOT NULL DEFAULT 0, |
|---|
| 368 | men numeric NOT NULL DEFAULT 0, |
|---|
| 369 | women numeric NOT NULL DEFAULT 0, |
|---|
| 370 | men_member numeric NOT NULL DEFAULT 0, |
|---|
| 371 | men_nonmember numeric NOT NULL DEFAULT 0, |
|---|
| 372 | women_member numeric NOT NULL DEFAULT 0, |
|---|
| 373 | women_nonmember numeric NOT NULL DEFAULT 0, |
|---|
| 374 | total numeric NOT NULL DEFAULT 0, |
|---|
| 375 | total_average numeric NOT NULL DEFAULT 0, |
|---|
| 376 | hour smallint NOT NULL DEFAULT 0, |
|---|
| 377 | order_date datetime , |
|---|
| 378 | create_date datetime NOT NULL |
|---|
| 379 | ); |
|---|
| 380 | |
|---|
| 381 | CREATE TABLE dtb_recommend_products ( |
|---|
| 382 | product_id int NOT NULL, |
|---|
| 383 | recommend_product_id int, |
|---|
| 384 | rank int NOT NULL, |
|---|
| 385 | comment text, |
|---|
| 386 | status smallint NOT NULL DEFAULT 0, |
|---|
| 387 | creator_id int NOT NULL, |
|---|
| 388 | create_date datetime NOT NULL , |
|---|
| 389 | update_date datetime NOT NULL |
|---|
| 390 | ); |
|---|
| 391 | |
|---|
| 392 | CREATE TABLE dtb_review ( |
|---|
| 393 | review_id int auto_increment primary key NOT NULL, |
|---|
| 394 | product_id int NOT NULL, |
|---|
| 395 | reviewer_name text NOT NULL, |
|---|
| 396 | reviewer_url text, |
|---|
| 397 | sex smallint, |
|---|
| 398 | customer_id int, |
|---|
| 399 | recommend_level smallint NOT NULL, |
|---|
| 400 | title text NOT NULL, |
|---|
| 401 | comment text NOT NULL, |
|---|
| 402 | status smallint DEFAULT 2, |
|---|
| 403 | creator_id int NOT NULL, |
|---|
| 404 | create_date datetime, |
|---|
| 405 | update_date datetime, |
|---|
| 406 | del_flg smallint NOT NULL DEFAULT 0 |
|---|
| 407 | ); |
|---|
| 408 | |
|---|
| 409 | CREATE TABLE dtb_customer_reading ( |
|---|
| 410 | reading_product_id int NOT NULL, |
|---|
| 411 | customer_id int NOT NULL, |
|---|
| 412 | create_date datetime NOT NULL, |
|---|
| 413 | update_date datetime NOT NULL |
|---|
| 414 | ); |
|---|
| 415 | |
|---|
| 416 | CREATE TABLE dtb_category_count ( |
|---|
| 417 | category_id int NOT NULL, |
|---|
| 418 | product_count int NOT NULL, |
|---|
| 419 | create_date datetime NOT NULL |
|---|
| 420 | ); |
|---|
| 421 | |
|---|
| 422 | CREATE TABLE dtb_category_total_count ( |
|---|
| 423 | category_id int NOT NULL, |
|---|
| 424 | product_count int, |
|---|
| 425 | create_date datetime NOT NULL |
|---|
| 426 | ); |
|---|
| 427 | |
|---|
| 428 | CREATE TABLE dtb_news ( |
|---|
| 429 | news_id int auto_increment primary key NOT NULL UNIQUE, |
|---|
| 430 | news_date datetime, |
|---|
| 431 | rank int, |
|---|
| 432 | news_title text NOT NULL, |
|---|
| 433 | news_comment text, |
|---|
| 434 | news_url text, |
|---|
| 435 | news_select smallint NOT NULL DEFAULT 0, |
|---|
| 436 | link_method text, |
|---|
| 437 | creator_id int NOT NULL, |
|---|
| 438 | create_date datetime NOT NULL , |
|---|
| 439 | update_date datetime, |
|---|
| 440 | del_flg smallint NOT NULL DEFAULT 0 |
|---|
| 441 | ); |
|---|
| 442 | |
|---|
| 443 | CREATE TABLE dtb_best_products ( |
|---|
| 444 | best_id int auto_increment primary key NOT NULL, |
|---|
| 445 | category_id int NOT NULL, |
|---|
| 446 | rank int NOT NULL DEFAULT 0, |
|---|
| 447 | product_id int NOT NULL, |
|---|
| 448 | title text, |
|---|
| 449 | comment text, |
|---|
| 450 | creator_id int NOT NULL, |
|---|
| 451 | create_date datetime NOT NULL , |
|---|
| 452 | update_date datetime, |
|---|
| 453 | del_flg smallint NOT NULL DEFAULT 0 |
|---|
| 454 | ); |
|---|
| 455 | |
|---|
| 456 | CREATE TABLE dtb_mail_history ( |
|---|
| 457 | send_id int auto_increment primary key NOT NULL, |
|---|
| 458 | order_id int NOT NULL, |
|---|
| 459 | send_date datetime, |
|---|
| 460 | template_id int, |
|---|
| 461 | creator_id int NOT NULL, |
|---|
| 462 | subject text, |
|---|
| 463 | mail_body text |
|---|
| 464 | ); |
|---|
| 465 | |
|---|
| 466 | CREATE TABLE dtb_customer ( |
|---|
| 467 | customer_id int auto_increment primary key NOT NULL, |
|---|
| 468 | name01 text NOT NULL, |
|---|
| 469 | name02 text NOT NULL, |
|---|
| 470 | kana01 text NOT NULL, |
|---|
| 471 | kana02 text NOT NULL, |
|---|
| 472 | zip01 text, |
|---|
| 473 | zip02 text, |
|---|
| 474 | pref smallint, |
|---|
| 475 | addr01 text, |
|---|
| 476 | addr02 text, |
|---|
| 477 | email text NOT NULL, |
|---|
| 478 | email_mobile text, |
|---|
| 479 | tel01 text, |
|---|
| 480 | tel02 text, |
|---|
| 481 | tel03 text, |
|---|
| 482 | fax01 text, |
|---|
| 483 | fax02 text, |
|---|
| 484 | fax03 text, |
|---|
| 485 | sex smallint, |
|---|
| 486 | job smallint, |
|---|
| 487 | birth text, |
|---|
| 488 | password text, |
|---|
| 489 | reminder smallint, |
|---|
| 490 | reminder_answer text, |
|---|
| 491 | secret_key varchar(50) NOT NULL UNIQUE, |
|---|
| 492 | first_buy_date datetime, |
|---|
| 493 | last_buy_date datetime, |
|---|
| 494 | buy_times numeric DEFAULT 0, |
|---|
| 495 | buy_total numeric DEFAULT 0, |
|---|
| 496 | point numeric DEFAULT 0, |
|---|
| 497 | note text, |
|---|
| 498 | status smallint NOT NULL DEFAULT 1, |
|---|
| 499 | create_date datetime NOT NULL , |
|---|
| 500 | update_date datetime , |
|---|
| 501 | del_flg smallint NOT NULL DEFAULT 0, |
|---|
| 502 | cell01 text, |
|---|
| 503 | cell02 text, |
|---|
| 504 | cell03 text |
|---|
| 505 | ); |
|---|
| 506 | |
|---|
| 507 | CREATE TABLE dtb_customer_mail ( |
|---|
| 508 | email varchar(50) NOT NULL UNIQUE, |
|---|
| 509 | mail_flag smallint, |
|---|
| 510 | create_date datetime NOT NULL , |
|---|
| 511 | update_date datetime |
|---|
| 512 | ); |
|---|
| 513 | |
|---|
| 514 | CREATE TABLE dtb_customer_mail_temp ( |
|---|
| 515 | email varchar(50) NOT NULL UNIQUE, |
|---|
| 516 | mail_flag smallint, |
|---|
| 517 | temp_id varchar(50) NOT NULL UNIQUE, |
|---|
| 518 | end_flag smallint, |
|---|
| 519 | update_date datetime NOT NULL , |
|---|
| 520 | create_data datetime NOT NULL |
|---|
| 521 | ); |
|---|
| 522 | |
|---|
| 523 | CREATE TABLE dtb_order ( |
|---|
| 524 | order_id int auto_increment primary key NOT NULL, |
|---|
| 525 | order_temp_id text, |
|---|
| 526 | customer_id int NOT NULL, |
|---|
| 527 | message text, |
|---|
| 528 | order_name01 text, |
|---|
| 529 | order_name02 text, |
|---|
| 530 | order_kana01 text, |
|---|
| 531 | order_kana02 text, |
|---|
| 532 | order_email text, |
|---|
| 533 | order_tel01 text, |
|---|
| 534 | order_tel02 text, |
|---|
| 535 | order_tel03 text, |
|---|
| 536 | order_fax01 text, |
|---|
| 537 | order_fax02 text, |
|---|
| 538 | order_fax03 text, |
|---|
| 539 | order_zip01 text, |
|---|
| 540 | order_zip02 text, |
|---|
| 541 | order_pref text, |
|---|
| 542 | order_addr01 text, |
|---|
| 543 | order_addr02 text, |
|---|
| 544 | order_sex smallint, |
|---|
| 545 | order_birth text, |
|---|
| 546 | order_job int, |
|---|
| 547 | deliv_name01 text, |
|---|
| 548 | deliv_name02 text, |
|---|
| 549 | deliv_kana01 text, |
|---|
| 550 | deliv_kana02 text, |
|---|
| 551 | deliv_tel01 text, |
|---|
| 552 | deliv_tel02 text, |
|---|
| 553 | deliv_tel03 text, |
|---|
| 554 | deliv_fax01 text, |
|---|
| 555 | deliv_fax02 text, |
|---|
| 556 | deliv_fax03 text, |
|---|
| 557 | deliv_zip01 text, |
|---|
| 558 | deliv_zip02 text, |
|---|
| 559 | deliv_pref text, |
|---|
| 560 | deliv_addr01 text, |
|---|
| 561 | deliv_addr02 text, |
|---|
| 562 | subtotal numeric, |
|---|
| 563 | discount numeric, |
|---|
| 564 | deliv_fee numeric, |
|---|
| 565 | charge numeric, |
|---|
| 566 | use_point numeric, |
|---|
| 567 | add_point numeric, |
|---|
| 568 | birth_point numeric DEFAULT 0, |
|---|
| 569 | tax numeric, |
|---|
| 570 | total numeric, |
|---|
| 571 | payment_total numeric, |
|---|
| 572 | payment_id int, |
|---|
| 573 | payment_method text, |
|---|
| 574 | deliv_id int, |
|---|
| 575 | deliv_time_id int, |
|---|
| 576 | deliv_time text, |
|---|
| 577 | deliv_no text, |
|---|
| 578 | note text, |
|---|
| 579 | status smallint, |
|---|
| 580 | create_date datetime NOT NULL , |
|---|
| 581 | loan_result text, |
|---|
| 582 | credit_result text, |
|---|
| 583 | credit_msg text, |
|---|
| 584 | update_date datetime, |
|---|
| 585 | commit_date text, |
|---|
| 586 | del_flg smallint NOT NULL DEFAULT 0, |
|---|
| 587 | deliv_date text, |
|---|
| 588 | conveni_data text, |
|---|
| 589 | cell01 text, |
|---|
| 590 | cell02 text, |
|---|
| 591 | cell03 text |
|---|
| 592 | ); |
|---|
| 593 | |
|---|
| 594 | CREATE TABLE dtb_order_temp ( |
|---|
| 595 | order_temp_id text NOT NULL, |
|---|
| 596 | customer_id int NOT NULL, |
|---|
| 597 | message text, |
|---|
| 598 | order_name01 text, |
|---|
| 599 | order_name02 text, |
|---|
| 600 | order_kana01 text, |
|---|
| 601 | order_kana02 text, |
|---|
| 602 | order_email text, |
|---|
| 603 | order_tel01 text, |
|---|
| 604 | order_tel02 text, |
|---|
| 605 | order_tel03 text, |
|---|
| 606 | order_fax01 text, |
|---|
| 607 | order_fax02 text, |
|---|
| 608 | order_fax03 text, |
|---|
| 609 | order_zip01 text, |
|---|
| 610 | order_zip02 text, |
|---|
| 611 | order_pref text, |
|---|
| 612 | order_addr01 text, |
|---|
| 613 | order_addr02 text, |
|---|
| 614 | order_sex smallint, |
|---|
| 615 | order_birth text, |
|---|
| 616 | order_job int, |
|---|
| 617 | deliv_name01 text, |
|---|
| 618 | deliv_name02 text, |
|---|
| 619 | deliv_kana01 text, |
|---|
| 620 | deliv_kana02 text, |
|---|
| 621 | deliv_tel01 text, |
|---|
| 622 | deliv_tel02 text, |
|---|
| 623 | deliv_tel03 text, |
|---|
| 624 | deliv_fax01 text, |
|---|
| 625 | deliv_fax02 text, |
|---|
| 626 | deliv_fax03 text, |
|---|
| 627 | deliv_zip01 text, |
|---|
| 628 | deliv_zip02 text, |
|---|
| 629 | deliv_pref text, |
|---|
| 630 | deliv_addr01 text, |
|---|
| 631 | deliv_addr02 text, |
|---|
| 632 | subtotal numeric, |
|---|
| 633 | discount numeric, |
|---|
| 634 | deliv_fee numeric, |
|---|
| 635 | charge numeric, |
|---|
| 636 | use_point numeric, |
|---|
| 637 | add_point numeric, |
|---|
| 638 | birth_point numeric DEFAULT 0, |
|---|
| 639 | tax numeric, |
|---|
| 640 | total numeric, |
|---|
| 641 | payment_total numeric, |
|---|
| 642 | payment_id int, |
|---|
| 643 | payment_method text, |
|---|
| 644 | deliv_id int, |
|---|
| 645 | deliv_time_id int, |
|---|
| 646 | deliv_time text, |
|---|
| 647 | deliv_no text, |
|---|
| 648 | note text, |
|---|
| 649 | mail_flag smallint, |
|---|
| 650 | status smallint, |
|---|
| 651 | deliv_check smallint, |
|---|
| 652 | point_check smallint, |
|---|
| 653 | loan_result text, |
|---|
| 654 | credit_result text, |
|---|
| 655 | credit_msg text, |
|---|
| 656 | create_date datetime NOT NULL , |
|---|
| 657 | update_date datetime, |
|---|
| 658 | del_flg smallint NOT NULL DEFAULT 0, |
|---|
| 659 | deliv_date text, |
|---|
| 660 | conveni_data text, |
|---|
| 661 | cell01 text, |
|---|
| 662 | cell02 text, |
|---|
| 663 | cell03 text |
|---|
| 664 | ); |
|---|
| 665 | |
|---|
| 666 | CREATE TABLE dtb_other_deliv ( |
|---|
| 667 | other_deliv_id int auto_increment primary key NOT NULL, |
|---|
| 668 | customer_id int NOT NULL, |
|---|
| 669 | name01 text, |
|---|
| 670 | name02 text, |
|---|
| 671 | kana01 text, |
|---|
| 672 | kana02 text, |
|---|
| 673 | zip01 text, |
|---|
| 674 | zip02 text, |
|---|
| 675 | pref text, |
|---|
| 676 | addr01 text, |
|---|
| 677 | addr02 text, |
|---|
| 678 | tel01 text, |
|---|
| 679 | tel02 text, |
|---|
| 680 | tel03 text |
|---|
| 681 | ); |
|---|
| 682 | |
|---|
| 683 | CREATE TABLE dtb_order_detail ( |
|---|
| 684 | order_id int NOT NULL, |
|---|
| 685 | product_id int NOT NULL, |
|---|
| 686 | classcategory_id1 int NOT NULL, |
|---|
| 687 | classcategory_id2 int NOT NULL, |
|---|
| 688 | product_name text NOT NULL, |
|---|
| 689 | product_code text, |
|---|
| 690 | classcategory_name1 text, |
|---|
| 691 | classcategory_name2 text, |
|---|
| 692 | price numeric, |
|---|
| 693 | quantity numeric, |
|---|
| 694 | point_rate numeric |
|---|
| 695 | ); |
|---|
| 696 | |
|---|
| 697 | CREATE TABLE mtb_pref ( |
|---|
| 698 | pref_id smallint NOT NULL, |
|---|
| 699 | pref_name text, |
|---|
| 700 | rank smallint NOT NULL DEFAULT 0 |
|---|
| 701 | ); |
|---|
| 702 | |
|---|
| 703 | CREATE TABLE dtb_member ( |
|---|
| 704 | member_id int auto_increment primary key NOT NULL, |
|---|
| 705 | name text, |
|---|
| 706 | department text, |
|---|
| 707 | login_id text NOT NULL, |
|---|
| 708 | password text NOT NULL, |
|---|
| 709 | authority smallint NOT NULL, |
|---|
| 710 | rank int NOT NULL DEFAULT 0, |
|---|
| 711 | work smallint NOT NULL DEFAULT 1, |
|---|
| 712 | del_flg smallint NOT NULL DEFAULT 0, |
|---|
| 713 | creator_id int NOT NULL, |
|---|
| 714 | update_date datetime, |
|---|
| 715 | create_date datetime NOT NULL , |
|---|
| 716 | login_date datetime |
|---|
| 717 | ); |
|---|
| 718 | |
|---|
| 719 | CREATE TABLE dtb_question ( |
|---|
| 720 | question_id int auto_increment primary key NOT NULL, |
|---|
| 721 | question_name text, |
|---|
| 722 | question text, |
|---|
| 723 | create_date datetime NOT NULL , |
|---|
| 724 | del_flg smallint NOT NULL DEFAULT 0 |
|---|
| 725 | ); |
|---|
| 726 | |
|---|
| 727 | CREATE TABLE dtb_question_result ( |
|---|
| 728 | result_id int auto_increment primary key NOT NULL, |
|---|
| 729 | question_id int NOT NULL, |
|---|
| 730 | question_date datetime, |
|---|
| 731 | question_name text, |
|---|
| 732 | name01 text, |
|---|
| 733 | name02 text, |
|---|
| 734 | kana01 text, |
|---|
| 735 | kana02 text, |
|---|
| 736 | zip01 text, |
|---|
| 737 | zip02 text, |
|---|
| 738 | pref smallint, |
|---|
| 739 | addr01 text, |
|---|
| 740 | addr02 text, |
|---|
| 741 | tel01 text, |
|---|
| 742 | tel02 text, |
|---|
| 743 | tel03 text, |
|---|
| 744 | mail01 text, |
|---|
| 745 | question01 text, |
|---|
| 746 | question02 text, |
|---|
| 747 | question03 text, |
|---|
| 748 | question04 text, |
|---|
| 749 | question05 text, |
|---|
| 750 | question06 text, |
|---|
| 751 | create_date datetime NOT NULL , |
|---|
| 752 | del_flg smallint NOT NULL DEFAULT 0 |
|---|
| 753 | ); |
|---|
| 754 | |
|---|
| 755 | CREATE TABLE dtb_bat_relate_products ( |
|---|
| 756 | product_id int, |
|---|
| 757 | relate_product_id int, |
|---|
| 758 | customer_id int, |
|---|
| 759 | create_date datetime |
|---|
| 760 | ); |
|---|
| 761 | |
|---|
| 762 | CREATE TABLE dtb_campaign ( |
|---|
| 763 | campaign_id int auto_increment primary key NOT NULL, |
|---|
| 764 | campaign_name text, |
|---|
| 765 | campaign_point_rate numeric NOT NULL, |
|---|
| 766 | campaign_point_type smallint, |
|---|
| 767 | start_date datetime NOT NULL, |
|---|
| 768 | end_date datetime NOT NULL, |
|---|
| 769 | search_condition text, |
|---|
| 770 | del_flg smallint NOT NULL DEFAULT 0, |
|---|
| 771 | create_date datetime NOT NULL, |
|---|
| 772 | update_date datetime NOT NULL |
|---|
| 773 | ); |
|---|
| 774 | |
|---|
| 775 | CREATE TABLE dtb_campaign_detail ( |
|---|
| 776 | campaign_id int NOT NULL, |
|---|
| 777 | product_id int NOT NULL, |
|---|
| 778 | campaign_point_rate numeric NOT NULL |
|---|
| 779 | ); |
|---|
| 780 | |
|---|
| 781 | CREATE TABLE dtb_pagelayout ( |
|---|
| 782 | page_id int auto_increment primary key NOT NULL, |
|---|
| 783 | page_name text, |
|---|
| 784 | url text NOT NULL, |
|---|
| 785 | php_dir text, |
|---|
| 786 | tpl_dir text, |
|---|
| 787 | filename text, |
|---|
| 788 | header_chk smallint DEFAULT 1, |
|---|
| 789 | footer_chk smallint DEFAULT 1, |
|---|
| 790 | edit_flg smallint DEFAULT 1, |
|---|
| 791 | author text, |
|---|
| 792 | description text, |
|---|
| 793 | keyword text, |
|---|
| 794 | update_url text, |
|---|
| 795 | create_date datetime NOT NULL , |
|---|
| 796 | update_date datetime NOT NULL |
|---|
| 797 | ); |
|---|
| 798 | |
|---|
| 799 | CREATE TABLE dtb_bloc ( |
|---|
| 800 | bloc_id int auto_increment primary key NOT NULL, |
|---|
| 801 | bloc_name text, |
|---|
| 802 | tpl_path text, |
|---|
| 803 | filename varchar(50) NOT NULL UNIQUE, |
|---|
| 804 | create_date datetime NOT NULL , |
|---|
| 805 | update_date datetime NOT NULL , |
|---|
| 806 | php_path text, |
|---|
| 807 | del_flg smallint NOT NULL DEFAULT 0 |
|---|
| 808 | ); |
|---|
| 809 | |
|---|
| 810 | CREATE TABLE dtb_blocposition ( |
|---|
| 811 | page_id int NOT NULL, |
|---|
| 812 | target_id int, |
|---|
| 813 | bloc_id int, |
|---|
| 814 | bloc_row int, |
|---|
| 815 | filename text |
|---|
| 816 | ); |
|---|
| 817 | |
|---|
| 818 | CREATE TABLE dtb_csv ( |
|---|
| 819 | no int auto_increment primary key, |
|---|
| 820 | csv_id int NOT NULL, |
|---|
| 821 | col text, |
|---|
| 822 | disp_name text, |
|---|
| 823 | rank int, |
|---|
| 824 | status smallint NOT NULL DEFAULT 1, |
|---|
| 825 | create_date datetime NOT NULL , |
|---|
| 826 | update_date datetime NOT NULL |
|---|
| 827 | ); |
|---|
| 828 | |
|---|
| 829 | CREATE TABLE dtb_csv_sql ( |
|---|
| 830 | sql_id int auto_increment primary key, |
|---|
| 831 | name text NOT NULL, |
|---|
| 832 | sql text, |
|---|
| 833 | update_date datetime NOT NULL , |
|---|
| 834 | create_date datetime NOT NULL |
|---|
| 835 | ); |
|---|
| 836 | |
|---|
| 837 | CREATE TABLE dtb_user_regist ( |
|---|
| 838 | user_id int auto_increment primary key NOT NULL, |
|---|
| 839 | org_name text, |
|---|
| 840 | post_name text, |
|---|
| 841 | name01 text, |
|---|
| 842 | name02 text, |
|---|
| 843 | kana01 text, |
|---|
| 844 | kana02 text, |
|---|
| 845 | email text NOT NULL, |
|---|
| 846 | url text, |
|---|
| 847 | note text, |
|---|
| 848 | secret_key varchar(50) NOT NULL UNIQUE, |
|---|
| 849 | status smallint NOT NULL, |
|---|
| 850 | del_flg smallint DEFAULT 0, |
|---|
| 851 | create_date datetime NOT NULL, |
|---|
| 852 | update_date datetime NOT NULL |
|---|
| 853 | ); |
|---|
| 854 | |
|---|
| 855 | create table dtb_templates |
|---|
| 856 | ( |
|---|
| 857 | template_code varchar(50) NOT NULL UNIQUE , |
|---|
| 858 | template_name text , |
|---|
| 859 | create_date datetime NOT NULL , |
|---|
| 860 | update_date datetime NOT NULL |
|---|
| 861 | ); |
|---|
| 862 | |
|---|
| 863 | create table dtb_table_comment |
|---|
| 864 | ( |
|---|
| 865 | id int auto_increment primary key, |
|---|
| 866 | table_name text, |
|---|
| 867 | column_name text, |
|---|
| 868 | description text |
|---|
| 869 | ); |
|---|