HyeonJun Jeon

Complete

...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
17 17
18 ```sh 18 ```sh
19 npm install 19 npm install
20 +npm -g install nodemon
20 ``` 21 ```
21 22
22 ### Run 23 ### Run
......
1 +{
2 + "compilerOptions": {
3 + "baseUrl": "src"
4 + }
5 +}
...\ No newline at end of file ...\ No newline at end of file
...@@ -7,7 +7,7 @@ const [id, pw] = fs ...@@ -7,7 +7,7 @@ const [id, pw] = fs
7 .readFileSync("server/libs/sql.pvdata", "utf8") 7 .readFileSync("server/libs/sql.pvdata", "utf8")
8 .split("\r\n"); 8 .split("\r\n");
9 const connectOption = { 9 const connectOption = {
10 - host: "localhost", 10 + host: "extended-calendar-db.cihyg6ssq3la.ap-northeast-2.rds.amazonaws.com",
11 user: id, 11 user: id,
12 password: pw, 12 password: pw,
13 database: "db", 13 database: "db",
...@@ -53,11 +53,10 @@ async function jcalToSQL(jcal, userID) { ...@@ -53,11 +53,10 @@ async function jcalToSQL(jcal, userID) {
53 else console.log("unexpected scheType", sche); 53 else console.log("unexpected scheType", sche);
54 } 54 }
55 55
56 - let result = await connection.query(dateQueryString, [dateSchedules]); 56 + let [result] = await connection.query(dateQueryString, [dateSchedules]);
57 - console.log(`schedules_date | ${result}`); 57 + console.log("ICAL schedules_date | " + result.affectedRows);
58 - 58 + [result] = await connection.query(timeQueryString, [timeSchedules]);
59 - result = await connection.query(timeQueryString, [timeSchedules]); 59 + console.log("ICAL schedules_time | " + result.affectedRows);
60 - console.log(`schedules_time | ${result}`);
61 60
62 connection.end(); 61 connection.end();
63 } 62 }
......
...@@ -6,12 +6,10 @@ const { login } = require("./E_Campus.js"); ...@@ -6,12 +6,10 @@ const { login } = require("./E_Campus.js");
6 const parseICal = require("./ICal.js"); 6 const parseICal = require("./ICal.js");
7 7
8 async function runrun() { 8 async function runrun() {
9 - const { data: ical } = await axios({ 9 +
10 - url: "https://khcanvas.khu.ac.kr/feeds/calendars/user_YzxoryVh1hAQTeUJRljeaYavgmw1OXEGKIzNVpnI.ics", 10 + const mdata = await axios.get("http://localhost:3001/db/users", {params:{loginID:"good1588"}}
11 - method: "GET", 11 +
12 - responseType: "blob", 12 + )
13 - }); 13 + console.log(mdata.data)
14 - const Jcal = parseICal(ical);
15 - console.log(Jcal);
16 } 14 }
17 runrun(); 15 runrun();
......
1 +const { default: axios } = require("axios");
1 const express = require("express"); 2 const express = require("express");
2 const mysql2 = require("mysql2/promise"); 3 const mysql2 = require("mysql2/promise");
3 -const { connectOption } = require("../libs/MySQL"); 4 +const parseICal = require("../libs/ICal");
5 +const { connectOption, jcalToSQL } = require("../libs/MySQL");
4 const dbRouter = express.Router(); 6 const dbRouter = express.Router();
5 7
6 -const schedules_dateRouter = require("./schedules_date"); 8 +const schedules_dateRouter = require("./Schedules_date");
7 const schedules_repeatRouter = require("./Schedules_repeat"); 9 const schedules_repeatRouter = require("./Schedules_repeat");
8 const schedules_timeRouter = require("./Schedules_time"); 10 const schedules_timeRouter = require("./Schedules_time");
9 const subjectsRouter = require("./Subjects"); 11 const subjectsRouter = require("./Subjects");
10 -const userSubjectRouter = require("./user-subject"); 12 +const userSubjectRouter = require("./User-subject");
11 const usersRouter = require("./Users"); 13 const usersRouter = require("./Users");
12 14
13 async function route() { 15 async function route() {
...@@ -29,6 +31,24 @@ async function route() { ...@@ -29,6 +31,24 @@ async function route() {
29 } 31 }
30 }); 32 });
31 33
34 + // (userID, peed)
35 + dbRouter.put("/ical", async (req, res) => {
36 + console.log("put /db/ical");
37 + try {
38 + const { data: ical } = await axios({
39 + url: req.body.peed,
40 + method: "GET",
41 + responseType: "blob",
42 + });
43 + await jcalToSQL(parseICal(ical), req.body.userID);
44 +
45 + res.end();
46 + } catch (e) {
47 + console.log(e);
48 + res.end();
49 + }
50 + });
51 +
32 dbRouter.use("/user-subject", userSubjectRouter); 52 dbRouter.use("/user-subject", userSubjectRouter);
33 dbRouter.use("/users", usersRouter); 53 dbRouter.use("/users", usersRouter);
34 dbRouter.use("/subjects", subjectsRouter); 54 dbRouter.use("/subjects", subjectsRouter);
......
...@@ -14,19 +14,19 @@ router.post("/", async (req, res) => { ...@@ -14,19 +14,19 @@ router.post("/", async (req, res) => {
14 try { 14 try {
15 const { peed, subjects } = result; 15 const { peed, subjects } = result;
16 16
17 - const resUser = await axios.post("http://localhost:3001/db/users", { 17 + const resUser = await axios.post("http://3.34.173.161:3001/db/users", {
18 loginID: req.body.id, 18 loginID: req.body.id,
19 loginPW: req.body.pw, 19 loginPW: req.body.pw,
20 ical: peed, 20 ical: peed,
21 }); 21 });
22 const userID = resUser.data.ID; 22 const userID = resUser.data.ID;
23 const { data: subList } = await axios.post( 23 const { data: subList } = await axios.post(
24 - "http://localhost:3001/db/subjects/s", 24 + "http://3.34.173.161:3001/db/subjects/s",
25 { 25 {
26 list: subjects, 26 list: subjects,
27 } 27 }
28 ); 28 );
29 - await axios.post("http://localhost:3001/db/user-subject/s", { 29 + await axios.post("http://3.34.173.161:3001/db/user-subject/s", {
30 userID, 30 userID,
31 subList, 31 subList,
32 }); 32 });
......
...@@ -56,6 +56,21 @@ async function route() { ...@@ -56,6 +56,21 @@ async function route() {
56 res.end(); 56 res.end();
57 } 57 }
58 }); 58 });
59 +
60 + // (ID) => ical
61 + usersRouter.get("/ical", async (req, res) => {
62 + console.log("/db/users/ical");
63 + try {
64 + const queryString = `
65 + SELECT ical FROM users us
66 + WHERE us.ID = '${req.query.ID}'`;
67 + const [results] = await connection.query(queryString);
68 + res.send(results[0]);
69 + } catch (e) {
70 + console.log(e);
71 + res.end();
72 + }
73 + });
59 } 74 }
60 route(); 75 route();
61 76
......
1 -CREATE DATABASE IF NOT EXISTS `db` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
2 -USE `db`;
3 --- MySQL dump 10.13 Distrib 8.0.29, for Win64 (x86_64)
4 ---
5 --- Host: localhost Database: db
6 --- ------------------------------------------------------
7 --- Server version 8.0.29
8 -
9 -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
10 -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
11 -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
12 -/*!50503 SET NAMES utf8 */;
13 -/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
14 -/*!40103 SET TIME_ZONE='+00:00' */;
15 -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
16 -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
17 -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
18 -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
19 -
20 ---
21 --- Table structure for table `schedules_date`
22 ---
23 -
24 -DROP TABLE IF EXISTS `schedules_date`;
25 -/*!40101 SET @saved_cs_client = @@character_set_client */;
26 -/*!50503 SET character_set_client = utf8mb4 */;
27 -CREATE TABLE `schedules_date` (
28 - `ID` int NOT NULL AUTO_INCREMENT,
29 - `userID` int NOT NULL,
30 - `uid` int DEFAULT NULL,
31 - `label` varchar(100) DEFAULT NULL,
32 - `subjectID` int NOT NULL,
33 - `type` varchar(50) DEFAULT NULL,
34 - `description` varchar(2000) DEFAULT NULL,
35 - `url` varchar(2000) DEFAULT NULL,
36 - `detail` varchar(4000) DEFAULT NULL,
37 - `status` tinyint DEFAULT '1',
38 - `date` date NOT NULL,
39 - PRIMARY KEY (`ID`),
40 - UNIQUE KEY `schedules_date(userID&uid)` (`userID`,`uid`),
41 - KEY `schedules_date-subjects` (`subjectID`),
42 - CONSTRAINT `schedules_date-subjects` FOREIGN KEY (`subjectID`) REFERENCES `subjects` (`ID`),
43 - CONSTRAINT `schedules_date-users` FOREIGN KEY (`userID`) REFERENCES `users` (`ID`)
44 -) ENGINE=InnoDB AUTO_INCREMENT=1340 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
45 -/*!40101 SET character_set_client = @saved_cs_client */;
46 -
47 ---
48 --- Dumping data for table `schedules_date`
49 ---
50 -
51 -LOCK TABLES `schedules_date` WRITE;
52 -/*!40000 ALTER TABLE `schedules_date` DISABLE KEYS */;
53 -INSERT INTO `schedules_date` VALUES (1280,29,898489,'이산구조 QnA 0509',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/898489',NULL,1,'2022-05-09'),(1281,29,897098,'EppDm4_08_05 20강',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/897098',NULL,1,'2022-05-09'),(1282,29,897103,'EppDm4_09_01 20강',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/897103',NULL,1,'2022-05-09'),(1283,29,893443,'소웨사10주차',30517,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/30517/assignments/893443',NULL,1,'2022-05-11'),(1284,29,899121,'이산구조 QnA 0509 추가 질문',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/899121',NULL,1,'2022-05-11'),(1285,29,897117,'EppDm4_09_02 21강',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/897117',NULL,1,'2022-05-11'),(1286,29,897118,'EppDm4_09_03 21강',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/897118',NULL,1,'2022-05-11'),(1287,29,897119,'EppDm4_09_04 21강',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/897119',NULL,1,'2022-05-11'),(1288,29,909379,'이산구조 QnA 0516',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/909379',NULL,1,'2022-05-16'),(1289,29,896305,'학술에세이 초고안',30038,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/30038/assignments/896305','초고안 올려 주세요',1,'2022-05-16'),(1290,29,907956,'EppDm4_09_05',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/907956',NULL,1,'2022-05-16'),(1291,29,907958,'EppDm4_09_07',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/907958',NULL,1,'2022-05-16'),(1292,29,903680,'소웨사11주차',30517,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/30517/assignments/903680',NULL,1,'2022-05-18'),(1293,29,908383,'이산구조 퀴즈 0518',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/908383','<p><a class=\"description_file_attachment\" href=\"https://khcanvas.khu.ac.kr/courses/28193/files/3945299/download?\" data-api-endpoint=\"https://khcanvas.khu.ac.kr/api/v1/courses/28193/files/3945299\" data-api-returntype=\"File\"><span class=\"description_file_name\">이산구조 퀴즈 0518.pdf</span></a></p>',1,'2022-05-18'),(1294,29,905097,'Chapter 4. Multiple RV (20220512)',28985,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28985/assignments/905097',NULL,1,'2022-05-18'),(1295,29,907962,'EppDm4_09_08',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/907962',NULL,1,'2022-05-18'),(1296,29,907963,'EppDm4_09_09',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/907963',NULL,1,'2022-05-18'),(1297,29,912897,'10주차~11주차 강의 요약 및 문제 풀이',28971,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28971/assignments/912897','<p style=\"margin-top: 12px\\; margin-bottom: 10px\\; font-family: LatoWeb\\, Lato\\, \'Helvetica Neue\'\\, Helvetica\\, Arial\\, sans-serif\\; font-size: 14px\\;\">10주차부터 업로드 하지 않았던 부분부터 강의 내용 요약 혹은 필기를 업로드 해주세요. 여러분의 강의 수강 여부 및 이해도 측정을 위한 과제입니다.</p>\\n<p style=\"margin-top: 12px\\; margin-bottom: 10px\\; font-family: LatoWeb\\, Lato\\, \'Helvetica Neue\'\\, Helvetica\\, Arial\\, sans-serif\\; font-size: 14px\\;\">최소 5줄 이상만 요약을 해주면 됩니다.</p>\\n<p style=\"margin-top: 12px\\; margin-bottom: 10px\\; font-family: LatoWeb\\, Lato\\, \'Helvetica Neue\'\\, Helvetica\\, Arial\\, sans-serif\\; font-size: 14px\\;\">시간을 너무 많이 들여서 요약을 할 필요는 없습니다. 자유형식으로 궁금한 것들은 요약 과제 제출시 댓글로 달아주시면\\, </p>\\n<p style=\"margin-top: 12px\\; margin-bottom: 10px\\; font-family: LatoWeb\\, Lato\\, \'Helvetica Neue\'\\, Helvetica\\, Arial\\, sans-serif\\; font-size: 14px\\;\">다음시간에 답변해 드리도록 하겠습니다.</p>\\n<p style=\"margin-top: 12px\\; margin-bottom: 10px\\; font-family: LatoWeb\\, Lato\\, \'Helvetica Neue\'\\, Helvetica\\, Arial\\, sans-serif\\; font-size: 14px\\;\">실전예제=Practice exercise</p>\\n<p style=\"margin-top: 12px\\; margin-bottom: 10px\\; font-family: LatoWeb\\, Lato\\, \'Helvetica Neue\'\\, Helvetica\\, Arial\\, sans-serif\\; font-size: 14px\\;\">실전예제 5.2 5.3\\, 5.4 문제도 함께 풀어서 제출하세요.</p>\\n<p style=\"margin-top: 12px\\; margin-bottom: 10px\\; font-family: LatoWeb\\, Lato\\, \'Helvetica Neue\'\\, Helvetica\\, Arial\\, sans-serif\\; font-size: 14px\\;\">오른쪽 상단에 학번\\, 이름을 적으세요. pdf 혹은 jpg\\, png 파일로 업로드하기 바랍니다.</p>',1,'2022-05-20'),(1298,29,919740,'이산구조 QnA 0523',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/919740',NULL,1,'2022-05-23'),(1299,29,918762,'EppDm4_10_01',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/918762',NULL,1,'2022-05-23'),(1300,29,918763,'EppDm4_10_02',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/918763',NULL,1,'2022-05-23'),(1301,29,914056,'소웨사12주차',30517,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/30517/assignments/914056',NULL,1,'2022-05-25'),(1302,29,919309,'학술에세이 초고안-2차',30038,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/30038/assignments/919309',NULL,1,'2022-05-25'),(1303,29,918994,'EppDm4_10_03',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/918994',NULL,1,'2022-05-25'),(1304,29,918995,'EppDm4_10_04',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/918995',NULL,1,'2022-05-25'),(1305,29,918998,'EppDm4_10_05',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/918998',NULL,1,'2022-05-25'),(1306,29,926196,'5월27일 수업: 12주차 연습문제 풀이',27373,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/27373/assignments/926196',NULL,1,'2022-05-27'),(1307,29,930128,'이산구조 QnA 0530',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/930128',NULL,1,'2022-05-30'),(1308,29,929107,'EppDm4_10_06',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/929107',NULL,1,'2022-05-30'),(1309,29,929108,'EppDm4_10_07',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/929108',NULL,1,'2022-05-30'),(1310,29,929109,'EppDm4_11_01',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/929109',NULL,1,'2022-05-30'),(1311,29,924621,'소웨사13주차',30517,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/30517/assignments/924621',NULL,1,'2022-06-01'),(1312,29,934368,'이산구조 퀴즈 0601',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/934368','<p><a class=\"description_file_attachment\" href=\"https://khcanvas.khu.ac.kr/courses/28193/files/4078317/download?download_frd=1\" data-api-endpoint=\"https://khcanvas.khu.ac.kr/api/v1/courses/28193/files/4078317\" data-api-returntype=\"File\"><span class=\"description_file_name\">이산구조 퀴즈 0601.pdf</span></a></p>',1,'2022-06-01'),(1313,29,935164,'학술에세이',30038,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/30038/assignments/935164','ㅂ',1,'2022-06-01'),(1314,29,929110,'EppDm4_11_02',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/929110',NULL,1,'2022-06-01'),(1315,29,929112,'EppDm4_11_02',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/929112',NULL,1,'2022-06-01'),(1316,29,929111,'EppDm4_11_03',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/929111',NULL,1,'2022-06-01'),(1317,29,929113,'EppDm4_11_03',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/929113',NULL,1,'2022-06-01'),(1318,29,939273,'이산구조 퀴즈 0606',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/939273','<p><a class=\"description_file_attachment\" href=\"https://khcanvas.khu.ac.kr/courses/28193/files/4112359/download?download_frd=1\" data-api-endpoint=\"https://khcanvas.khu.ac.kr/api/v1/courses/28193/files/4112359\" data-api-returntype=\"File\"><span class=\"description_file_name\">이산구조 퀴즈 0606.pdf</span></a></p>',1,'2022-06-06'),(1319,29,937556,'EppDm4_11_04',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/937556',NULL,1,'2022-06-06'),(1320,29,937558,'EppDm4_11_04',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/937558',NULL,1,'2022-06-06'),(1321,29,937557,'EppDm4_11_05',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/937557',NULL,1,'2022-06-06'),(1322,29,937560,'EppDm4_11_05',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/937560',NULL,1,'2022-06-06'),(1323,29,932017,'미적분학-6월1일',27373,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/27373/assignments/932017',NULL,1,'2022-06-07'),(1324,29,932636,'미적분학-5월30일',27373,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/27373/assignments/932636',NULL,1,'2022-06-08'),(1325,29,937564,'EppDm4_12_01',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/937564',NULL,1,'2022-06-08'),(1326,29,937565,'EppDm4_12_02',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/937565',NULL,1,'2022-06-08'),(1327,29,932028,'week14',27373,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/27373/assignments/932028',NULL,1,'2022-06-08'),(1328,29,935005,'소웨사 14주차',30517,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/30517/assignments/935005',NULL,1,'2022-06-09'),(1329,29,921759,'3월2일수업',27373,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/27373/assignments/921759',NULL,1,'2022-06-13'),(1330,29,921783,'3월16일',27373,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/27373/assignments/921783',NULL,1,'2022-06-13'),(1331,29,921787,'3월21일',27373,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/27373/assignments/921787',NULL,1,'2022-06-13'),(1332,29,921807,'3월23일',27373,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/27373/assignments/921807',NULL,1,'2022-06-13'),(1333,29,921821,'3월28일-미적분학',27373,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/27373/assignments/921821',NULL,1,'2022-06-13'),(1334,29,911413,'발표예제파일',28200,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28200/assignments/911413',NULL,1,'2022-06-17'),(1335,29,911416,'실예제파일',28200,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28200/assignments/911416',NULL,1,'2022-06-17'),(1336,29,787701,'Orientation',28200,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28200/assignments/787701',NULL,1,'2022-06-17'),(1337,29,911418,'Term Project 발표',28200,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28200/assignments/911418','<p style=\"margin-bottom: 10px\\; font-family: LatoWeb\\, Lato\\, \'Helvetica Neue\'\\, Helvetica\\, Arial\\, sans-serif\\; font-size: 14px\\;\"><span>PPT로 발표자료를 만드시고\\, 음성 녹음 기능을 활용하여 발표자료에 음성 발표를 포함하도록 해주세요.</span><br><span>동영상으로 발표를 대체하는 것이 아니라\\, <span style=\"font-weight: bold\\;\">음성 녹음 기능을 활용하여 온라인 발표를 진행</span>하도록 하겠습니다.</span><br><span>발표 후에 생길 수 있는 질문 등은 온라인으로 직접 답변 하도록 하겠습니다.</span></p>\\n<p style=\"margin-bottom: 10px\\; font-family: LatoWeb\\, Lato\\, \'Helvetica Neue\'\\, Helvetica\\, Arial\\, sans-serif\\; font-size: 14px\\;\"> </p>\\n<p style=\"margin-bottom: 10px\\; font-family: LatoWeb\\, Lato\\, \'Helvetica Neue\'\\, Helvetica\\, Arial\\, sans-serif\\; font-size: 14px\\;\"><span>모든 사람은 발표자료를 6/9 오후 4시전까지 업로드하셔야 합니다.</span><br><span>공정성을 위하여 해당 시간까지 업로드한 자료를 바탕으로 발표 진행하도록 하겠습니다.</span></p>\\n<p style=\"margin-bottom: 10px\\; font-family: LatoWeb\\, Lato\\, \'Helvetica Neue\'\\, Helvetica\\, Arial\\, sans-serif\\; font-size: 14px\\;\"> </p>\\n<p style=\"margin-bottom: 10px\\; font-family: LatoWeb\\, Lato\\, \'Helvetica Neue\'\\, Helvetica\\, Arial\\, sans-serif\\; font-size: 14px\\;\"><span>파일명은 학번.pptx 형태로 제출해주세요.<br>예) 20201012345.pptx</span></p>',1,'2022-06-17'),(1338,29,911410,'Term Project 안내',28200,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28200/assignments/911410',NULL,1,'2022-06-17'),(1339,29,787536,'url',30517,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/30517/assignments/787536',NULL,1,'2022-06-21');
54 -/*!40000 ALTER TABLE `schedules_date` ENABLE KEYS */;
55 -UNLOCK TABLES;
56 -
57 ---
58 --- Table structure for table `schedules_repeat`
59 ---
60 -
61 -DROP TABLE IF EXISTS `schedules_repeat`;
62 -/*!40101 SET @saved_cs_client = @@character_set_client */;
63 -/*!50503 SET character_set_client = utf8mb4 */;
64 -CREATE TABLE `schedules_repeat` (
65 - `ID` int NOT NULL AUTO_INCREMENT,
66 - `userID` int NOT NULL,
67 - `uid` int DEFAULT NULL,
68 - `label` varchar(100) DEFAULT NULL,
69 - `subjectID` int NOT NULL,
70 - `type` varchar(50) DEFAULT NULL,
71 - `description` varchar(2000) DEFAULT NULL,
72 - `url` varchar(2000) DEFAULT NULL,
73 - `detail` varchar(4000) DEFAULT NULL,
74 - `status` tinyint DEFAULT '1',
75 - `day` tinyint DEFAULT NULL,
76 - `startTime` time DEFAULT NULL,
77 - `endTime` time DEFAULT NULL,
78 - PRIMARY KEY (`ID`),
79 - UNIQUE KEY `schedules_repeat(userID&uid)` (`userID`,`uid`),
80 - KEY `schedules_repeat-subjects` (`subjectID`),
81 - CONSTRAINT `schedules_repeat-subjects` FOREIGN KEY (`subjectID`) REFERENCES `subjects` (`ID`),
82 - CONSTRAINT `schedules_repeat-users` FOREIGN KEY (`userID`) REFERENCES `users` (`ID`)
83 -) ENGINE=InnoDB AUTO_INCREMENT=656 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
84 -/*!40101 SET character_set_client = @saved_cs_client */;
85 -
86 ---
87 --- Dumping data for table `schedules_repeat`
88 ---
89 -
90 -LOCK TABLES `schedules_repeat` WRITE;
91 -/*!40000 ALTER TABLE `schedules_repeat` DISABLE KEYS */;
92 -/*!40000 ALTER TABLE `schedules_repeat` ENABLE KEYS */;
93 -UNLOCK TABLES;
94 -
95 ---
96 --- Table structure for table `schedules_time`
97 ---
98 -
99 -DROP TABLE IF EXISTS `schedules_time`;
100 -/*!40101 SET @saved_cs_client = @@character_set_client */;
101 -/*!50503 SET character_set_client = utf8mb4 */;
102 -CREATE TABLE `schedules_time` (
103 - `ID` int NOT NULL AUTO_INCREMENT,
104 - `userID` int NOT NULL,
105 - `uid` int DEFAULT NULL,
106 - `label` varchar(100) DEFAULT NULL,
107 - `subjectID` int NOT NULL,
108 - `type` varchar(50) DEFAULT NULL,
109 - `description` varchar(2000) DEFAULT NULL,
110 - `url` varchar(2000) DEFAULT NULL,
111 - `detail` varchar(4000) DEFAULT NULL,
112 - `status` tinyint DEFAULT '1',
113 - `date` date NOT NULL,
114 - `startTime` time DEFAULT NULL,
115 - `endTime` time DEFAULT NULL,
116 - PRIMARY KEY (`ID`),
117 - UNIQUE KEY `schedules_time(userID&uid)` (`userID`,`uid`),
118 - KEY `schedules_time-subjects` (`subjectID`),
119 - CONSTRAINT `schedules_time-subjects` FOREIGN KEY (`subjectID`) REFERENCES `subjects` (`ID`),
120 - CONSTRAINT `schedules_time-users` FOREIGN KEY (`userID`) REFERENCES `users` (`ID`)
121 -) ENGINE=InnoDB AUTO_INCREMENT=1053 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
122 -/*!40101 SET character_set_client = @saved_cs_client */;
123 -
124 ---
125 --- Dumping data for table `schedules_time`
126 ---
127 -
128 -LOCK TABLES `schedules_time` WRITE;
129 -/*!40000 ALTER TABLE `schedules_time` DISABLE KEYS */;
130 -INSERT INTO `schedules_time` VALUES (1006,29,897094,'EppDm4_08_05 20강',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/897094',NULL,1,'2022-05-09',NULL,'09:00:00'),(1007,29,897101,'EppDm4_09_01 20강',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/897101',NULL,1,'2022-05-09',NULL,'09:00:00'),(1008,29,898316,'이산구조 퀴즈 0509',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/898316','<p style=\"\\;\"></p><p style=\"\\;\"><span style=\"\\;\" lang=\"EN-US\">[1] </span><span style=\"\\;\">다음의 관계는 각각 반사적인지 대칭적인지 반대칭적인지 추이적 인지 판별하시오</span><span style=\"\\;\" lang=\"EN-US\">.</span></p><p style=\"\\;\"></p><p style=\"\\;\"><span style=\"\\;\" lang=\"EN-US\">R1={(0\\,0)\\, (0\\,1)\\, (0\\,2)\\, (1\\,2)}</span></p><p style=\"\\;\"></p><p style=\"\\;\"><span style=\"\\;\" lang=\"EN-US\">R2={((0\\,0)\\, (1\\,1)\\, (2\\,2)}</span></p><p style=\"\\;\"></p><p style=\"\\;\"><span style=\"\\;\" lang=\"EN-US\">[2]</span></p><p style=\"\\;\"><span style=\"\\;\">반순서 관계를 완전순서관계로 바꾸는 과정을 무엇이라고 부르는가</span><span style=\"\\;\" lang=\"EN-US\">.</span></p><p style=\"\\;\"></p><p style=\"\\;\"><span style=\"\\;\" lang=\"EN-US\">[3]</span></p><p style=\"\\;\"><span lang=\"EN-US\"> </span><span style=\"\\;\">어떤 실험을 하였을 때 그 실험에서 나타느는 경과는 가능한 모든 결과들 중에서 한가지가 나타나며</span><span style=\"\\;\" lang=\"EN-US\">\\, </span><span style=\"\\;\">어떤 결과가 나올지를 사전에 전혀 예측할 수 없는 실험은 무엇이라고 하나</span><span style=\"\\;\" lang=\"EN-US\">? </span></p><p style=\"\\;\"></p><p style=\"\\;\"><span style=\"\\;\" lang=\"EN-US\">[4]</span></p><p style=\"\\;\"><span style=\"\\;\">피타고라스는 기원전 </span><span style=\"\\;\" lang=\"EN-US\">500</span><span style=\"\\;\">년에 사망했다</span><span style=\"\\;\" lang=\"EN-US\">. </span><span style=\"\\;\">올해인 </span><span style=\"\\;\" lang=\"EN-US\">2022</span><span style=\"\\;\">년은 그의 사망 몇년이 되는 해인가요</span><span style=\"\\;\" lang=\"EN-US\">?</span></p>',1,'2022-05-09',NULL,'09:25:00'),(1009,29,897105,'EppDm4_09_02 21강',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/897105',NULL,1,'2022-05-11',NULL,'09:00:00'),(1010,29,897113,'EppDm4_09_03 21강',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/897113',NULL,1,'2022-05-11',NULL,'09:00:00'),(1011,29,897114,'EppDm4_09_04 21강',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/897114',NULL,1,'2022-05-11',NULL,'09:00:00'),(1012,29,902657,'이산구조 퀴즈 0511',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/902657','<p><a class=\"description_file_attachment\" href=\"https://khcanvas.khu.ac.kr/courses/28193/files/3917624/download?download_frd=1\" data-api-endpoint=\"https://khcanvas.khu.ac.kr/api/v1/courses/28193/files/3917624\" data-api-returntype=\"File\"><span class=\"description_file_name\">이산구조 퀴즈 0511.pdf</span></a></p>',1,'2022-05-11',NULL,'09:25:00'),(1013,29,896110,'Virtualization',28200,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28200/assignments/896110',NULL,1,'2022-05-13',NULL,'09:30:00'),(1014,29,777641,'Virtualization-Experiments',28200,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28200/assignments/777641',NULL,1,'2022-05-13',NULL,'09:30:00'),(1015,29,777643,'Virtualization-Experiments',28200,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28200/assignments/777643','<p>도커 파일을 업로드 하세요.</p>\\n<p>예) 학번.Dockerfile</p>\\n<p>202010101010.Dockerfile</p>',1,'2022-05-13',NULL,'09:30:00'),(1016,29,907953,'EppDm4_09_05',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/907953',NULL,1,'2022-05-16',NULL,'09:00:00'),(1017,29,907954,'EppDM4_09_06',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/907954',NULL,1,'2022-05-16',NULL,'09:00:00'),(1018,29,907957,'EppDM4_09_06',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/907957',NULL,1,'2022-05-16',NULL,'09:00:00'),(1019,29,907955,'EppDm4_09_07',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/907955',NULL,1,'2022-05-16',NULL,'09:00:00'),(1020,29,908010,'이산구조 퀴즈 0516',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/908010','<p><a class=\"description_file_attachment\" href=\"https://khcanvas.khu.ac.kr/courses/28193/files/3941607/download?download_frd=1\" data-api-endpoint=\"https://khcanvas.khu.ac.kr/api/v1/courses/28193/files/3941607\" data-api-returntype=\"File\"><span class=\"description_file_name\">이산구조 퀴즈 0516.pdf</span></a></p>',1,'2022-05-16',NULL,'09:25:00'),(1021,29,907960,'EppDm4_09_08',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/907960',NULL,1,'2022-05-18',NULL,'09:00:00'),(1022,29,907961,'EppDm4_09_09',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/907961',NULL,1,'2022-05-18',NULL,'09:00:00'),(1023,29,777651,'Cloud Computing',28200,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28200/assignments/777651',NULL,1,'2022-05-20',NULL,'09:30:00'),(1024,29,777654,'Cloud Computing-Experiments',28200,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28200/assignments/777654',NULL,1,'2022-05-20',NULL,'09:30:00'),(1025,29,918760,'EppDm4_10_01',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/918760',NULL,1,'2022-05-23',NULL,'09:00:00'),(1026,29,918761,'EppDm4_10_02',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/918761',NULL,1,'2022-05-23',NULL,'09:00:00'),(1027,29,919701,'이산구조 퀴즈 0523',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/919701','<p><a class=\"description_file_attachment\" href=\"https://khcanvas.khu.ac.kr/courses/28193/files/4005111/download?download_frd=1\" data-api-endpoint=\"https://khcanvas.khu.ac.kr/api/v1/courses/28193/files/4005111\" data-api-returntype=\"File\"><span class=\"description_file_name\">이산구조 퀴즈 0523.pdf</span></a></p>',1,'2022-05-23',NULL,'09:30:00'),(1028,29,914629,'미적분학5월18일',27373,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/27373/assignments/914629',NULL,1,'2022-05-23',NULL,'15:00:00'),(1029,29,918991,'EppDm4_10_04',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/918991',NULL,1,'2022-05-24',NULL,'08:59:00'),(1030,29,918993,'EppDm4_10_05',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/918993',NULL,1,'2022-05-24',NULL,'08:59:00'),(1031,29,918988,'EppDm4_10_03',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/918988',NULL,1,'2022-05-25',NULL,'09:00:00'),(1032,29,924007,'이산구조 Quiz 0525',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/924007','<p><a class=\"description_file_attachment\" href=\"https://khcanvas.khu.ac.kr/courses/28193/files/4021843/download?download_frd=1\" data-api-endpoint=\"https://khcanvas.khu.ac.kr/api/v1/courses/28193/files/4021843\" data-api-returntype=\"File\"><span class=\"description_file_name\">이산구조 Quiz 0525.pdf</span></a></p>',1,'2022-05-25',NULL,'09:25:00'),(1033,29,911391,'Chatbot01',28200,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28200/assignments/911391',NULL,1,'2022-05-27',NULL,'09:30:00'),(1034,29,911397,'Chatbot01-Experiments',28200,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28200/assignments/911397','<p><span style=\"font-family: LatoWeb\\, Lato\\, \'Helvetica Neue\'\\, Helvetica\\, Arial\\, sans-serif\\; font-size: 14px\\;\">스크린캡쳐한 파일을 제출하세요.</span></p>\\n<p> </p>\\n<p><span style=\"font-family: LatoWeb\\, Lato\\, \'Helvetica Neue\'\\, Helvetica\\, Arial\\, sans-serif\\; font-size: 14px\\;\">20201010101.jpg or png</span></p>',1,'2022-05-27',NULL,'09:30:00'),(1035,29,911392,'Chatbot01-Expreiment',28200,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28200/assignments/911392',NULL,1,'2022-05-27',NULL,'09:30:00'),(1036,29,777660,'Cloud Computing-Experiments',28200,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28200/assignments/777660','<p>스크린캡쳐한 파일을 압축하여 제출하세요.</p>\\n<p>예) 학번.zip</p>\\n<p>202010101.zip</p>',1,'2022-05-27',NULL,'09:30:00'),(1037,29,929104,'EppDm4_10_06',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/929104',NULL,1,'2022-05-29',NULL,'08:59:00'),(1038,29,929105,'EppDm4_10_07',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/929105',NULL,1,'2022-05-29',NULL,'08:59:00'),(1039,29,929106,'EppDm4_11_01',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/929106',NULL,1,'2022-05-29',NULL,'08:59:00'),(1040,29,929413,'이산구조 퀴즈 0530',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/929413','<p><a class=\"description_file_attachment\" href=\"https://khcanvas.khu.ac.kr/courses/28193/files/4049727/download?download_frd=1\" data-api-endpoint=\"https://khcanvas.khu.ac.kr/api/v1/courses/28193/files/4049727\" data-api-returntype=\"File\"><span class=\"description_file_name\">이산구조 퀴즈 0530.pdf</span></a></p>',1,'2022-05-30',NULL,'09:30:00'),(1041,29,924884,'미적분학5월25일',27373,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/27373/assignments/924884',NULL,1,'2022-05-30',NULL,'15:00:00'),(1042,29,936337,'2차시험 분반 1',28985,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28985/assignments/936337','',1,'2022-06-02',NULL,'11:35:00'),(1043,29,936340,'2차시험 분반 2',28985,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28985/assignments/936340','',1,'2022-06-02',NULL,'11:35:00'),(1044,29,936343,'2차시험 분반 3',28985,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28985/assignments/936343','',1,'2022-06-02',NULL,'11:35:00'),(1045,29,936346,'2차시험 분반 4',28985,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28985/assignments/936346','',1,'2022-06-02',NULL,'11:35:00'),(1046,29,911400,'Chatbot02',28200,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28200/assignments/911400',NULL,1,'2022-06-03',NULL,'09:30:00'),(1047,29,911403,'Chatbot02-Experiments',28200,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28200/assignments/911403','<p style=\"margin-bottom: 10px\\; font-family: LatoWeb\\, Lato\\, \'Helvetica Neue\'\\, Helvetica\\, Arial\\, sans-serif\\; font-size: 14px\\;\">소스 파일을 txt로 변경하여 제출하시오</p>\\n<p style=\"margin-bottom: 10px\\; font-family: LatoWeb\\, Lato\\, \'Helvetica Neue\'\\, Helvetica\\, Arial\\, sans-serif\\; font-size: 14px\\;\">예) 학번.txt</p>\\n<p style=\"margin-bottom: 10px\\; font-family: LatoWeb\\, Lato\\, \'Helvetica Neue\'\\, Helvetica\\, Arial\\, sans-serif\\; font-size: 14px\\;\">20201010101.txt</p>',1,'2022-06-03',NULL,'09:30:00'),(1048,29,911401,'Chatbot02-Expreiment',28200,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28200/assignments/911401',NULL,1,'2022-06-03',NULL,'09:30:00'),(1049,29,937562,'EppDm4_12_01',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/937562',NULL,1,'2022-06-07',NULL,'08:59:00'),(1050,29,937563,'EppDm4_12_02',28193,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28193/assignments/937563',NULL,1,'2022-06-07',NULL,'08:59:00'),(1051,29,911405,'LinuxAdministration',28200,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28200/assignments/911405',NULL,1,'2022-06-10',NULL,'09:30:00'),(1052,29,911406,'LinuxAdministration-Experiments',28200,'assignment',NULL,'https://khcanvas.khu.ac.kr/courses/28200/assignments/911406',NULL,1,'2022-06-10',NULL,'09:30:00');
131 -/*!40000 ALTER TABLE `schedules_time` ENABLE KEYS */;
132 -UNLOCK TABLES;
133 -
134 ---
135 --- Table structure for table `subjects`
136 ---
137 -
138 -DROP TABLE IF EXISTS `subjects`;
139 -/*!40101 SET @saved_cs_client = @@character_set_client */;
140 -/*!50503 SET character_set_client = utf8mb4 */;
141 -CREATE TABLE `subjects` (
142 - `ID` int NOT NULL,
143 - `name` text,
144 - PRIMARY KEY (`ID`)
145 -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
146 -/*!40101 SET character_set_client = @saved_cs_client */;
147 -
148 ---
149 --- Dumping data for table `subjects`
150 ---
151 -
152 -LOCK TABLES `subjects` WRITE;
153 -/*!40000 ALTER TABLE `subjects` DISABLE KEYS */;
154 -INSERT INTO `subjects` VALUES (27373,' 미분적분학 19분반'),(28193,' 이산구조 01분반'),(28200,' 오픈소스SW개발 00분반'),(28971,' 논리회로 01분반'),(28985,' 확률및랜덤변수 05분반'),(30038,' 주제연구 G29분반'),(30517,' 소프트웨어적사유 G01분반');
155 -/*!40000 ALTER TABLE `subjects` ENABLE KEYS */;
156 -UNLOCK TABLES;
157 -
158 ---
159 --- Table structure for table `user-subject`
160 ---
161 -
162 -DROP TABLE IF EXISTS `user-subject`;
163 -/*!40101 SET @saved_cs_client = @@character_set_client */;
164 -/*!50503 SET character_set_client = utf8mb4 */;
165 -CREATE TABLE `user-subject` (
166 - `userID` int DEFAULT NULL,
167 - `subjectID` int DEFAULT NULL,
168 - `nickname` varchar(255) DEFAULT NULL,
169 - `status` tinyint DEFAULT NULL,
170 - `color` char(6) DEFAULT NULL,
171 - UNIQUE KEY `uk` (`userID`,`subjectID`),
172 - KEY `subjectID` (`subjectID`),
173 - CONSTRAINT `user-subject_ibfk_1` FOREIGN KEY (`userID`) REFERENCES `users` (`ID`),
174 - CONSTRAINT `user-subject_ibfk_2` FOREIGN KEY (`subjectID`) REFERENCES `subjects` (`ID`)
175 -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
176 -/*!40101 SET character_set_client = @saved_cs_client */;
177 -
178 ---
179 --- Dumping data for table `user-subject`
180 ---
181 -
182 -LOCK TABLES `user-subject` WRITE;
183 -/*!40000 ALTER TABLE `user-subject` DISABLE KEYS */;
184 -INSERT INTO `user-subject` VALUES (29,28971,NULL,1,'3ADF00'),(29,27373,NULL,1,'0040FF'),(29,30517,NULL,1,'FF0000'),(29,28200,NULL,1,'FFFF00'),(29,28193,NULL,1,'FF00FF'),(29,30038,NULL,1,'FF8000'),(29,28985,NULL,1,'6E6E6E');
185 -/*!40000 ALTER TABLE `user-subject` ENABLE KEYS */;
186 -UNLOCK TABLES;
187 -
188 ---
189 --- Table structure for table `users`
190 ---
191 -
192 -DROP TABLE IF EXISTS `users`;
193 -/*!40101 SET @saved_cs_client = @@character_set_client */;
194 -/*!50503 SET character_set_client = utf8mb4 */;
195 -CREATE TABLE `users` (
196 - `ID` int NOT NULL AUTO_INCREMENT,
197 - `name` varchar(40) DEFAULT NULL,
198 - `loginID` varchar(255) DEFAULT NULL,
199 - `loginPW` varchar(500) DEFAULT NULL,
200 - `ical` varchar(1000) DEFAULT NULL,
201 - PRIMARY KEY (`ID`)
202 -) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
203 -/*!40101 SET character_set_client = @saved_cs_client */;
204 -
205 ---
206 --- Dumping data for table `users`
207 ---
208 -
209 -LOCK TABLES `users` WRITE;
210 -/*!40000 ALTER TABLE `users` DISABLE KEYS */;
211 -INSERT INTO `users` VALUES (29,'undefined','good1588','34b3a7cca3df2887b2f84f5a5e677ff2c199f16c601cb7fad251c6e276eeb05f','https://khcanvas.khu.ac.kr/feeds/calendars/user_YzxoryVh1hAQTeUJRljeaYavgmw1OXEGKIzNVpnI.ics');
212 -/*!40000 ALTER TABLE `users` ENABLE KEYS */;
213 -UNLOCK TABLES;
214 -/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
215 -
216 -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
217 -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
218 -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
219 -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
220 -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
221 -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
222 -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
223 -
224 --- Dump completed on 2022-06-07 14:19:53
...@@ -4,24 +4,19 @@ const cors = require("cors"); ...@@ -4,24 +4,19 @@ const cors = require("cors");
4 4
5 const loginRouter = require("./routers/Login"); 5 const loginRouter = require("./routers/Login");
6 const dbRouter = require("./routers/DB"); 6 const dbRouter = require("./routers/DB");
7 +const path = require("path");
7 8
8 const app = express(); 9 const app = express();
9 10
10 app.use( 11 app.use(
11 cors({ 12 cors({
12 - origin: "http://localhost:3000", 13 + origin: "http://3.34.173.161:3000",
13 credentials: true, 14 credentials: true,
14 }) 15 })
15 ); 16 );
16 -// app.use(bodyParser.urlencoded({ extended: false }));
17 -// app.use(bodyParser.json());
18 app.use(express.json()); 17 app.use(express.json());
19 app.use(express.urlencoded({ extended: true })); 18 app.use(express.urlencoded({ extended: true }));
20 19
21 -app.post("/", (req, res) => {
22 - console.log("/");
23 -});
24 -
25 app.use("/login", loginRouter); 20 app.use("/login", loginRouter);
26 app.use("/db", dbRouter); 21 app.use("/db", dbRouter);
27 22
...@@ -43,6 +38,11 @@ app.use("/db", dbRouter); ...@@ -43,6 +38,11 @@ app.use("/db", dbRouter);
43 // } else console.log("Incorrect user ID or password."); 38 // } else console.log("Incorrect user ID or password.");
44 // }); 39 // });
45 40
41 +// app.use(express.static(path.join(__dirname, '../build')));
42 +// app.get('*', function (요청, 응답) {
43 +// 응답.sendFile(path.join(__dirname, '../build/index.html'));
44 +// });
45 +
46 app.listen(3001, function () { 46 app.listen(3001, function () {
47 console.log("listening on 3001"); 47 console.log("listening on 3001");
48 }); 48 });
......
...@@ -30,15 +30,15 @@ const GridItem = ({ targetDate }) => { ...@@ -30,15 +30,15 @@ const GridItem = ({ targetDate }) => {
30 day: targetDate.getDay(), 30 day: targetDate.getDay(),
31 }; 31 };
32 const { data: scdate } = await axios.get( 32 const { data: scdate } = await axios.get(
33 - "http://localhost:3001/db/schedules_date", 33 + "http://3.34.173.161:3001/db/schedules_date",
34 { params } 34 { params }
35 ); 35 );
36 const { data: sctime } = await axios.get( 36 const { data: sctime } = await axios.get(
37 - "http://localhost:3001/db/schedules_time", 37 + "http://3.34.173.161:3001/db/schedules_time",
38 { params } 38 { params }
39 ); 39 );
40 const { data: scrpeat } = await axios.get( 40 const { data: scrpeat } = await axios.get(
41 - "http://localhost:3001/db/schedules_repeat", 41 + "http://3.34.173.161:3001/db/schedules_repeat",
42 { params } 42 { params }
43 ); 43 );
44 const subs = await localforage.getItem("subjects"); 44 const subs = await localforage.getItem("subjects");
...@@ -58,7 +58,7 @@ const GridItem = ({ targetDate }) => { ...@@ -58,7 +58,7 @@ const GridItem = ({ targetDate }) => {
58 const finishSchedule = async (table, uid) => { 58 const finishSchedule = async (table, uid) => {
59 for (const i in schedules) 59 for (const i in schedules)
60 if (schedules[i].uid === uid) { 60 if (schedules[i].uid === uid) {
61 - await axios.delete("http://localhost:3001/db/schedule", { 61 + await axios.delete("http://3.34.173.161:3001/db/schedule", {
62 data: { 62 data: {
63 table, 63 table,
64 uid, 64 uid,
...@@ -81,7 +81,7 @@ const GridItem = ({ targetDate }) => { ...@@ -81,7 +81,7 @@ const GridItem = ({ targetDate }) => {
81 const table = 81 const table =
82 state.startTime || state.endTime ? "schedules_time" : "schedules_date"; 82 state.startTime || state.endTime ? "schedules_time" : "schedules_date";
83 const { data: sche } = await axios.post( 83 const { data: sche } = await axios.post(
84 - "http://localhost:3001/db/" + table, 84 + "http://3.34.173.161:3001/db/" + table,
85 { 85 {
86 userID: await localforage.getItem("userID"), 86 userID: await localforage.getItem("userID"),
87 ...state, 87 ...state,
......
...@@ -16,7 +16,7 @@ const render = (subsObj, args) => { ...@@ -16,7 +16,7 @@ const render = (subsObj, args) => {
16 case "CHECKED": 16 case "CHECKED":
17 sub = subsObj[args.subjectID]; 17 sub = subsObj[args.subjectID];
18 sub.status = !sub.status; 18 sub.status = !sub.status;
19 - axios.put("http://localhost:3001/db/user-subject/check", { 19 + axios.put("http://3.34.173.161:3001/db/user-subject/check", {
20 userID: sub.userID, 20 userID: sub.userID,
21 subjectID: args.subjectID, 21 subjectID: args.subjectID,
22 status: +sub.status, 22 status: +sub.status,
...@@ -26,7 +26,7 @@ const render = (subsObj, args) => { ...@@ -26,7 +26,7 @@ const render = (subsObj, args) => {
26 sub = subsObj[args.subjectID]; 26 sub = subsObj[args.subjectID];
27 sub.nickname = args.nickname; 27 sub.nickname = args.nickname;
28 sub.color = args.color; 28 sub.color = args.color;
29 - axios.put("http://localhost:3001/db/user-subject/modify", { 29 + axios.put("http://3.34.173.161:3001/db/user-subject/modify", {
30 userID: sub.userID, 30 userID: sub.userID,
31 subjectID: args.subjectID, 31 subjectID: args.subjectID,
32 nickname: sub.nickname, 32 nickname: sub.nickname,
...@@ -41,7 +41,7 @@ const render = (subsObj, args) => { ...@@ -41,7 +41,7 @@ const render = (subsObj, args) => {
41 }; 41 };
42 42
43 const Calendar = () => { 43 const Calendar = () => {
44 - console.log("visit Calendar"); 44 + // console.log("visit Calendar");
45 45
46 const [state, setState] = useState({ 46 const [state, setState] = useState({
47 scope: "month", 47 scope: "month",
...@@ -56,7 +56,7 @@ const Calendar = () => { ...@@ -56,7 +56,7 @@ const Calendar = () => {
56 // get user's subjects 56 // get user's subjects
57 const userID = await localforage.getItem("userID"); 57 const userID = await localforage.getItem("userID");
58 const { data: subjects } = await axios.get( 58 const { data: subjects } = await axios.get(
59 - "http://localhost:3001/db/user-subject", 59 + "http://3.34.173.161:3001/db/user-subject",
60 { params: { userID } } 60 { params: { userID } }
61 ); 61 );
62 await localforage.setItem("subjects", subjects); 62 await localforage.setItem("subjects", subjects);
......
...@@ -6,7 +6,7 @@ import { useNavigate } from "react-router-dom"; ...@@ -6,7 +6,7 @@ import { useNavigate } from "react-router-dom";
6 import "../styles/Debug.css"; 6 import "../styles/Debug.css";
7 7
8 const Debug = () => { 8 const Debug = () => {
9 - console.log("visit Debug"); 9 + // console.log("visit Debug");
10 10
11 const [state, setState] = useState({ 11 const [state, setState] = useState({
12 type: "login", 12 type: "login",
...@@ -23,25 +23,25 @@ const Debug = () => { ...@@ -23,25 +23,25 @@ const Debug = () => {
23 }; 23 };
24 24
25 const handleSubmit = async (e) => { 25 const handleSubmit = async (e) => {
26 - let result; 26 + // let result;
27 - switch (state.type) { 27 + // switch (state.type) {
28 - case "login": 28 + // case "login":
29 - //result = login(state.input1, state.input2); 29 + // //result = login(state.input1, state.input2);
30 - break; 30 + // break;
31 - case "server": 31 + // case "server":
32 - setState({ ...state, output: "loading..." }); 32 + // setState({ ...state, output: "loading..." });
33 - axios 33 + // axios
34 - .post("http://localhost:3001/login/", { 34 + // .post("http://3.34.173.161:3001/login/", {
35 - id: state.input1, 35 + // id: state.input1,
36 - pw: state.input2, 36 + // pw: state.input2,
37 - }) 37 + // })
38 - .then((res) => { 38 + // .then((res) => {
39 - setState({ ...state, output: res.data }); 39 + // setState({ ...state, output: res.data });
40 - }); 40 + // });
41 - return; 41 + // return;
42 - default: 42 + // default:
43 - } 43 + // }
44 - setState({ ...state, output: result }); 44 + // setState({ ...state, output: result });
45 }; 45 };
46 46
47 const navigate = useNavigate(); 47 const navigate = useNavigate();
......
...@@ -3,7 +3,7 @@ import { useEffect } from "react"; ...@@ -3,7 +3,7 @@ import { useEffect } from "react";
3 import { useNavigate } from "react-router-dom"; 3 import { useNavigate } from "react-router-dom";
4 4
5 const Home = () => { 5 const Home = () => {
6 - console.log("visit Home"); 6 + // console.log("visit Home");
7 7
8 const navigate = useNavigate(); 8 const navigate = useNavigate();
9 useEffect(() => { 9 useEffect(() => {
......
...@@ -7,7 +7,7 @@ import axios from "axios"; ...@@ -7,7 +7,7 @@ import axios from "axios";
7 import cryptoJs from "crypto-js"; 7 import cryptoJs from "crypto-js";
8 8
9 const Login = () => { 9 const Login = () => {
10 - console.log("visit Login"); 10 + // console.log("visit Login");
11 const [state, setState] = useState({ 11 const [state, setState] = useState({
12 id: "", 12 id: "",
13 pw: "", 13 pw: "",
...@@ -25,19 +25,23 @@ const Login = () => { ...@@ -25,19 +25,23 @@ const Login = () => {
25 const login = async () => { 25 const login = async () => {
26 setState({ ...state, btn: "Login..." }); 26 setState({ ...state, btn: "Login..." });
27 const { data: userDBID } = await axios.get( 27 const { data: userDBID } = await axios.get(
28 - "http://localhost:3001/db/users", 28 + "http://3.34.173.161:3001/db/users",
29 - { 29 + { params: { loginID: state.id } }
30 - params: {
31 - loginID: state.id,
32 - },
33 - }
34 ); 30 );
35 -
36 if (userDBID) { 31 if (userDBID) {
37 - //pass crawling 32 + //pass crawling, just ical
33 + const { data: peed } = await axios.get(
34 + "http://3.34.173.161:3001/db/users/ical",
35 + { params: { ID: userDBID } }
36 + );
37 + await axios.put("http://3.34.173.161:3001/db/ical", {
38 + userID: userDBID,
39 + peed: peed.ical,
40 + });
41 +
38 const hashpw = cryptoJs.SHA256(state.pw).toString(); 42 const hashpw = cryptoJs.SHA256(state.pw).toString();
39 const { data: isCorrectPW } = await axios.get( 43 const { data: isCorrectPW } = await axios.get(
40 - "http://localhost:3001/db/users/check", 44 + "http://3.34.173.161:3001/db/users/check",
41 { 45 {
42 params: { loginID: state.id, loginPW: hashpw }, 46 params: { loginID: state.id, loginPW: hashpw },
43 } 47 }
...@@ -53,7 +57,7 @@ const Login = () => { ...@@ -53,7 +57,7 @@ const Login = () => {
53 } else { 57 } else {
54 //crawling 58 //crawling
55 const { data: loginResult } = await axios.post( 59 const { data: loginResult } = await axios.post(
56 - "http://localhost:3001/login/", 60 + "http://3.34.173.161:3001/login/",
57 { 61 {
58 id: state.id, 62 id: state.id,
59 pw: state.pw, 63 pw: state.pw,
......
...@@ -4,7 +4,7 @@ import { Navigate, useNavigate } from "react-router-dom"; ...@@ -4,7 +4,7 @@ import { Navigate, useNavigate } from "react-router-dom";
4 import "../styles/Settings.css"; 4 import "../styles/Settings.css";
5 5
6 const Settings = () => { 6 const Settings = () => {
7 - console.log("visit Settings"); 7 + // console.log("visit Settings");
8 8
9 const session = localforage.getItem("session"); 9 const session = localforage.getItem("session");
10 10
......