package Dto;
/* DB쿼리문
* CREATE TABLE KH_MEMBER(
ID VARCHAR2(50) PRIMARY KEY,
PWD VARCHAR2(50) NOT NULL,
NAME VARCHAR2(50) NOT NULL,
PARTNER VARCHAR2(50),
PHONE VARCHAR2(50) NOT NULL,
EMAIL VARCHAR2(50) NOT NULL,
AUTH NUMBER(1) NOT NULL
);
INSERT INTO KH_MEMBER VALUES('ADMIN', '1', 'ADMIN', , 'NULL', 'NULL', 1);
*/
public class MemberDto {
private String id;
private String pw;
private String name;
private String partner;
private String phone;
private String email;
private int auth; // 0:User 1:Admin
public MemberDto() {
}
public MemberDto(String id, String name, int auth) {
super();
this.id = id;
this.name = name;
this.auth = auth;
}
public MemberDto(String id, String name, String partner, String phone, String email) {
super();
this.id = id;
this.name = name;
this.partner = partner;
this.phone = phone;
this.email = email;
}
public MemberDto(String id, String pw, String name, String partner, String phone, String email) {
super();
this.id = id;
this.pw = pw;
this.name = name;
this.partner = partner;
this.phone = phone;
this.email = email;
}
public String getId() {
return id;
}
public String getPw() {
return pw;
}
public String getName() {
return name;
}
public String getPartner() {
return partner;
}
public String getPhone() {
return phone;
}
public String getEmail() {
return email;
}
public int getAuth() {
return auth;
}
}
package Dto;
import java.io.Serializable;
public class PdsDto implements Serializable{
/* DB쿼리문
CREATE TABLE PDS(
SEQ NUMBER(8) PRIMARY KEY,
ID VARCHAR2(50) NOT NULL,
TITLE VARCHAR2(200) NOT NULL,
CONTENT VARCHAR2(4000) NOT NULL,
FILENAME VARCHAR2(50) NOT NULL,
DEL NUMBER(8) NOT NULL,
READCOUNT NUMBER(8) NOT NULL,
DOWNCOUNT NUMBER(8) NOT NULL,
REGDATE DATE NOT NULL
);*/
private int seq;
private String id;
private String title;
private String content;
private String filename;
private int del;
private int readcount;
private int downcount;
private String regdate;
public PdsDto() {
}
public PdsDto(int seq, String id, String title, String content, String filename, int del, int readcount,
int downcount, String regdate) {
super();
this.seq = seq;
this.id = id;
this.title = title;
this.content = content;
this.filename = filename;
this.del = del;
this.readcount = readcount;
this.downcount = downcount;
this.regdate = regdate;
}
public PdsDto(String id, String title, String content, String filename) {
super();
this.id = id;
this.title = title;
this.content = content;
this.filename = filename;
}
public int getSeq() {
return seq;
}
public void setSeq(int seq) {
this.seq = seq;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getFilename() {
return filename;
}
public void setFilename(String filename) {
this.filename = filename;
}
public int getDel() {
return del;
}
public void setDel(int del) {
this.del = del;
}
public int getReadcount() {
return readcount;
}
public void setReadcount(int readcount) {
this.readcount = readcount;
}
public int getDowncount() {
return downcount;
}
public void setDowncount(int downcount) {
this.downcount = downcount;
}
public String getRegdate() {
return regdate;
}
public void setRegdate(String regdate) {
this.regdate = regdate;
}
@Override
public String toString() {
return "PdsDto [seq=" + seq + ", id=" + id + ", title=" + title + ", content=" + content + ", filename="
+ filename + ", del=" + del + ", readcount=" + readcount + ", downcount=" + downcount + ", regdate="
+ regdate + "]";
}
}
package Dto;
import java.io.Serializable;
/* DB쿼리문
CREATE TABLE BBS(
SEQ NUMBER(8) PRIMARY KEY,
ID VARCHAR2(50) NOT NULL,
REF NUMBER(8) NOT NULL,
STEP NUMBER(8) NOT NULL,
DEPTH NUMBER(8) NOT NULL,
TITLE VARCHAR2(200) NOT NULL,
CONTENT VARCHAR2(4000) NOT NULL,
WDATE DATE NOT NULL,
PARENT NUMBER(8) NOT NULL,
DEL NUMBER(1) NOT NULL,
READCOUNT NUMBER(8) NOT NULL
);
CREATE SEQUENCE SEQ_BBS
START WITH 1 INCREMENT BY 1;
ALTER TABLE BBS
ADD CONSTRAINT FK_BBS_ID FOREIGN KEY(ID)
REFERENCES KH_MEMBER(ID);*/
public class QADto implements Serializable {
private int seq; // 순서번호
private String id; // 임시 로그인
private int ref; // 그룹번호
private int step; // 열번호
private int depth; // 깊이
private String title; // 제목
private String content; // 내용
private String wdate; // 작성날자
private int parent; // 부모글 번호
private int del; // 삭제 여부 0:안삭제 1:삭제
private int readcount; // 조회수
private int rownum;
public int getRownum() {
return rownum;
}
public void setRownum(int rownum) {
this.rownum = rownum;
}
//기본생성자
public QADto() {
}
public int getSeq() {
return seq;
}
public void setSeq(int seq) {
this.seq = seq;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public int getRef() {
return ref;
}
public void setRef(int ref) {
this.ref = ref;
}
public int getStep() {
return step;
}
public void setStep(int step) {
this.step = step;
}
public int getDepth() {
return depth;
}
public void setDepth(int depth) {
this.depth = depth;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getWdate() {
return wdate;
}
public void setWdate(String wdate) {
this.wdate = wdate;
}
public int getParent() {
return parent;
}
public void setParent(int parent) {
this.parent = parent;
}
public int getDel() {
return del;
}
public void setDel(int del) {
this.del = del;
}
public int getReadcount() {
return readcount;
}
public void setReadcount(int readcount) {
this.readcount = readcount;
}
public QADto(int seq, String id, int ref, int step, int depth, String title, String content, String wdate,
int parent, int del, int readcount) {
super();
this.seq = seq;
this.id = id;
this.ref = ref;
this.step = step;
this.depth = depth;
this.title = title;
this.content = content;
this.wdate = wdate;
this.parent = parent;
this.del = del;
this.readcount = readcount;
}
public QADto(String id, String title, String content) {
super();
this.id = id;
this.title = title;
this.content = content;
}
}
package Dto;
/* DB쿼리문
CREATE SEQUENCE SEQ_REP
START WITH 1 INCREMENT BY 1;
CREATE TABLE REP(
SEQ NUMBER(8) PRIMARY KEY,
ID VARCHAR2(50) NOT NULL,
REF NUMBER(8) NOT NULL,
STEP NUMBER(8) NOT NULL,
DEPTH NUMBER(8) NOT NULL,
PARENT NUMBER(8) NOT NULL,
CONTENT VARCHAR2(4000) NOT NULL,
WDATE DATE NOT NULL,
DEL NUMBER(1) NOT NULL
);
ALTER TABLE REP
ADD CONSTRAINT FK_REP_REF FOREIGN KEY(REF)
REFERENCES BBS(SEQ);
*/
public class ReplyDto {
private int seq;
private String id;
private int ref;
private int step;
private int depth;
private int parent;
private String content;
private String wdate;
private int del;
public ReplyDto(int seq, String id, int ref, int step, int depth, int parent, String content, String wdate,
int del) {
super();
this.seq = seq;
this.id = id;
this.ref = ref;
this.step = step;
this.depth = depth;
this.parent = parent;
this.content = content;
this.wdate = wdate;
this.del = del;
}
public ReplyDto(String id, int ref, int parent, String content) {
super();
this.id = id;
this.ref = ref;
this.parent = parent;
this.content = content;
}
public int getSeq() {
return seq;
}
public void setSeq(int seq) {
this.seq = seq;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public int getRef() {
return ref;
}
public void setRef(int ref) {
this.ref = ref;
}
public int getStep() {
return step;
}
public void setStep(int step) {
this.step = step;
}
public int getDepth() {
return depth;
}
public void setDepth(int depth) {
this.depth = depth;
}
public int getParent() {
return parent;
}
public void setParent(int parent) {
this.parent = parent;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getWdate() {
return wdate;
}
public void setWdate(String wdate) {
this.wdate = wdate;
}
public int getDel() {
return del;
}
public void setDel(int del) {
this.del = del;
}
}
package Dto;
public class ReserveDto {
private int seq;
private String id;
private String title;
private String content;
private String rdate;
private String wdate;
public ReserveDto(int seq, String id, String title, String content, String rdate, String wdate) {
super();
this.seq = seq;
this.id = id;
this.title = title;
this.content = content;
this.rdate = rdate;
this.wdate = wdate;
}
public ReserveDto(String id, String title, String content, String rdate) {
super();
this.id = id;
this.title = title;
this.content = content;
this.rdate = rdate;
}
public int getSeq() {
return seq;
}
public void setSeq(int seq) {
this.seq = seq;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getRdate() {
return rdate;
}
public void setRdate(String rdate) {
this.rdate = rdate;
}
public String getWdate() {
return wdate;
}
public void setWdate(String wdate) {
this.wdate = wdate;
}
public String toString(String logid) {
String temp = "{\"seq\":" + seq + ", \"id\":\"" + id + "\", \"title\":\"" + title + "\", \"content\":\"" + content + "\", \"start\":\""
+ rdate.substring(0, 4)+"-"+rdate.substring(4, 6) + "-" +rdate.substring(6,8) + "T" + rdate.substring(8, 10)+ ":" + rdate.substring(10, 12)+":00"
+ "\", \"wdate\":\"" + wdate + "\", \"allDay\" : false, \"url\": \"../ReserveController?command=detail&seq="+seq+ "\",";
if(logid.equals(id)) {
temp += "\"color\": \"#e07bb1\"}";
}else {
temp += "\"color\": \"#7a9ee0\"}";
}
return temp;
}
public ReserveDto() {
}
'JavaScript mini Project > Project java code ' 카테고리의 다른 글
CSS (0) | 2018.09.30 |
---|---|
DB 연결 (0) | 2018.09.30 |
Mem,Pbs,QA,Reserve - Dao (MVC2) (0) | 2018.09.30 |
Mem,Pbs,QA,Reserve - Controller (MVC2) (0) | 2018.09.30 |
Location (0) | 2018.09.26 |