Created
June 17, 2016 08:26
-
-
Save booleguo/73bf46b68e0201714f3e9543c12f3fa3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create user 'newuser'@'localhost' identified by 'password'; | |
create database 'dbname' character set utf8; | |
grant all privileges on dbname.* to 'newuser'@'localhost'; | |
flush privileges; | |
create table TT_RESERVE_TEMPLATE | |
( | |
template_id BIGINT(20) AUTO_INCREMENT, | |
template_name VARCHAR(32) not null, | |
min_revenus_rate DECIMAL(15,2) not null, | |
max_revenus_rate DECIMAL(15,2) not null, | |
min_term INT(4) not null, | |
max_term INT(4) not null, | |
status VARCHAR(16) not null, | |
label_id VARCHAR(32) not null, | |
repay_mode VARCHAR(32) not null, | |
min_amount DECIMAL(15,2) not null, | |
max_amount DECIMAL(15,2) not null, | |
gmt_create TIMESTAMP not null, | |
gmt_modified TIMESTAMP not null, | |
PRIMARY KEY (template_id) | |
)ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; | |
create table TT_USER_RESERVE | |
( | |
RESERVE_ID VARCHAR(18) not null, | |
MEMBER_ID VARCHAR(32) not null, | |
TEMPLATE_ID BIGINT(20) not null, | |
MIN_REVENUS_RATE DECIMAL(15,2) not null, | |
MAX_REVENUS_RATE DECIMAL(15,2) not null, | |
MIN_TERM INT(4) not null, | |
MAX_TERM INT(4) not null, | |
STATUS VARCHAR(16) not null, | |
LABEL_ID VARCHAR(32) not null, | |
REPAY_MODE VARCHAR(32) not null, | |
RESERVE_AMOUNT DECIMAL(15,2) not null, | |
RESERVE_BALANCE DECIMAL(15,2) not null, | |
MENO VARCHAR(128) not null, | |
GMT_CREATE TIMESTAMP not null, | |
GMT_MODIFIED TIMESTAMP not null, | |
PRIMARY KEY (RESERVE_ID) | |
)ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment