转载自:http://www.javabysj.cn/sheji/38.html
超级管理员表创建语句如下:
create table t_admin(
id int primary key auto_increment comment '主键',
username varchar(100) comment '超级管理员账号',
password varchar(100) comment '超级管理员密码'
) comment '超级管理员';
insert into t_admin(username,password) values('admin','123456');
数据更新记录表创建语句如下:
create table t_a1(
id int primary key auto_increment comment '主键',
zyId int comment '资源',
updateDate varchar(100) comment '更新日期',
content varchar(100) comment '更新说明'
) comment '数据更新记录';
培训记录表创建语句如下:
create table t_a2(
id int primary key auto_increment comment '主键',
zyId int comment '资源',
updateDate varchar(100) comment '培训日期',
content varchar(100) comment '培训说明'
) comment '培训记录';
访问量记录表创建语句如下:
create table t_a3(
id int primary key auto_increment comment '主键',
zyId int comment '资源',
updateDate varchar(100) comment '记录日期',
content varchar(100) comment '访问量'
) comment '访问量记录';
资源厂商表创建语句如下:
create table t_customer(
id int primary key auto_increment comment '主键',
username varchar(100) comment '账号',
password varchar(100) comment '密码',
customerName varchar(100) comment '姓名',
age varchar(100) comment '年龄',
sex varchar(100) comment '性别',
phone varchar(100) comment '电话',
idcard varchar(100) comment '身份证',
address varchar(100) comment '地址'
) comment '资源厂商';
服务质量表创建语句如下:
create table t_fwzl(
id int primary key auto_increment comment '主键',
customerId int comment '用户',
zyId int comment '资源',
content varchar(100) comment '服务内容',
xj varchar(100) comment '星级评分',
insertDate datetime comment '评价日期'
) comment '服务质量';
资源记录表创建语句如下:
create table t_zy(
id int primary key auto_increment comment '主键',
customerId int comment '厂商名称',
zyName varchar(100) comment '资源名称',
zyContent varchar(100) comment '资源内容',
types varchar(100) comment '类型',
url varchar(100) comment '地址',
yxDate varchar(100) comment '有效日期',
insertDate datetime comment '发起日期'
) comment '资源记录';
资源计划与任务表创建语句如下:
create table t_zyjh(
id int primary key auto_increment comment '主键',
customerId int comment '用户',
zyName varchar(100) comment '目标资源',
content varchar(100) comment '操作内容',
remark varchar(100) comment '任务进度',
insertDate datetime comment '评价日期',
updateDate datetime comment '更新日期'
) comment '资源计划与任务';
数据更新记录javaBean创建语句如下:
package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity
//数据更新记录
@Table(name = "t_a1")
public class A1 {
//主键
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//资源
private Integer zyId;
//更新日期
private String updateDate;
//更新说明
private String content;
public Integer getZyId() {return zyId;}
public void setZyId(Integer zyId) {this.zyId = zyId;}
public String getUpdateDate() {return updateDate;}
public void setUpdateDate(String updateDate) {this.updateDate = updateDate;}
public String getContent() {return content;}
public void setContent(String content) {this.content = content;}
}
培训记录javaBean创建语句如下:
package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity
//培训记录
@Table(name = "t_a2")
public class A2 {
//主键
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//资源
private Integer zyId;
//培训日期
private String updateDate;
//培训说明
private String content;
public Integer getZyId() {return zyId;}
public void setZyId(Integer zyId) {this.zyId = zyId;}
public String getUpdateDate() {return updateDate;}
public void setUpdateDate(String updateDate) {this.updateDate = updateDate;}
public String getContent() {return content;}
public void setContent(String content) {this.content = content;}
}
访问量记录javaBean创建语句如下:
package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity
//访问量记录
@Table(name = "t_a3")
public class A3 {
//主键
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//资源
private Integer zyId;
//记录日期
private String updateDate;
//访问量
private String content;
public Integer getZyId() {return zyId;}
public void setZyId(Integer zyId) {this.zyId = zyId;}
public String getUpdateDate() {return updateDate;}
public void setUpdateDate(String updateDate) {this.updateDate = updateDate;}
public String getContent() {return content;}
public void setContent(String content) {this.content = content;}
}
资源厂商javaBean创建语句如下:
package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity
//资源厂商
@Table(name = "t_customer")
public class Customer {
//主键
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//账号
private String username;
//密码
private String password;
//姓名
private String customerName;
//年龄
private String age;
//性别
private String sex;
//电话
private String phone;
//身份证
private String idcard;
//地址
private String address;
public String getUsername() {return username;}
public void setUsername(String username) {this.username = username;}
public String getPassword() {return password;}
public void setPassword(String password) {this.password = password;}
public String getCustomerName() {return customerName;}
public void setCustomerName(String customerName) {this.customerName = customerName;}
public String getAge() {return age;}
public void setAge(String age) {this.age = age;}
public String getSex() {return sex;}
public void setSex(String sex) {this.sex = sex;}
public String getPhone() {return phone;}
public void setPhone(String phone) {this.phone = phone;}
public String getIdcard() {return idcard;}
public void setIdcard(String idcard) {this.idcard = idcard;}
public String getAddress() {return address;}
public void setAddress(String address) {this.address = address;}
}
服务质量javaBean创建语句如下:
package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity
//服务质量
@Table(name = "t_fwzl")
public class Fwzl {
//主键
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//用户
private Integer customerId;
//资源
private Integer zyId;
//服务内容
private String content;
//星级评分
private String xj;
//评价日期
private Date insertDate;
public Integer getCustomerId() {return customerId;}
public void setCustomerId(Integer customerId) {this.customerId = customerId;}
public Integer getZyId() {return zyId;}
public void setZyId(Integer zyId) {this.zyId = zyId;}
public String getContent() {return content;}
public void setContent(String content) {this.content = content;}
public String getXj() {return xj;}
public void setXj(String xj) {this.xj = xj;}
public Date getInsertDate() {return insertDate;}
public void setInsertDate(Date insertDate) {this.insertDate = insertDate;}
}
资源记录javaBean创建语句如下:
package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity
//资源记录
@Table(name = "t_zy")
public class Zy {
//主键
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//厂商名称
private Integer customerId;
//资源名称
private String zyName;
//资源内容
private String zyContent;
//类型
private String types;
//地址
private String url;
//有效日期
private String yxDate;
//发起日期
private Date insertDate;
public Integer getCustomerId() {return customerId;}
public void setCustomerId(Integer customerId) {this.customerId = customerId;}
public String getZyName() {return zyName;}
public void setZyName(String zyName) {this.zyName = zyName;}
public String getZyContent() {return zyContent;}
public void setZyContent(String zyContent) {this.zyContent = zyContent;}
public String getTypes() {return types;}
public void setTypes(String types) {this.types = types;}
public String getUrl() {return url;}
public void setUrl(String url) {this.url = url;}
public String getYxDate() {return yxDate;}
public void setYxDate(String yxDate) {this.yxDate = yxDate;}
public Date getInsertDate() {return insertDate;}
public void setInsertDate(Date insertDate) {this.insertDate = insertDate;}
}
资源计划与任务javaBean创建语句如下:
package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity
//资源计划与任务
@Table(name = "t_zyjh")
public class Zyjh {
//主键
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//用户
private Integer customerId;
//目标资源
private String zyName;
//操作内容
private String content;
//任务进度
private String remark;
//评价日期
private Date insertDate;
//更新日期
private Date updateDate;
public Integer getCustomerId() {return customerId;}
public void setCustomerId(Integer customerId) {this.customerId = customerId;}
public String getZyName() {return zyName;}
public void setZyName(String zyName) {this.zyName = zyName;}
public String getContent() {return content;}
public void setContent(String content) {this.content = content;}
public String getRemark() {return remark;}
public void setRemark(String remark) {this.remark = remark;}
public Date getInsertDate() {return insertDate;}
public void setInsertDate(Date insertDate) {this.insertDate = insertDate;}
public Date getUpdateDate() {return updateDate;}
public void setUpdateDate(Date updateDate) {this.updateDate = updateDate;}
}