Skip to content

Commit

Permalink
add t_user.sql
Browse files Browse the repository at this point in the history
  • Loading branch information
wangzaiplus committed Feb 6, 2021
1 parent 1e2f83d commit 5b02a68
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 38 deletions.

This file was deleted.

28 changes: 28 additions & 0 deletions src/main/java/com/wangzaiplus/test/dto/UserDto.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package com.wangzaiplus.test.dto;

import lombok.*;

import java.util.Date;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@ToString
@Builder
public class UserDto {

private Integer id;
private String username;
private String password;
private String passwordSalt;
private String ip;
private String mobile;
private String mail;
private Integer type;
private Integer status;
private Integer isDeleted;
private Date createdTime;
private Date updatedTime;

}
25 changes: 11 additions & 14 deletions src/main/java/com/wangzaiplus/test/pojo/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import lombok.*;

import java.util.Date;

@Getter
@Setter
@NoArgsConstructor
Expand All @@ -13,19 +15,14 @@ public class User {
private Integer id;
private String username;
private String password;
private String password2;
private String password3;
private String password4;
private String password5;
private String password6;
private String password7;
private String password8;
private String password9;
private String password10;
private String passwordSalt;
private String ip;
private String mobile;
private String mail;
private Integer type;
private Integer status;
private Integer isDeleted;
private Date createdTime;
private Date updatedTime;

public User(Integer id, String username, String password) {
this.id = id;
this.username = username;
this.password = password;
}
}
24 changes: 24 additions & 0 deletions src/main/resources/db/fund.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
drop table if exists fund;

create table fund(
id int not null auto_increment comment '主键',
code varchar(255) not null comment '基金代码',
name varchar(255) not null comment '基金名称',
net_value decimal(10, 4) not null comment '单位净值',
yield_of_one_year varchar(255) not null comment '近1年收益率',
yield_of_two_year varchar(255) not null comment '近2年收益率',
yield_of_three_year varchar(255) not null comment '近3年收益率',
yield_of_five_year varchar(255) not null comment '近5年收益率',
type int not null comment '基金类型(1:股票型,2:混合型,3:债券型,4:指数型,5:QDII)',
established_time datetime comment '成立时间',
asset varchar(255) comment '基金规模,资产',
manager varchar(255) comment '基金经理',
status int default 1 not null comment '基金状态(1:正常开放,2:暂停交易)',
is_deleted int default 0 not null comment '是否删除(0:有效,1:无效删除)',
created_time datetime default now() not null comment '创建时间',
updated_time datetime default now() not null comment '更新时间',
primary key(id)
) comment = '基金表';

create unique index unq_idx_type_code on fund(type, code);
create index idx_type_name_code on fund(type, name, code);
File renamed without changes.
19 changes: 19 additions & 0 deletions src/main/resources/db/t_user.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
drop table if exists t_user;

create table t_user(
id int not null auto_increment comment '主键',
username varchar(255) not null comment '用户名',
password varchar(255) not null comment '密码',
password_salt varchar(255) not null comment '密码随机盐值',
ip varchar(255) comment 'IP地址',
mobile varchar(11) comment '手机号',
mail varchar(255) comment '邮箱',
type int default 0 not null comment '类型(0:普通用户,1:超级管理员)',
status int default 0 not null comment '状态(0:正常,1:黑名单,2:已注销)',
is_deleted int default 0 not null comment '是否删除(0:有效,1:无效删除)',
created_time datetime default now() not null comment '创建时间',
updated_time datetime default now() not null comment '更新时间',
primary key(id)
) comment = '用户表';

create unique index unq_idx_username on t_user(username);

0 comments on commit 5b02a68

Please sign in to comment.