Guest User

Untitled

a guest
Jan 18th, 2018
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 31.25 KB | None | 0 0
  1. CREATE TEMPORARY TABLESPACE DB_TEMP
  2. TEMPFILE 'C:\app\DB_TEMP.DBF'
  3. SIZE 32M
  4. AUTOEXTEND ON
  5. NEXT 32M MAXSIZE UNLIMITED
  6. EXTENT MANAGEMENT LOCAL;
  7.  
  8. CREATE TABLESPACE DB_DATA
  9. LOGGING
  10. DATAFILE 'C:\app\DB_DATA.DBF'
  11. SIZE 32M
  12. AUTOEXTEND ON
  13. NEXT 32M MAXSIZE UNLIMITED
  14. EXTENT MANAGEMENT LOCAL;
  15.  
  16. CREATE USER prize IDENTIFIED BY db123
  17. ACCOUNT UNLOCK
  18. DEFAULT TABLESPACE DB_DATA
  19. TEMPORARY TABLESPACE DB_TEMP;
  20.  
  21. GRANT CONNECT, RESOURCE, DBA TO prize;
  22.  
  23.  
  24.  
  25.  
  26. prompt PL/SQL Developer import file
  27. prompt Created on 2017年11月28日 by Steven
  28. set feedback off
  29. set define off
  30. prompt Creating TBL_ACTION_LOGS...
  31. create table TBL_ACTION_LOGS
  32. (
  33. id VARCHAR2(36) not null,
  34. boss_code VARCHAR2(255),
  35. agent_code VARCHAR2(255),
  36. platform_code VARCHAR2(255),
  37. log_type VARCHAR2(50),
  38. log_operate VARCHAR2(100),
  39. log_method VARCHAR2(100),
  40. log_ip VARCHAR2(20),
  41. create_time DATE,
  42. log_info VARCHAR2(2000)
  43. )
  44. ;
  45. create index ACTIONLOGS_AGENT_CODE on TBL_ACTION_LOGS (AGENT_CODE);
  46. create index ACTIONLOGS_LOG_METHOD on TBL_ACTION_LOGS (LOG_METHOD);
  47. create index ACTIONLOGS_LOG_OPERATE on TBL_ACTION_LOGS (LOG_OPERATE);
  48. create index ACTIONLOGS_PLATFORM_CODE on TBL_ACTION_LOGS (PLATFORM_CODE);
  49. alter table TBL_ACTION_LOGS
  50. add primary key (ID);
  51.  
  52. prompt Creating TBL_BONUS...
  53. create table TBL_BONUS
  54. (
  55. id VARCHAR2(36) not null,
  56. game_number VARCHAR2(36),
  57. game_code VARCHAR2(100),
  58. boss_code VARCHAR2(255),
  59. agent_code VARCHAR2(255),
  60. platform_code VARCHAR2(255),
  61. uname VARCHAR2(100),
  62. bonus_nums NUMBER(6),
  63. remain_nums NUMBER(6),
  64. currency VARCHAR2(8),
  65. bet_price NUMBER(16,3),
  66. bet_lines NUMBER(6),
  67. base_wins NUMBER(16,3),
  68. bonus_wins NUMBER(16,3),
  69. extra VARCHAR2(200),
  70. ver NUMBER(16),
  71. create_time DATE,
  72. update_time DATE
  73. )
  74. ;
  75. create index BONUS_AGENT_CODE on TBL_BONUS (AGENT_CODE);
  76. create index BONUS_CREATE_TIME on TBL_BONUS (CREATE_TIME);
  77. create index BONUS_GAME_CODE on TBL_BONUS (GAME_CODE);
  78. create index BONUS_GAME_NUMBER on TBL_BONUS (GAME_NUMBER);
  79. create index BONUS_PLATFORM_CODE on TBL_BONUS (PLATFORM_CODE);
  80. create index BONUS_UNAME on TBL_BONUS (UNAME);
  81. create index BONUS_UPDATE_TIME on TBL_BONUS (UPDATE_TIME);
  82. alter table TBL_BONUS
  83. add constraint BONUS_ID primary key (ID);
  84.  
  85. prompt Creating TBL_CODES...
  86. create table TBL_CODES
  87. (
  88. id VARCHAR2(36) not null,
  89. boss_code VARCHAR2(255),
  90. agent_code VARCHAR2(255),
  91. platform_code VARCHAR2(255),
  92. credit NUMBER(16,3) default 0,
  93. business_rate NUMBER(8,3),
  94. business_currency VARCHAR2(20),
  95. xs NUMBER(8,4) default 1,
  96. user_allow_ip VARCHAR2(4000),
  97. remark VARCHAR2(255),
  98. ver NUMBER(16) default 0
  99. )
  100. ;
  101. create index CODES_AGENT on TBL_CODES (AGENT_CODE);
  102. create index CODES_PLATFORM on TBL_CODES (PLATFORM_CODE);
  103. alter table TBL_CODES
  104. add constraint CODES_ID primary key (ID);
  105.  
  106. prompt Creating TBL_CONFIG...
  107. create table TBL_CONFIG
  108. (
  109. id VARCHAR2(36) not null,
  110. type_no VARCHAR2(100),
  111. item_key VARCHAR2(100),
  112. item_value VARCHAR2(255),
  113. cfg_status VARCHAR2(10),
  114. notes VARCHAR2(100),
  115. cfg_order NUMBER(8)
  116. )
  117. ;
  118. create index CONFIG_ITEM_KEY on TBL_CONFIG (ITEM_KEY);
  119. create index CONFIG_TYPE_NO on TBL_CONFIG (TYPE_NO);
  120. alter table TBL_CONFIG
  121. add constraint CONFIG_ID primary key (ID);
  122.  
  123. prompt Creating TBL_CREDIT_LOGS...
  124. create table TBL_CREDIT_LOGS
  125. (
  126. id VARCHAR2(36) not null,
  127. boss_code VARCHAR2(255),
  128. agent_code VARCHAR2(255),
  129. platform_code VARCHAR2(255),
  130. log_operate VARCHAR2(100),
  131. credit_before NUMBER(16,3),
  132. credit_after NUMBER(16,3),
  133. credit_remit NUMBER(16,3),
  134. bills_m NUMBER(16,3),
  135. currency VARCHAR2(8),
  136. notes VARCHAR2(200),
  137. data_time DATE,
  138. create_time DATE
  139. )
  140. ;
  141. create index TCL_AGENT_CODE on TBL_CREDIT_LOGS (AGENT_CODE);
  142. create index TCL_CREATE_TIME on TBL_CREDIT_LOGS (CREATE_TIME);
  143. create index TCL_DATA_TIME on TBL_CREDIT_LOGS (DATA_TIME);
  144. create index TCL_LOG_OPERATE on TBL_CREDIT_LOGS (LOG_OPERATE);
  145. create index TCL_PLATFORM_CODE on TBL_CREDIT_LOGS (PLATFORM_CODE);
  146. alter table TBL_CREDIT_LOGS
  147. add constraint TCL_ID primary key (ID);
  148.  
  149. prompt Creating TBL_DRAGON_JACKPOT...
  150. create table TBL_DRAGON_JACKPOT
  151. (
  152. id VARCHAR2(36) not null,
  153. game_number VARCHAR2(36),
  154. game_code VARCHAR2(100),
  155. boss_code VARCHAR2(255),
  156. agent_code VARCHAR2(255),
  157. platform_code VARCHAR2(255),
  158. uname VARCHAR2(100),
  159. jptype VARCHAR2(50),
  160. which NUMBER(2),
  161. jp0 NUMBER(16,6),
  162. jp1 NUMBER(16,6),
  163. jp2 NUMBER(16,6),
  164. jp3 NUMBER(16,6),
  165. currency VARCHAR2(8),
  166. bet_price NUMBER(16,3),
  167. bet_lines NUMBER(6),
  168. base_wins NUMBER(16,3),
  169. jp_wins NUMBER(16,3),
  170. extra VARCHAR2(200),
  171. ver NUMBER(16),
  172. create_time DATE,
  173. update_time DATE
  174. )
  175. ;
  176. create index TDJ_AGENT_CODE on TBL_DRAGON_JACKPOT (AGENT_CODE);
  177. create index TDJ_CREATE_TIME on TBL_DRAGON_JACKPOT (CREATE_TIME);
  178. create index TDJ_GAME_CODE on TBL_DRAGON_JACKPOT (GAME_CODE);
  179. create index TDJ_GAME_NUMBER on TBL_DRAGON_JACKPOT (GAME_NUMBER);
  180. create index TDJ_JPTYPE on TBL_DRAGON_JACKPOT (JPTYPE);
  181. create index TDJ_PLATFORM_CODE on TBL_DRAGON_JACKPOT (PLATFORM_CODE);
  182. create index TDJ_UNAME on TBL_DRAGON_JACKPOT (UNAME);
  183. create index TDJ_UPDATE_TIME on TBL_DRAGON_JACKPOT (UPDATE_TIME);
  184. alter table TBL_DRAGON_JACKPOT
  185. add constraint TDJ_ID primary key (ID);
  186.  
  187. prompt Creating TBL_FREES_CONFIG...
  188. create table TBL_FREES_CONFIG
  189. (
  190. id VARCHAR2(36) not null,
  191. cname VARCHAR2(100),
  192. start_time DATE,
  193. end_time DATE,
  194. boss_code VARCHAR2(255),
  195. agent_code VARCHAR2(255),
  196. platform_code VARCHAR2(255),
  197. require_bets_start NUMBER(16,3),
  198. require_bets_end NUMBER(16,3),
  199. require_winorloses_start NUMBER(16,3),
  200. require_winorloses_end NUMBER(16,3),
  201. require_games VARCHAR2(2000),
  202. require_currency VARCHAR2(8),
  203. coupons_game VARCHAR2(100),
  204. coupons_nums NUMBER(8),
  205. coupons_mul NUMBER(8),
  206. coupons_bets NUMBER(16,3),
  207. coupons_lines NUMBER(8),
  208. valid_hours NUMBER(8),
  209. is_executed VARCHAR2(10),
  210. is_enable VARCHAR2(10),
  211. create_time DATE,
  212. update_time DATE
  213. )
  214. ;
  215. comment on column TBL_FREES_CONFIG.is_executed
  216. is '是否已经执行(no,ing,yes)';
  217. comment on column TBL_FREES_CONFIG.is_enable
  218. is '是否可用(no,yes)';
  219. create index TFC_AGENT_CODE on TBL_FREES_CONFIG (AGENT_CODE);
  220. create index TFC_CREATE_TIME on TBL_FREES_CONFIG (CREATE_TIME);
  221. create index TFC_PLATFORM_CODE on TBL_FREES_CONFIG (PLATFORM_CODE);
  222. alter table TBL_FREES_CONFIG
  223. add constraint TFC_ID primary key (ID);
  224.  
  225. prompt Creating TBL_FREES_DETAILS...
  226. create table TBL_FREES_DETAILS
  227. (
  228. id VARCHAR2(36) not null,
  229. config_id VARCHAR2(36),
  230. game_code VARCHAR2(100),
  231. boss_code VARCHAR2(255),
  232. agent_code VARCHAR2(255),
  233. platform_code VARCHAR2(255),
  234. uname VARCHAR2(100),
  235. require_bets NUMBER(16,3),
  236. require_winorloses NUMBER(16,3),
  237. currency VARCHAR2(8),
  238. fd_status VARCHAR2(10),
  239. bet_price NUMBER(16,3),
  240. bet_lines NUMBER(8),
  241. free_nums NUMBER(8),
  242. free_mul NUMBER(8),
  243. remain_nums NUMBER(8),
  244. free_wins NUMBER(16,3),
  245. valid_hours NUMBER(8),
  246. ver NUMBER(16),
  247. create_time DATE,
  248. update_time DATE
  249. )
  250. ;
  251. create index TFD_AGENT_CODE on TBL_FREES_DETAILS (AGENT_CODE);
  252. create index TFD_CREATE_TIME on TBL_FREES_DETAILS (CREATE_TIME);
  253. create index TFD_GAME_CODE on TBL_FREES_DETAILS (GAME_CODE);
  254. create index TFD_PLATFORM_CODE on TBL_FREES_DETAILS (PLATFORM_CODE);
  255. create index TFD_UNAME on TBL_FREES_DETAILS (UNAME);
  256. alter table TBL_FREES_DETAILS
  257. add constraint TFD_ID primary key (ID);
  258.  
  259. prompt Creating TBL_FREE_GAMES...
  260. create table TBL_FREE_GAMES
  261. (
  262. id VARCHAR2(36) not null,
  263. game_number VARCHAR2(36),
  264. game_code VARCHAR2(100),
  265. boss_code VARCHAR2(255),
  266. agent_code VARCHAR2(255),
  267. platform_code VARCHAR2(255),
  268. uname VARCHAR2(100),
  269. father_id VARCHAR2(36),
  270. free_nums NUMBER(6),
  271. free_mul NUMBER(6),
  272. remain_nums NUMBER(6),
  273. currency VARCHAR2(8),
  274. bet_price NUMBER(16,3),
  275. bet_lines NUMBER(6),
  276. base_wins NUMBER(16,3),
  277. free_wins NUMBER(16,3),
  278. extra VARCHAR2(200),
  279. ver NUMBER(16),
  280. create_time DATE,
  281. update_time DATE
  282. )
  283. ;
  284. create index FG_AGENT_CODE on TBL_FREE_GAMES (AGENT_CODE);
  285. create index FG_CREATE_TIME on TBL_FREE_GAMES (CREATE_TIME);
  286. create index FG_FATHER_ID on TBL_FREE_GAMES (FATHER_ID);
  287. create index FG_GAME_CODE on TBL_FREE_GAMES (GAME_CODE);
  288. create index FG_GAME_NUMBER on TBL_FREE_GAMES (GAME_NUMBER);
  289. create index FG_PLATFORM_CODE on TBL_FREE_GAMES (PLATFORM_CODE);
  290. create index FG_UNAME on TBL_FREE_GAMES (UNAME);
  291. create index FG_UPDATE_TIME on TBL_FREE_GAMES (UPDATE_TIME);
  292. alter table TBL_FREE_GAMES
  293. add constraint FG_ID primary key (ID);
  294.  
  295. prompt Creating TBL_FRIENDS...
  296. create table TBL_FRIENDS
  297. (
  298. id VARCHAR2(36) not null,
  299. user_id VARCHAR2(36),
  300. friend_id VARCHAR2(36),
  301. section_id VARCHAR2(36),
  302. fsort NUMBER(8)
  303. )
  304. ;
  305. create index TF_USER_ID on TBL_FRIENDS (USER_ID);
  306. alter table TBL_FRIENDS
  307. add constraint TF_ID primary key (ID);
  308.  
  309. prompt Creating TBL_GAMES...
  310. create table TBL_GAMES
  311. (
  312. id VARCHAR2(36) not null,
  313. boss_code VARCHAR2(255),
  314. agent_code VARCHAR2(255),
  315. platform_code VARCHAR2(255),
  316. game_code VARCHAR2(100),
  317. game_type VARCHAR2(100),
  318. game_status VARCHAR2(10),
  319. game_names VARCHAR2(1000),
  320. game_url VARCHAR2(255),
  321. game_category VARCHAR2(255),
  322. game_sorts VARCHAR2(100),
  323. producer VARCHAR2(50)
  324. )
  325. ;
  326. create index TG_GAME_CODE on TBL_GAMES (GAME_CODE);
  327. create unique index TG_PG on TBL_GAMES (PLATFORM_CODE, GAME_CODE);
  328. alter table TBL_GAMES
  329. add constraint TG_ID primary key (ID);
  330.  
  331. prompt Creating TBL_GAMES_LINEBETS...
  332. create table TBL_GAMES_LINEBETS
  333. (
  334. id VARCHAR2(36) not null,
  335. boss_code VARCHAR2(255),
  336. agent_code VARCHAR2(255),
  337. platform_code VARCHAR2(255),
  338. game_code VARCHAR2(100),
  339. line_bets_json VARCHAR2(2000)
  340. )
  341. ;
  342. create index TGL_GAME_CODE on TBL_GAMES_LINEBETS (GAME_CODE);
  343. create unique index TGL_PG on TBL_GAMES_LINEBETS (PLATFORM_CODE, GAME_CODE);
  344. alter table TBL_GAMES_LINEBETS
  345. add constraint TGL_ID primary key (ID);
  346.  
  347. prompt Creating TBL_GAMES_SET...
  348. create table TBL_GAMES_SET
  349. (
  350. id VARCHAR2(36) not null,
  351. boss_code VARCHAR2(255),
  352. agent_code VARCHAR2(255),
  353. platform_code VARCHAR2(255),
  354. game_code VARCHAR2(100),
  355. game_languages VARCHAR2(100),
  356. game_lines NUMBER(3),
  357. line_bets VARCHAR2(1000),
  358. jp_rate NUMBER(16,3),
  359. limit_wins NUMBER(16,3),
  360. switchs VARCHAR2(50)
  361. )
  362. ;
  363. create index TGS_GAME_CODE on TBL_GAMES_SET (GAME_CODE);
  364. create unique index TGS_PG on TBL_GAMES_SET (PLATFORM_CODE, GAME_CODE);
  365. alter table TBL_GAMES_SET
  366. add constraint TGS_ID primary key (ID);
  367.  
  368. prompt Creating TBL_GROUPS...
  369. create table TBL_GROUPS
  370. (
  371. id VARCHAR2(36) not null,
  372. gname VARCHAR2(100),
  373. image VARCHAR2(500),
  374. creator_id VARCHAR2(36),
  375. create_time DATE
  376. )
  377. ;
  378. create index TG_CREATE_TIME on TBL_GROUPS (CREATE_TIME);
  379. alter table TBL_GROUPS
  380. add constraint GROUPS_ID primary key (ID);
  381.  
  382. prompt Creating TBL_JOIN_INFO...
  383. create table TBL_JOIN_INFO
  384. (
  385. id VARCHAR2(36) not null,
  386. periods_id VARCHAR2(36),
  387. product_id VARCHAR2(36),
  388. bets_id VARCHAR2(36) not null,
  389. boss_code VARCHAR2(255),
  390. agent_code VARCHAR2(255),
  391. platform_code VARCHAR2(255),
  392. player_name VARCHAR2(100),
  393. nickname VARCHAR2(100),
  394. bets_timestamp TIMESTAMP(3),
  395. time_num NUMBER(10),
  396. create_time DATE
  397. )
  398. ;
  399. create index BETS_TIMESTAMP on TBL_JOIN_INFO (BETS_TIMESTAMP);
  400. create index JOIN_PERIODS_ID on TBL_JOIN_INFO (PERIODS_ID);
  401. alter table TBL_JOIN_INFO
  402. add constraint JOIN_ID primary key (ID);
  403.  
  404. prompt Creating TBL_LOTTERY...
  405. create table TBL_LOTTERY
  406. (
  407. id NUMBER(19) not null,
  408. issue VARCHAR2(50),
  409. lottery_time VARCHAR2(50),
  410. lottery_num VARCHAR2(50),
  411. numb VARCHAR2(50),
  412. create_time DATE
  413. )
  414. ;
  415. create index LOTTERY_CREATE_TIME on TBL_LOTTERY (CREATE_TIME);
  416. alter table TBL_LOTTERY
  417. add constraint LOTTERY_ID primary key (ID);
  418. alter table TBL_LOTTERY
  419. add constraint LOTTERY_ISSUE unique (ISSUE);
  420.  
  421. prompt Creating TBL_MENUS...
  422. create table TBL_MENUS
  423. (
  424. id VARCHAR2(36) not null,
  425. menu_name VARCHAR2(50),
  426. menu_key VARCHAR2(50),
  427. menu_action VARCHAR2(255),
  428. menu_root VARCHAR2(10),
  429. menu_show VARCHAR2(10),
  430. menu_order NUMBER(8),
  431. menu_images VARCHAR2(100),
  432. menu_info VARCHAR2(100),
  433. parent_id NUMBER(19)
  434. )
  435. ;
  436. create index MENUS_ORDER on TBL_MENUS (MENU_ORDER);
  437. alter table TBL_MENUS
  438. add constraint MENUS_ID primary key (ID);
  439.  
  440. prompt Creating TBL_NOTICE...
  441. create table TBL_NOTICE
  442. (
  443. id VARCHAR2(36) not null,
  444. boss_code VARCHAR2(255),
  445. agent_code VARCHAR2(255),
  446. platform_code VARCHAR2(255),
  447. notice_title VARCHAR2(100),
  448. notice_content VARCHAR2(1000),
  449. create_time DATE,
  450. update_time DATE,
  451. notes VARCHAR2(500),
  452. notice_status VARCHAR2(10)
  453. )
  454. ;
  455. create index NOTICE_AGENT on TBL_NOTICE (AGENT_CODE);
  456. create index NOTICE_PLATFORM on TBL_NOTICE (PLATFORM_CODE);
  457. create index NOTICE_UPDATE_TIME on TBL_NOTICE (UPDATE_TIME);
  458. alter table TBL_NOTICE
  459. add constraint NOTICE_ID primary key (ID);
  460.  
  461. prompt Creating TBL_PERIODS...
  462. create table TBL_PERIODS
  463. (
  464. id VARCHAR2(36) not null,
  465. periods_id VARCHAR2(36),
  466. product_id VARCHAR2(36),
  467. boss_code VARCHAR2(255),
  468. agent_code VARCHAR2(255),
  469. platform_code VARCHAR2(255),
  470. product_name VARCHAR2(255),
  471. img_url VARCHAR2(500),
  472. descriptions VARCHAR2(2000),
  473. product_type VARCHAR2(100),
  474. price NUMBER(16,3),
  475. fee NUMBER(16,3),
  476. category VARCHAR2(100),
  477. sorts VARCHAR2(100),
  478. extra VARCHAR2(500),
  479. totals NUMBER(16,3),
  480. remains NUMBER(16,3),
  481. numa VARCHAR2(50),
  482. lottery_start VARCHAR2(50),
  483. lottery_end VARCHAR2(50),
  484. numb VARCHAR2(50),
  485. win_number VARCHAR2(50),
  486. win_player VARCHAR2(100),
  487. win_nickname VARCHAR2(100),
  488. create_time DATE,
  489. update_time DATE,
  490. ver NUMBER(16)
  491. )
  492. ;
  493. create index PERIODS_AGENT_CODE on TBL_PERIODS (AGENT_CODE);
  494. create index PERIODS_PID on TBL_PERIODS (PERIODS_ID);
  495. create index PERIODS_PLATFORM_CODE on TBL_PERIODS (PLATFORM_CODE);
  496. create index PERIODS_PRODUCT_ID on TBL_PERIODS (PRODUCT_ID);
  497. create index PERIODS_UPDATE_TIME on TBL_PERIODS (UPDATE_TIME);
  498. alter table TBL_PERIODS
  499. add constraint PERIODS_ID primary key (ID);
  500.  
  501. prompt Creating TBL_PLAYERS...
  502. create table TBL_PLAYERS
  503. (
  504. id VARCHAR2(36) not null,
  505. boss_code VARCHAR2(255),
  506. agent_code VARCHAR2(255),
  507. platform_code VARCHAR2(255),
  508. player_name VARCHAR2(100),
  509. player_pwd VARCHAR2(100),
  510. nickname VARCHAR2(100),
  511. player_price NUMBER(16,3),
  512. player_status VARCHAR2(10),
  513. currency VARCHAR2(8),
  514. player_lvl NUMBER(8),
  515. player_exp NUMBER(16,3),
  516. create_ip VARCHAR2(50),
  517. create_time DATE,
  518. encode VARCHAR2(100),
  519. cashins NUMBER(16,3),
  520. cashouts NUMBER(16,3),
  521. betins NUMBER(16,3),
  522. betouts NUMBER(16,3),
  523. ver NUMBER(16)
  524. )
  525. partition by hash (ID)
  526. (
  527. partition PART_01
  528. tablespace DB_DATA,
  529. partition PART_02
  530. tablespace DB_DATA,
  531. partition PART_03
  532. tablespace DB_DATA,
  533. partition PART_04
  534. tablespace DB_DATA,
  535. partition PART_05
  536. tablespace DB_DATA,
  537. partition PART_06
  538. tablespace DB_DATA,
  539. partition PART_07
  540. tablespace DB_DATA,
  541. partition PART_08
  542. tablespace DB_DATA,
  543. partition PART_09
  544. tablespace DB_DATA,
  545. partition PART_10
  546. tablespace DB_DATA
  547. );
  548. create index TP_AGENT_CODE on TBL_PLAYERS (AGENT_CODE)
  549. local;
  550. create index TP_CREATE_TIME on TBL_PLAYERS (CREATE_TIME)
  551. local;
  552. create index TP_PLATFORM_CODE on TBL_PLAYERS (PLATFORM_CODE)
  553. local;
  554. create index TP_PLAYER_NAME on TBL_PLAYERS (PLAYER_NAME)
  555. local;
  556. alter table TBL_PLAYERS
  557. add primary key (ID);
  558.  
  559. prompt Creating TBL_PLAYERS_BETS...
  560. create table TBL_PLAYERS_BETS
  561. (
  562. id VARCHAR2(36) not null,
  563. boss_code VARCHAR2(255),
  564. agent_code VARCHAR2(255),
  565. platform_code VARCHAR2(255),
  566. player_name VARCHAR2(100),
  567. nickname VARCHAR2(100),
  568. game_code VARCHAR2(100),
  569. game_type VARCHAR2(100),
  570. parent_ids VARCHAR2(255),
  571. periods_id VARCHAR2(36),
  572. product_id VARCHAR2(36),
  573. bet_in NUMBER(16,3),
  574. bet_out NUMBER(16,3),
  575. bet_lines NUMBER(6),
  576. winorloses NUMBER(16,3),
  577. bet_mul NUMBER(16,3),
  578. credit_before NUMBER(16,3),
  579. credit_after NUMBER(16,3),
  580. credit_remit NUMBER(16,3),
  581. bet_data VARCHAR2(255),
  582. bet_info VARCHAR2(4000),
  583. bet_status VARCHAR2(10),
  584. jpl VARCHAR2(10),
  585. is_complete VARCHAR2(10),
  586. currency VARCHAR2(8),
  587. free_coupons VARCHAR2(36),
  588. extra VARCHAR2(500),
  589. device VARCHAR2(100),
  590. bet_ip VARCHAR2(50),
  591. create_time DATE,
  592. create_timestamp TIMESTAMP(3)
  593. )
  594. partition by range (CREATE_TIME) interval (NUMTODSINTERVAL(1,'DAY'))
  595. (
  596. partition P20170919 values less than (TO_DATE(' 2017-09-19 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
  597. tablespace DB_DATA
  598. );
  599. create index TPB_AGENT_CODE on TBL_PLAYERS_BETS (AGENT_CODE)
  600. local;
  601. create index TPB_CREATE_TIME on TBL_PLAYERS_BETS (CREATE_TIME)
  602. local;
  603. create index TPB_CREATE_TIMESTAMP on TBL_PLAYERS_BETS (CREATE_TIMESTAMP)
  604. local;
  605. create index TPB_FREE_COUPONS on TBL_PLAYERS_BETS (FREE_COUPONS)
  606. local;
  607. create index TPB_GAME_CODE on TBL_PLAYERS_BETS (GAME_CODE)
  608. local;
  609. create index TPB_PERIODS_ID on TBL_PLAYERS_BETS (PERIODS_ID)
  610. local;
  611. create index TPB_PLATFORM_CODE on TBL_PLAYERS_BETS (PLATFORM_CODE)
  612. local;
  613. create index TPB_PLAYER_NAME on TBL_PLAYERS_BETS (PLAYER_NAME)
  614. local;
  615. create index TPB_PRODUCT_ID on TBL_PLAYERS_BETS (PRODUCT_ID)
  616. local;
  617. alter table TBL_PLAYERS_BETS
  618. add constraint TPB_ID primary key (ID);
  619.  
  620. prompt Creating TBL_PLAYERS_BETS_ERROR...
  621. create table TBL_PLAYERS_BETS_ERROR
  622. (
  623. id VARCHAR2(36) not null,
  624. boss_code VARCHAR2(255),
  625. agent_code VARCHAR2(255),
  626. platform_code VARCHAR2(255),
  627. player_name VARCHAR2(100),
  628. game_code VARCHAR2(100),
  629. game_type VARCHAR2(100),
  630. parent_ids VARCHAR2(255),
  631. bet_in NUMBER(16,3),
  632. bet_out NUMBER(16,3),
  633. bet_lines NUMBER(6),
  634. winorloses NUMBER(16,3),
  635. bet_mul NUMBER(16,3),
  636. bet_status VARCHAR2(10),
  637. notes VARCHAR2(500),
  638. process_status VARCHAR2(10),
  639. currency VARCHAR2(8),
  640. free_coupons VARCHAR2(36),
  641. bet_ip VARCHAR2(50),
  642. create_time DATE
  643. )
  644. ;
  645. alter table TBL_PLAYERS_BETS_ERROR
  646. add primary key (ID);
  647.  
  648. prompt Creating TBL_PLAYERS_REPORT...
  649. create table TBL_PLAYERS_REPORT
  650. (
  651. id VARCHAR2(36) not null,
  652. boss_code VARCHAR2(255),
  653. agent_code VARCHAR2(255),
  654. platform_code VARCHAR2(255),
  655. player_name VARCHAR2(100),
  656. game_code VARCHAR2(100),
  657. game_type VARCHAR2(100),
  658. bet_in NUMBER(16,3),
  659. bet_out NUMBER(16,3),
  660. winorloses NUMBER(16,3),
  661. bet_nums NUMBER(16),
  662. currency VARCHAR2(8),
  663. data_time DATE,
  664. update_time DATE
  665. )
  666. ;
  667. create index TPR_AGENT_CODE on TBL_PLAYERS_REPORT (AGENT_CODE);
  668. create index TPR_DATA_TIME on TBL_PLAYERS_REPORT (DATA_TIME);
  669. create index TPR_GAME_CODE on TBL_PLAYERS_REPORT (GAME_CODE);
  670. create index TPR_GAME_TYPE on TBL_PLAYERS_REPORT (GAME_TYPE);
  671. create index TPR_PLATFORM_CODE on TBL_PLAYERS_REPORT (PLATFORM_CODE);
  672. create index TPR_PLAYER_NAME on TBL_PLAYERS_REPORT (PLAYER_NAME);
  673. alter table TBL_PLAYERS_REPORT
  674. add primary key (ID);
  675.  
  676. prompt Creating TBL_PRODUCT...
  677. create table TBL_PRODUCT
  678. (
  679. id VARCHAR2(36) not null,
  680. boss_code VARCHAR2(255),
  681. agent_code VARCHAR2(255),
  682. platform_code VARCHAR2(255),
  683. product_name VARCHAR2(255),
  684. img_url VARCHAR2(500),
  685. descriptions VARCHAR2(2000),
  686. product_type VARCHAR2(100),
  687. price NUMBER(16,3),
  688. fee NUMBER(16,3),
  689. product_category VARCHAR2(100),
  690. sorts VARCHAR2(100),
  691. create_time DATE,
  692. update_time DATE,
  693. extra VARCHAR2(500)
  694. )
  695. ;
  696. create index PRODUCT_AGENT_CODE on TBL_PRODUCT (AGENT_CODE);
  697. create index PRODUCT_PLATFORM_CODE on TBL_PRODUCT (PLATFORM_CODE);
  698. create index PRODUCT_UPDATE_TIME on TBL_PRODUCT (UPDATE_TIME);
  699. alter table TBL_PRODUCT
  700. add constraint PRODUCT_ID primary key (ID);
  701.  
  702. prompt Creating TBL_ROLES...
  703. create table TBL_ROLES
  704. (
  705. id VARCHAR2(36) not null,
  706. boss_code VARCHAR2(255),
  707. agent_code VARCHAR2(255),
  708. platform_code VARCHAR2(255),
  709. role_code VARCHAR2(100),
  710. role_name VARCHAR2(100),
  711. notes VARCHAR2(500)
  712. )
  713. ;
  714. create index TR_AGENT_CODE on TBL_ROLES (AGENT_CODE);
  715. create index TR_PLATFORM_CODE on TBL_ROLES (PLATFORM_CODE);
  716. create index TR_ROLE_CODE on TBL_ROLES (ROLE_CODE);
  717. alter table TBL_ROLES
  718. add constraint TR_ID primary key (ID);
  719.  
  720. prompt Creating TBL_ROLES_MENUS...
  721. create table TBL_ROLES_MENUS
  722. (
  723. id VARCHAR2(36) not null,
  724. roles_id VARCHAR2(36),
  725. menus_id VARCHAR2(36)
  726. )
  727. ;
  728. create index TRM_ROLES_ID on TBL_ROLES_MENUS (ROLES_ID);
  729. alter table TBL_ROLES_MENUS
  730. add constraint TRM_ID primary key (ID);
  731.  
  732. prompt Creating TBL_SECTIONS...
  733. create table TBL_SECTIONS
  734. (
  735. id VARCHAR2(36) not null,
  736. user_id VARCHAR2(36),
  737. sname VARCHAR2(100),
  738. ssort NUMBER(8)
  739. )
  740. ;
  741. create index TS_USER_ID on TBL_SECTIONS (USER_ID);
  742. alter table TBL_SECTIONS
  743. add constraint TS_ID primary key (ID);
  744.  
  745. prompt Creating TBL_TICKET...
  746. create table TBL_TICKET
  747. (
  748. id VARCHAR2(36) not null,
  749. boss_code VARCHAR2(255),
  750. agent_code VARCHAR2(255),
  751. platform_code VARCHAR2(255),
  752. player_name VARCHAR2(100),
  753. bets_id VARCHAR2(36),
  754. periods_id VARCHAR2(36),
  755. ticket VARCHAR2(50),
  756. create_time DATE
  757. )
  758. ;
  759. create index TICKET_AGENT_CODE on TBL_TICKET (AGENT_CODE);
  760. create index TICKET_BETS_ID on TBL_TICKET (BETS_ID);
  761. create index TICKET_CREATE_TIME on TBL_TICKET (CREATE_TIME);
  762. create index TICKET_PERIODS_ID on TBL_TICKET (PERIODS_ID);
  763. create index TICKET_PID_TKT on TBL_TICKET (PERIODS_ID, TICKET);
  764. create index TICKET_PLATFORM_CODE on TBL_TICKET (PLATFORM_CODE);
  765. create index TICKET_PLAYER_NAME on TBL_TICKET (PLAYER_NAME);
  766. alter table TBL_TICKET
  767. add constraint TICKET_ID primary key (ID);
  768.  
  769. prompt Creating TBL_TRANSFER_LOGS...
  770. create table TBL_TRANSFER_LOGS
  771. (
  772. id VARCHAR2(36) not null,
  773. boss_code VARCHAR2(255),
  774. agent_code VARCHAR2(255),
  775. platform_code VARCHAR2(255),
  776. player_name VARCHAR2(100),
  777. transfer_type VARCHAR2(50),
  778. transfer_before NUMBER(16,3),
  779. transfer_after NUMBER(16,3),
  780. transfer_remit NUMBER(16,3),
  781. currency VARCHAR2(8),
  782. transfer_id VARCHAR2(100),
  783. transfer_info VARCHAR2(100),
  784. create_time DATE
  785. )
  786. ;
  787. create index TRANSFER_LOGS_AGENT_CODE on TBL_TRANSFER_LOGS (AGENT_CODE);
  788. create index TRANSFER_LOGS_CREATETIME on TBL_TRANSFER_LOGS (CREATE_TIME);
  789. create index TRANSFER_LOGS_PLATFORM_CODE on TBL_TRANSFER_LOGS (PLATFORM_CODE);
  790. create index TRANSFER_LOGS_PLAYER_NAME on TBL_TRANSFER_LOGS (PLAYER_NAME);
  791. create unique index TRANSFER_LOGS_TRANSFER_ID on TBL_TRANSFER_LOGS (TRANSFER_ID);
  792. create index TRANSFER_LOGS_TRANSFER_TYPE on TBL_TRANSFER_LOGS (TRANSFER_TYPE);
  793. alter table TBL_TRANSFER_LOGS
  794. add primary key (ID);
  795.  
  796. prompt Creating TBL_UNREADS...
  797. create table TBL_UNREADS
  798. (
  799. id VARCHAR2(36) not null,
  800. msg_from VARCHAR2(36),
  801. msg_to VARCHAR2(36),
  802. msg_content VARCHAR2(4000),
  803. msg_type VARCHAR2(50),
  804. create_time DATE,
  805. deal_time DATE
  806. )
  807. partition by range (CREATE_TIME) interval (NUMTODSINTERVAL(1,'DAY'))
  808. (
  809. partition P20170919 values less than (TO_DATE(' 2017-09-19 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
  810. tablespace DB_DATA
  811. );
  812. create index TU_CREATE_TIME on TBL_UNREADS (CREATE_TIME)
  813. local;
  814. create index TU_MSG_FROM on TBL_UNREADS (MSG_FROM)
  815. local;
  816. create index TU_MSG_TO on TBL_UNREADS (MSG_TO)
  817. local;
  818. create index TU_MSG_TYPE on TBL_UNREADS (MSG_TYPE)
  819. local;
  820. alter table TBL_UNREADS
  821. add constraint TU_ID primary key (ID);
  822.  
  823. prompt Creating TBL_USERS...
  824. create table TBL_USERS
  825. (
  826. id VARCHAR2(36) not null,
  827. user_name VARCHAR2(100),
  828. user_password VARCHAR2(100),
  829. boss_code VARCHAR2(255),
  830. agent_code VARCHAR2(255),
  831. platform_code VARCHAR2(255),
  832. user_type VARCHAR2(50),
  833. nickname VARCHAR2(100),
  834. image VARCHAR2(500),
  835. signature VARCHAR2(500),
  836. user_mail VARCHAR2(100),
  837. user_phone VARCHAR2(100),
  838. online_status VARCHAR2(10),
  839. user_status VARCHAR2(10),
  840. user_count_error NUMBER(2),
  841. user_create_ip VARCHAR2(50),
  842. user_create_time DATE,
  843. notes VARCHAR2(255)
  844. )
  845. ;
  846. create index USERS_AGENT on TBL_USERS (AGENT_CODE);
  847. create index USERS_PLATFORM on TBL_USERS (PLATFORM_CODE);
  848. alter table TBL_USERS
  849. add constraint USERS_ID primary key (ID);
  850. alter table TBL_USERS
  851. add constraint USERS_USER_NAME unique (USER_NAME);
  852.  
  853. prompt Creating TBL_USERS_API...
  854. create table TBL_USERS_API
  855. (
  856. id VARCHAR2(36) not null,
  857. boss_code VARCHAR2(255),
  858. agent_code VARCHAR2(255),
  859. platform_code VARCHAR2(255),
  860. business_key VARCHAR2(255),
  861. business_status VARCHAR2(10),
  862. business_allow_ip VARCHAR2(4000)
  863. )
  864. ;
  865. create index API_AGENT on TBL_USERS_API (AGENT_CODE);
  866. create index API_PLATFORM on TBL_USERS_API (PLATFORM_CODE);
  867. alter table TBL_USERS_API
  868. add constraint API_ID primary key (ID);
  869.  
  870. prompt Creating TBL_USERS_GROUPS...
  871. create table TBL_USERS_GROUPS
  872. (
  873. id VARCHAR2(36) not null,
  874. user_id VARCHAR2(36),
  875. group_id VARCHAR2(36),
  876. admin_chars VARCHAR2(500),
  877. ugsort NUMBER(8),
  878. create_time DATE
  879. )
  880. ;
  881. create index TUG_CREATE_TIME on TBL_USERS_GROUPS (CREATE_TIME);
  882. create index TUG_GROUP_ID on TBL_USERS_GROUPS (GROUP_ID);
  883. create index TUG_USER_ID on TBL_USERS_GROUPS (USER_ID);
  884. alter table TBL_USERS_GROUPS
  885. add constraint TUG_ID primary key (ID);
  886.  
  887. prompt Creating TBL_USERS_ROLES...
  888. create table TBL_USERS_ROLES
  889. (
  890. id VARCHAR2(36) not null,
  891. users_id VARCHAR2(36),
  892. roles_id VARCHAR2(36)
  893. )
  894. ;
  895. create index TUR_USERS_ID on TBL_USERS_ROLES (USERS_ID);
  896. alter table TBL_USERS_ROLES
  897. add constraint TUR_ID primary key (ID);
  898.  
  899. prompt Loading TBL_ACTION_LOGS...
  900. prompt Loading TBL_BONUS...
  901. prompt Table is empty
  902. prompt Loading TBL_CODES...
  903. insert into TBL_CODES (id, boss_code, agent_code, platform_code, credit, business_rate, business_currency, xs, user_allow_ip, remark, ver)
  904. values ('1', null, null, null, 0, 0, 'CNY', 1, '|127.0.0.1|', 'bz', 0);
  905. insert into TBL_CODES (id, boss_code, agent_code, platform_code, credit, business_rate, business_currency, xs, user_allow_ip, remark, ver)
  906. values ('2', 'DC', null, null, 0, .06, 'CNY', 1, '|127.0.0.1|10.211.55.2|', 'bz', 0);
  907. commit;
  908. prompt 2 records loaded
  909. prompt Loading TBL_CONFIG...
  910. insert into TBL_CONFIG (id, type_no, item_key, item_value, cfg_status, notes, cfg_order)
  911. values ('4', 'LOGIN_ERRS', 'USER', '5', 'enable', '登录密码错误最大允许次数', 1);
  912. insert into TBL_CONFIG (id, type_no, item_key, item_value, cfg_status, notes, cfg_order)
  913. values ('1', 'PAGE_SIZES', 'DEFAULT', '20,50,100,250,500', 'enable', '系统默认每页显示几条数据', 1);
  914. commit;
  915. prompt 5 records loaded
  916. prompt Loading TBL_CREDIT_LOGS...
  917. prompt Table is empty
  918. prompt Loading TBL_DRAGON_JACKPOT...
  919. prompt Table is empty
  920. prompt Loading TBL_FREES_CONFIG...
  921. prompt Table is empty
  922. prompt Loading TBL_FREES_DETAILS...
  923. prompt Table is empty
  924. prompt Loading TBL_FREE_GAMES...
  925. prompt Table is empty
  926. prompt Loading TBL_FRIENDS...
  927. prompt 2 records loaded
  928. prompt Loading TBL_GAMES...
  929. prompt Table is empty
  930. prompt Loading TBL_GAMES_LINEBETS...
  931. prompt Table is empty
  932. prompt Loading TBL_GAMES_SET...
  933. prompt Table is empty
  934. prompt Loading TBL_GROUPS...
  935. prompt 1 records loaded
  936. prompt Loading TBL_JOIN_INFO...
  937. prompt Table is empty
  938. prompt Loading TBL_LOTTERY...
  939. prompt 9 records loaded
  940. prompt Loading TBL_MENUS...
  941. insert into TBL_MENUS (id, menu_name, menu_key, menu_action, menu_root, menu_show, menu_order, menu_images, menu_info, parent_id)
  942. values ('3', '修改密码', 'user.m.pwd', '/user/updatePwd', 'SYS_SET', 'false', null, null, null, 2);
  943. insert into TBL_MENUS (id, menu_name, menu_key, menu_action, menu_root, menu_show, menu_order, menu_images, menu_info, parent_id)
  944. values ('1', '系统设置', 'root.sys.set', null, 'SYS_SET', 'true', 1, null, null, 0);
  945. insert into TBL_MENUS (id, menu_name, menu_key, menu_action, menu_root, menu_show, menu_order, menu_images, menu_info, parent_id)
  946. values ('2', '我的信息', 'user.my.info', '/user/index', 'SYS_SET', 'true', 1, null, null, 1);
  947. commit;
  948. prompt 3 records loaded
  949. prompt Loading TBL_NOTICE...
  950. prompt Table is empty
  951. prompt Loading TBL_PERIODS...
  952. prompt Table is empty
  953. prompt Loading TBL_PLAYERS...
  954. prompt Table is empty
  955. prompt Loading TBL_PLAYERS_BETS...
  956. prompt Table is empty
  957. prompt Loading TBL_PLAYERS_BETS_ERROR...
  958. prompt Table is empty
  959. prompt Loading TBL_PLAYERS_REPORT...
  960. prompt Table is empty
  961. prompt Loading TBL_PRODUCT...
  962. prompt Table is empty
  963. prompt Loading TBL_ROLES...
  964. insert into TBL_ROLES (id, boss_code, agent_code, platform_code, role_code, role_name, notes)
  965. values ('1', null, null, null, 'admin', '超级管理员', null);
  966. commit;
  967. prompt 1 records loaded
  968. prompt Loading TBL_ROLES_MENUS...
  969. insert into TBL_ROLES_MENUS (id, roles_id, menus_id)
  970. values ('2', '1', '2');
  971. insert into TBL_ROLES_MENUS (id, roles_id, menus_id)
  972. values ('3', '1', '3');
  973. insert into TBL_ROLES_MENUS (id, roles_id, menus_id)
  974. values ('1', '1', '1');
  975. commit;
  976. prompt 3 records loaded
  977. prompt Loading TBL_SECTIONS...
  978. prompt 1 records loaded
  979. prompt Loading TBL_TICKET...
  980. prompt Table is empty
  981. prompt Loading TBL_TRANSFER_LOGS...
  982. prompt Table is empty
  983. prompt Loading TBL_UNREADS...
  984. prompt Table is empty
  985. prompt Loading TBL_USERS...
  986. insert into TBL_USERS (id, user_name, user_password, boss_code, agent_code, platform_code, user_type, nickname, image, signature, user_mail, user_phone, online_status, user_status, user_count_error, user_create_ip, user_create_time, notes)
  987. values ('1', 'admin', '91a2cf48856437a75300d8443f3e0c11', null, null, null, '0', '超级管理员', '{"base":"USER","name":"me.jpg"}', '我的签名', null, null, 'online', 'enable', 0, '127.0.0.1', to_date('12-11-2017', 'dd-mm-yyyy'), 'bz');
  988. insert into TBL_USERS (id, user_name, user_password, boss_code, agent_code, platform_code, user_type, nickname, image, signature, user_mail, user_phone, online_status, user_status, user_count_error, user_create_ip, user_create_time, notes)
  989. values ('2', 'btroot', '76fa3806d19891b0a179b8c6c0be9c81', 'BT', null, null, '1', '总代', '{"base":"USER","name":"bt.jpg"}', '签签名', null, null, 'offline', 'enable', 0, '127.0.0.1', to_date('12-11-2017', 'dd-mm-yyyy'), 'bz');
  990. commit;
  991. prompt 2 records loaded
  992. prompt Loading TBL_USERS_API...
  993. prompt Table is empty
  994. prompt Loading TBL_USERS_GROUPS...
  995. prompt 2 records loaded
  996. prompt Loading TBL_USERS_ROLES...
  997. insert into TBL_USERS_ROLES (id, users_id, roles_id)
  998. values ('1', '1', '1');
  999. commit;
  1000. prompt 1 records loaded
  1001. set feedback on
  1002. set define on
  1003. prompt Done.
Add Comment
Please, Sign In to add comment