赞
踩
(增,删,改(修改信息,注销),查(查所有,按照编号、手机号进行查询))
5.评论表和订单是多对一的关系
- --用户表--
- create table users
- (
- user_id number(4) not null,
- user_name nvarchar2(10) not null,
- user_password nvarchar2(20) not null,
- user_phone nvarchar2(22) not null,
- user_state nvarchar2(2) not null,
- constraint PK_STUDENT primary key (user_id)
- );
-
-
- --司机表--
- create table driver
- (
- driver_id number(4) not null,
- driver_name nvarchar2(10) not null,
- driver_idcard nvarchar2(20) not null,
- driver_phone nvarchar2(11) not null,
- driver_state nvarchar2(2) not null,
- driver_service number(4) not null,
- driver_amount nvarchar2(10) not null,
- constraint PK_DRIVER primary key (driver_id)
- );
-
-
- --管理员表--
- create table admin
- (
- admin_id number(4) not null,
- admin_name nvarchar2(10) not null,
- admin_password nvarchar2(20) not null,
- admin_limits nvarchar2(2) not null,
- constraint PK_ADMIN primary key (admin_id)
- );
-
-
-
- --汽车信息表--
- create table car
- (
- car_id number(4) not null,
- car_number nvarchar2(10) not null,
- car_type nvarchar2(20) not null,
- car_color nvarchar2(10) not null,
- car_state nvarchar2(2) not null,
- driver_id number(4) not null,
- sort_id number(4) not null,
- constraint PK_CAR primary key (car_id)
- );
-
-
- --业务类别表--
- create table sort
- (
- sort_id number(4) not null,
- sort_name nvarchar2(6) not null,
- constraint PK_SORT primary key (sort_id)
- );
-
- --订单表--
- create table orderform
- (
- orderform_id number(4) not null,
- orderform_createdtime nvarchar2(30) not null,
- orderform_finishedtime nvarchar2(30) not null,
- orderform_startaddress nvarchar2(200) not null,
- orderform_endaddress nvarchar2(200) not null,
- orderform_state nvarchar2(2) not null,
- orderform_money number(5,2) not null,
- car_id number(4) not null,
- user_id number(4) not null,
- constraint PK_ORDER primary key (orderform_id)
- );
-
-
- --退款记录表--退款记录表:记录表id,订单id,退款原因,
- --退款开始时间,退款结束时间,记录表状态(0退款中,1退款成功,2退款失败),退款金额
- create table refund
- (
- refund_id number(4) not null,
- refund_reason nvarchar2(100) not null,
- refund_startedtime nvarchar2(50) not null,
- refund_finishedtime nvarchar2(50) not null,
- refund_state nvarchar2(20) not null,
- refund_money number(8,2) not null,
- orderform_id number(4) not null,
- constraint PK_REFUND primary key (refund_id)
- );
-
-
- --评论表:评论表id,订单Id,评论时间,评论内容,回复内容,打分
- create table comments(
- comments_id number(4) not null,
- comments_time nvarchar2(100) not null,
- comments_context nvarchar2(1000) ,
- comments_grade number(4,2) not null,
- comments_reply nvarchar2(100),
- orderform_id number(4) not null,
- constraint PK_COMMENTS primary key (comments_id)
- );
-
- package com.vo;
-
- public class Car {
-
- private int car_id;
- private String car_number;
- private String car_type;
- private String car_color;
- private String car_state;
- private Driver driver;
- private Sort sort;
-
- public Car() {
- super();
- // TODO Auto-generated constructor stub
- }
-
- public Car(int car_id, String car_number, String car_type, String car_color, String car_state) {
- super();
- this.car_id = car_id;
- this.car_number = car_number;
- this.car_type = car_type;
- this.car_color = car_color;
- this.car_state = car_state;
- }
-
- public Car(int car_id, String car_number, String car_type, String car_color, String car_state, Driver driver,
- Sort sort) {
- super();
- this.car_id = car_id;
- this.car_number = car_number;
- this.car_type = car_type;
- this.car_color = car_color;
- this.car_state = car_state;
- this.driver = driver;
- this.sort = sort;
- }
-
- // public Car(int car_id, String car_number, String car_type, String
- // car_color, String car_state) {
- // super();
- // this.car_id = car_id;
- // this.car_number = car_number;
- // this.car_type = car_type;
- // this.car_color = car_color;
- // this.car_state = car_state;
- // }
-
- public int getCar_id() {
- return car_id;
- }
-
- public void setCar_id(int car_id) {
- this.car_id = car_id;
- }
-
- public String getCar_number() {
- return car_number;
- }
-
- public void setCar_number(String car_number) {
- this.car_number = car_number;
- }
-
- public String getCar_type() {
- return car_type;
- }
-
- public void setCar_type(String car_type) {
- this.car_type = car_type;
- }
-
- public String getCar_color() {
- return car_color;
- }
-
- public void setCar_color(String car_color) {
- this.car_color = car_color;
- }
-
- public String getCar_state() {
- return car_state;
- }
-
- public void setCar_state(String car_state) {
- this.car_state = car_state;
- }
-
- public String getCars_state() {
- return car_state;
- }
-
- public void setCars_state(String car_state) {
- this.car_state = car_state;
- }
-
- public Driver getDriver() {
- return driver;
- }
-
- public void setDriver(Driver driver
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。