<div align=center>

![logo](https://github.com/MINI-TEAM3/mini3-server/assets/128345842/b31a2646-1182-45ef-9bac-7f2c4e6859e9)

# [๐Ÿฅ ๋‹ฅํ„ฐ์บ˜ (Dr.Cal)](https://drcal.netlify.app)
**๋‹ฅํ„ฐ์บ˜์„ ๋ˆ„๋ฅด๋ฉด ๋ฐฐํฌ๋œ ์‚ฌ์ดํŠธ๋กœ ์ด๋™ํ•ฉ๋‹ˆ๋‹ค**
### [๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘ง Front-End Repository](https://github.com/MINI-TEAM3/client)
### [๐ŸŒ Dr.Cal(admin)](https://drcal-admin.netlify.app)

**``` ํšŒ์›๊ฐ€์ž… ์š”์ฒญ ์Šน์ธ ์™ธ์—๋Š” ์‚ฌ์šฉ์„ ์ž์ œํ•ด ์ฃผ์„ธ์š” ```**

|์„œ์šธ๋Œ€ํ•™๊ต ๋ณ‘์›|์—ฐ์„ธ ์„ธ๋ธŒ๋ž€์Šค ๋ณ‘์›|๊ณ ๋ ค๋Œ€ํ•™๊ต ์•ˆ์•”๋ณ‘์›|
|:----:|:----:|:----:|
|admin@doctorcal.com|admin2@doctorcal.com|admin3@doctorcal.com|
|12345678|12345678|12345678|

### ๐ŸŽž๏ธ ํ”„๋กœ์ ํŠธ ์‹œ์—ฐ ์˜์ƒ

[![Video Label](http://img.youtube.com/vi/-bGH_dDcfH8/0.jpg)](https://youtu.be/-bGH_dDcfH8?si=zWJW0cSp2CfjvPSj)

</div>
<br><br>

## ๐Ÿ—“๏ธ ํ”„๋กœ์ ํŠธ ์†Œ๊ฐœ
> **๊ฐœ์š”** : ๋Œ€ํ•™๋ณ‘์› ์˜์‚ฌ๋“ค์„ ์œ„ํ•œ ์‰ฝ๊ณ  ๋น ๋ฅธ ๋‹น์ง, ์—ฐ์ฐจ ๊ด€๋ฆฌ ์„œ๋น„์Šค์ž…๋‹ˆ๋‹ค. <br/>
> **๊ธฐ๊ฐ„** : 2023. 07. 24. ~ 2023. 08. 11. <br/>
> **๊ธฐํƒ€** : ํŒจ์ŠคํŠธ์บ ํผ์Šค ๋ถ€ํŠธ์บ ํ”„์˜ ํ”„๋ก ํŠธ์—”๋“œ&๋ฐฑ์—”๋“œ ๋ฏธ๋‹ˆํ”„๋กœ์ ํŠธ ํ˜‘์—…์œผ๋กœ ๋งŒ๋“ค์–ด์ง„ ์„œ๋น„์Šค์ž…๋‹ˆ๋‹ค. <br/>

<p align=center>
<img src="https://img.shields.io/github/issues/MINI-TEAM3/mini3-server?style=flat"/>
<img src="https://img.shields.io/github/issues-closed/MINI-TEAM3/mini3-server?style=flat"/>
<img src="https://img.shields.io/github/last-commit/MINI-TEAM3/mini3-server?style=flat"/>
</p>
<br><br>

## ๐Ÿ‘ค ํ”„๋กœ์ ํŠธ ํŒ€์›
|                                          **[์†กํƒœํ˜•](https://github.com/Ussu1112) (ํŒ€์žฅ)**                                          |                                             **[์†ก์ •ํ˜ธ](https://github.com/sdfgx123)**                                             |                                             **[์ตœํ•ด์†”](https://github.com/atsunsetree)**                                              |                                           **[๊น€์ค€ํฌ](https://github.com/dev-junehee) (ํŒ€์žฅ)**                                           |                                             **[๊น€๋‹ค์Šฌ](https://github.com/7581058)**                                              |                                             **[์ž„์Šน์ด](https://github.com/doitidey)**                                              |
|:-----------------------------------------------------------------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------------------------------:|
|                                                              BE                                                               |                                                            BE                                                             |                                                              BE                                                               |                                                                 FE                                                                 |                                                               FE                                                               |                                                               FE                                                                |
| <a href="https://github.com/Ussu1112"><img src="https://avatars.githubusercontent.com/u/42778315?v=4" width=150px alt="์†กํƒœํ˜•"/> | <a href="https://github.com/sdfgx123"><img src="https://avatars.githubusercontent.com/u/64997246?v=4" width=150px alt="์†ก์ •ํ˜ธ" /> | <a href="https://github.com/atsunsetree"><img src="https://avatars.githubusercontent.com/u/128345842?v=4" width=150px alt="์ตœํ•ด์†”" /> | <a href="https://github.com/dev-junehee"><img src="https://avatars.githubusercontent.com/u/116873887?v=4" width=150px alt="๊น€์ค€ํฌ" /> | <a href="https://github.com/7581058"><img src="https://avatars.githubusercontent.com/u/100559990?v=4" width=150px alt="๊น€๋‹ค์Šฌ" /> | <a href="https://github.com/doitidey"><img src="https://avatars.githubusercontent.com/u/128357188?v=4" width=150px alt="์ž„์Šน์ด" /> |
<br>

## ๐Ÿชง ์—ญํ•  ๋ถ„๋‹ด

| ์†ก์ •ํ˜ธ  |          ์†กํƒœํ˜•(ํŒ€์žฅ)           |   ์ตœํ•ด์†”    |
|:----------------------:|:----------------------:|:----------------------:|
| DB ๊ด€๋ฆฌ </br> AWS ๋ฐฐํฌ </br> ํ…Œ์ด๋ธ” ์„ค๊ณ„ </br> User ๊ด€๋ จ API ๋‹ด๋‹น </br> - ํšŒ์›๊ฐ€์ž… </br> - ๋กœ๊ทธ์ธ, ๋กœ๊ทธ์•„์›ƒ </br> - ๊ฐœ์ธ์ •๋ณด ์กฐํšŒ </br> - ๊ฐœ์ธ์ •๋ณด ์ˆ˜์ • </br>- ๋น„๋ฐ€๋ฒˆํ˜ธ ๋ณ€๊ฒฝ | ํ…Œ์ด๋ธ” ์„ค๊ณ„ </br> Admin ๊ด€๋ จ API ๋‹ด๋‹น </br> - ์‚ฌ์šฉ์ž ๊ด€๋ฆฌ </br> - ํšŒ์›๊ฐ€์ž… ์Šน์ธ, ์š”์ฒญ ๋ฆฌ์ŠคํŠธ ์กฐํšŒ </br> - ์œ ์ € ๊ถŒํ•œ, ์žฌ์ง ์ƒํƒœ ์ˆ˜์ • </br> - ๋‹น์ง, ์—ฐ์ฐจ ์š”์ฒญ ๋ฆฌ์ŠคํŠธ ์กฐํšŒ </br> - ๋‹น์ง, ์—ฐ์ฐจ ์Šน์ธ/๋ฐ˜๋ ค ์ฒ˜๋ฆฌ </br> - ๋ณ‘์› ๋ฆฌ์ŠคํŠธ ์กฐํšŒ </br> - ๋ณ‘์›๋ณ„ ๊ณผ(ํŒŒํŠธ), ์˜์‚ฌ ์กฐํšŒ </br> - ๊ด€๋ฆฌ์ž ๋‹น์ง ์ถ”๊ฐ€/์‚ญ์ œ </br> | ํ…Œ์ด๋ธ” ์„ค๊ณ„ </br> Calendar ๊ด€๋ จ API ๋‹ด๋‹น </br> - ๋„๋ฉ”์ธ ์„ค๊ณ„ </br> - ๋ฉ”์ธ ์บ˜๋ฆฐ๋” ์กฐํšŒ </br> - ์—ฐ์ฐจ ๋“ฑ๋ก  </br> - ์—ฐ์ฐจ ์ˆ˜์ •  </br> - ์—ฐ์ฐจ ์‚ญ์ œ |

<br></br>

## ๐Ÿ› ๏ธ๏ธ ์‚ฌ์šฉ๊ธฐ์ˆ  ๋ฐ ๊ฐœ๋ฐœํ™˜๊ฒฝ

**Back-End** 
<p>

![Java](https://img.shields.io/badge/java11-007396?style=flat&logo=java&logoColor=white)
![SpringBoot](https://img.shields.io/badge/SpringBoot-6DB33F?style=flat&logo=springboot&logoColor=white)
![Spring Security](https://img.shields.io/badge/Spring_Security-6DB33F?style=flat&logo=springsecurity&logoColor=white)
![MySQL](https://img.shields.io/badge/MySQL-4479A1?style=flat&logo=mysql&logoColor=white)
![Gradle](https://img.shields.io/badge/Gradle-02303A?style=flat&logo=gradle&logoColor=white)
![JPA](https://img.shields.io/badge/JPA-527FFF?style=flat&logo=java&logoColor=white)
![IntelliJ IDEA](https://img.shields.io/badge/IntelliJ_IDEA-000000?style=flat&logo=intellijidea&logoColor=white)
</p>

**Front-End**
<p>
<img src="https://img.shields.io/badge/React-61DAFB?style=flat&logo=React&logoColor=white" />
<img src="https://img.shields.io/badge/TypeScript-3178C6?style=flat&logo=TypeScript&logoColor=white" />
<img src="https://img.shields.io/badge/styledcomponents-DB7093?style=flat&logo=styledcomponents&logoColor=white" />
<img src="https://img.shields.io/badge/Chart.js-FF6384?style=flat&logo=chartdotjs&logoColor=white" />
<img src="https://img.shields.io/badge/Ant Design-0170FE?style=flat&logo=antdesign&logoColor=white" />
<img src="https://img.shields.io/badge/Zustand-000000?style=flat&logo=Zustand&logoColor=white" />
</p>

**Deployment**
<p>

![AWS](https://img.shields.io/badge/AWS-232F3E?style=flat&logo=amazonaws&logoColor=white)
![Amazon Ec2](https://img.shields.io/badge/AWS_EC2-FF9900?style=flat&logo=amazonec2&logoColor=white)
</p>

**Cowork Tools**
<p>

![Slack](https://img.shields.io/badge/Slack-4A154B?style=flat&logo=Slack&logoColor=white)
![Notion](https://img.shields.io/badge/Notion-000000?style=flat&logo=Notion&logoColor=white)
![Zoom](https://img.shields.io/badge/Zoom-2D8CFF?style=flat&logo=Zoom&logoColor=white)
![Figma](https://img.shields.io/badge/Figma-F24E1E?style=flat&logo=figma&logoColor=white)
![GitHub](https://img.shields.io/badge/GitHub-181717?style=flat&logo=GitHub&logoColor=white)

</p> <br></br>

## ๐Ÿ–ฅ๏ธ ๊ธฐ๋Šฅ ์†Œ๊ฐœ
#### 1. User
| ํšŒ์›๊ฐ€์ž… |  ๋กœ๊ทธ์ธ  |
|:----:|:-----:|
|<img src="https://github.com/MINI-TEAM3/mini3-server/assets/128345842/5faf710e-7299-4233-9dcb-35215189ca62" width=600/>|<img src="https://github.com/MINI-TEAM3/mini3-server/assets/128345842/4e42e628-31d6-41ba-b781-9c80824d7097" width=600/>|

<br>

|๋งˆ์ดํŽ˜์ด์ง€|๋น„๋ฐ€๋ฒˆํ˜ธ ๋ณ€๊ฒฝ|
|:-----:|:-----:|
|<img src="https://github.com/MINI-TEAM3/mini3-server/assets/128345842/de97bd80-9289-416d-a13f-f2d6614f8535" width=600/>|<img src="https://github.com/MINI-TEAM3/mini3-server/assets/128345842/c2edced4-2ab5-4ec0-9f23-6b4c0334006a" width=600/>|

<br></br>

#### 2. Schedule
| ๋ฉ”์ธ์บ˜๋ฆฐ๋” (๋‹น์ง, ํœด๊ฐ€์กฐํšŒ) | ๋‹น์ง ๋ณ€๊ฒฝ |
|:---------------------:|:-----:|
|<img src="https://github.com/MINI-TEAM3/mini3-server/assets/128345842/6dc8ae39-ded3-4a8d-a13b-5d894d63bc51" width=600/>|<img src="https://github.com/MINI-TEAM3/mini3-server/assets/128345842/ee680092-f7f3-4084-9523-6ec3bd083a5f" width=600/>|

<br>

|์—ฐ์ฐจ ์‹ ์ฒญ|์—ฐ์ฐจ ์‹ ์ฒญ ๋‚ด์—ญ ์ˆ˜์ •/์‚ญ์ œ|
|:-----:|:-------:|
|<img src="https://github.com/MINI-TEAM3/mini3-server/assets/128345842/d64ad8c1-a633-4ba3-b346-e627814b3f4d" width=600/>|<img src="https://github.com/MINI-TEAM3/mini3-server/assets/128345842/6dcf044a-31df-4e70-b34a-50e00edb0197" width=600/>|

<br></br>

#### 3. Admin
| ํšŒ์› ๊ถŒํ•œ ์ˆ˜์ • |  ์žฌ์ง ์ƒํƒœ ์ˆ˜์ • | ์—ฐ์ฐจ ์Šน์ธ/๋ฐ˜๋ ค |
|:--------:|:-----:|:--------:|
|<img src="https://github.com/MINI-TEAM3/mini3-server/assets/128345842/256b4b44-0520-44c8-b885-77a4dbb254fb" width=400/>|<img src="https://github.com/MINI-TEAM3/mini3-server/assets/128345842/a810b65d-830b-4658-9a8f-64bd7247f536" width=400/>|<img src="https://github.com/MINI-TEAM3/mini3-server/assets/128345842/9a8a75a7-da95-4d63-8b6c-2f3d1ea13bc1" width=400/>|

<br>

| ๋‹น์ง ์ผ์ • ๊ตํ™˜ | ๋‹น์ง ๋“ฑ๋ก/์‚ญ์ œ |
|:-----:|:-----:|
|<img src="https://github.com/MINI-TEAM3/mini3-server/assets/128345842/74125bb4-d765-466c-af5a-0241c701118f" width=600/>|<img src="https://github.com/MINI-TEAM3/mini3-server/assets/128345842/8bf5fa31-076a-42d5-aada-8ec0d0e0abe8" width=600/>|

<br></br>

## โš™๏ธ ํ”„๋กœ์ ํŠธ ์„ค์ •
### 1๏ธโƒฃ ERD
![image](https://github.com/MINI-TEAM3/mini3-server/assets/128345842/36976315-a826-42a0-a153-c065b4a01ff7)
<br>
### 2๏ธโƒฃ ํ…Œ์ด๋ธ” ์„ค๊ณ„
```sql
CREATE TABLE user_tb (
  id BIGINT PRIMARY KEY AUTO_INCREMENT,
  emp_no INT,
  name VARCHAR(20) NOT NULL,
  email VARCHAR(40) NOT NULL UNIQUE,
  password VARCHAR(120) NOT NULL,
  phone VARCHAR(11),
  hospital_id BIGINT NOT NULL,
  dept_id BIGINT NOT NULL,
  level ENUM('PK', 'INTERN', 'RESIDENT', 'FELLOW') NOT NULL,
  auth ENUM('USER', 'ADMIN') NOT NULL,
  status ENUM('NOTAPPROVED', 'APPROVED', 'RETIRED') NOT NULL,
  annual INT,
  duty INT,
  profile_image_url VARCHAR(255),
  hiredate TIMESTAMP,
  resigneddate TIMESTAMP,
  created_at TIMESTAMP,
  updated_at TIMESTAMP
);

CREATE TABLE schedule_tb (
  id BIGINT PRIMARY KEY AUTO_INCREMENT,
  user_id BIGINT NOT NULL,
  hospital_id BIGINT NOT NULL,
  category ENUM('ANNUAL', 'DUTY') NOT NULL,
  start_date TIMESTAMP NOT NULL,
  end_date TIMESTAMP NOT NULL,
  is_validated ENUM('STANDBY', 'APPROVED', 'REJECTED') NOT NULL,
  reason VARCHAR(255),
  created_at TIMESTAMP,
  updated_at TIMESTAMP
);

CREATE TABLE hospital_tb (
  id BIGINT PRIMARY KEY AUTO_INCREMENT,
  name VARCHAR(20),
  created_at TIMESTAMP,
  updated_at TIMESTAMP
);

CREATE TABLE dept_tb (
  id BIGINT PRIMARY KEY AUTO_INCREMENT,
  hospital_id BIGINT,
  name VARCHAR(20),
  created_at TIMESTAMP,
  updated_at TIMESTAMP
);

ALTER TABLE user_tb ADD FOREIGN KEY (hospital_id) REFERENCES hospital_tb(id);
ALTER TABLE user_tb ADD FOREIGN KEY (dept_id) REFERENCES dept_tb(id);
ALTER TABLE schedule_tb ADD FOREIGN KEY (user_id) REFERENCES user_tb(id);
ALTER TABLE schedule_tb ADD FOREIGN KEY (hospital_id) REFERENCES hospital_tb(id);
ALTER TABLE dept_tb ADD FOREIGN KEY (hospital_id) REFERENCES hospital_tb(id);
```
### 3๏ธโƒฃ ํŒจํ‚ค์ง€ ๊ตฌ์กฐ
```markdown
๐Ÿ“ฆ src
โ””โ”€ main
   โ””โ”€ java
      โ””โ”€ com
         โ””โ”€ fc
            โ””โ”€ miniserver
               โ”œโ”€ _core
               โ”‚  โ”œโ”€ handler
               โ”‚  โ”‚  โ””โ”€ exception
               โ”‚  โ”œโ”€ security
               โ”‚  โ””โ”€ util
               โ”œโ”€ domain
               โ”‚  โ”œโ”€ User.java
               โ”‚  โ”œโ”€ Schedule.java
               โ”‚  โ”œโ”€ Hospital.java
               โ”‚  โ”œโ”€ Dept.java
               โ”‚  โ”œโ”€ History.java
               โ”‚  โ””โ”€ etc Enum ...
               โ”œโ”€ controller
               โ”œโ”€ service
               โ”œโ”€ repository
               โ”œโ”€ dto
               โ””โ”€ Mini3ServerApplication.java
```
<br></br>

## ๐Ÿ“ API ๋ช…์„ธ์„œ
<p>
<img width="715" alt="แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2023-08-10 แ„‹แ…ฉแ„’แ…ฎ 9 39 14" src="https://github.com/MINI-TEAM3/mini3-server/assets/128345842/c8ba70c7-9696-49b2-9bc5-5d5fb0e71001">
<img width="703" alt="แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2023-08-10 แ„‹แ…ฉแ„’แ…ฎ 9 45 57" src="https://github.com/MINI-TEAM3/mini3-server/assets/128345842/e2387de8-8e32-48ad-837d-e60522a54ae0">

</p>