Skip to content
/ OST Public

πŸ’¬ 사내 μ±„νŒ… ν”„λ‘œκ·Έλž¨ 🏒

Notifications You must be signed in to change notification settings

KwDrama/OST

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ’¬ OST

🏒 Office messenger Supporting Telecommuting



개발 κΈ°κ°„

3ν•™λ…„ 1ν•™κΈ° μ‘μš©μ†Œν”„νŠΈμ›¨μ–΄μ‹€μŠ΅ (2021-03-12 ~ 2021-06-11)

μΉ΄μΉ΄μ˜€ν†‘μ„ λͺ¨ν‹°λΈŒλ‘œ C# (.Net Core 3.1, .Net Framework 4.7.2) κ³Ό MySQL 등을 μ‚¬μš©ν•΄ λ§Œλ“  사내 μ±„νŒ… ν”„λ‘œκ·Έλž¨ νŒ€ν”„λ‘œμ νŠΈ μž…λ‹ˆλ‹€.

μ‹€ν–‰ν•˜κΈ° μœ„ν•΄μ„œλŠ” λͺ‡κ°€μ§€ 섀정이 ν•„μš”ν•©λ‹ˆλ‹€.

데이터 베이슀 및 μœ μ € 생성

μ„œλ²„ ν”„λ‘œκ·Έλž¨μ„ 돌리기 μœ„ν•΄ .Net Core 와 MySQL ν”„λ‘œκ·Έλž¨μ΄ μ„€μΉ˜λ  수 μžˆλŠ” Ubuntu 20.04 LTS μš΄μ˜μ²΄μ œμ—μ„œ μš°μ„  MySQL 을 μ„€μΉ˜ν•˜κ³  DB 및 User λ₯Ό μƒμ„±ν•©λ‹ˆλ‹€.

bash
sudo mysql -u root -p
sql
CREATE DATABASE ost DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
CREATE USER ost@localhost identified BY 'dr@M@0st';
GRANT ALL PRIVILEGES ON ost.* TO ost@localhost;
FLUSH PRIVILEGES;



ν…Œμ΄λΈ” 생성

sql
CREATE TABLE `ost`.`employee` (
  `id` INT NOT NULL,
  `password` VARCHAR(64) NOT NULL,
  `name` VARCHAR(20) NOT NULL,
  `phone` VARCHAR(14) NULL,
  `central` VARCHAR(45) NOT NULL,
  `team` VARCHAR(45) NOT NULL,
  `rank` VARCHAR(45) NOT NULL,
  `profile` LONGBLOB NULL,
  `profile_length` INT UNSIGNED NULL,
  PRIMARY KEY (`id`));

CREATE TABLE `ost`.`schedule` (
  `author` INT NOT NULL,
  `title` VARCHAR(45) NULL,
  `start` DATETIME NOT NULL,
  `end` DATETIME NOT NULL,
  `scope` VARCHAR(45) NULL,
  `contents` LONGTEXT NULL,
  `target` VARCHAR(45) NULL,
  CONSTRAINT `schedule_id`
    FOREIGN KEY (`author`)
    REFERENCES `ost`.`employee` (`id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);

CREATE TABLE `ost`.`room` (
  `id` VARCHAR(32) NOT NULL,
  `scope` INT NULL,
  `target` VARCHAR(45) NULL,
  PRIMARY KEY (`id`));

CREATE TABLE `ost`.`chat` (
  `room_id` VARCHAR(32) NOT NULL,
  `chat_date` DATETIME(6) NOT NULL,
  `employee_id` INT NOT NULL,
  `data` LONGBLOB NULL,
  `data_length` INT NULL,
  `data_type` INT NULL,
  UNIQUE INDEX `chat_date_UNIQUE` (`chat_date` ASC) VISIBLE,
  INDEX `chat_room_id_idx` (`room_id` ASC) VISIBLE,
  INDEX `chat_date_idx` (`chat_date` ASC) VISIBLE,
  INDEX `chat_employee_id_idx` (`employee_id` ASC) VISIBLE,
  CONSTRAINT `chat_room_id`
    FOREIGN KEY (`room_id`)
    REFERENCES `ost`.`room` (`id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `chat_employee_id`
    FOREIGN KEY (`employee_id`)
    REFERENCES `ost`.`employee` (`id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);

이둜써 사전 μ„ΈνŒ…μ΄ λͺ¨λ‘ λλ‚¬μŠ΅λ‹ˆλ‹€.

μ„œλ²„ μ‹€ν–‰

Release νƒ­μ—μ„œ OSTServer.zip 을 λ‹€μš΄λ°›κ³  압좕을 ν’€μ–΄μ£Όμ„Έμš”.

잠깐!

μ„œλ²„λŠ” .Net Core 3.1 λ₯Ό μ‚¬μš©ν•˜λ©° μ‹€ν–‰ν•˜λŠ” 곳에 μ„€μΉ˜κ°€ λ˜μ–΄ μžˆμ–΄μ•Όν•©λ‹ˆλ‹€. λ˜ν•œ MySQL λ˜λŠ” MariaDBκ°€ μ„€μΉ˜λ˜μ–΄ μžˆμ–΄μ•Όν•˜λ©° 데이터 λ² μ΄μŠ€λŠ” 127.0.0.1 둜 μ ‘μ†ν•˜κΈ° λ•Œλ¬Έμ— λ‘œμ»¬μ— μ„€μΉ˜λ˜μ–΄ μžˆμ–΄μ•Όν•©λ‹ˆλ‹€. (ν”„λ‘œμ νŠΈ Server/Classes/Database.cs μ—μ„œ λ³€κ²½ κ°€λŠ₯)

Linux (Bash)

dotnet [server-ip] [server-port]

Window (Powershell)

.\OSTServer.exe [port]

OSTServer.exe λ₯Ό κ·Έλƒ₯ 싀행해도 λ˜μ§€λ§Œ ν¬νŠΈλŠ” 기본값인 6756 으둜만 μ‹€ν–‰λ©λ‹ˆλ‹€.

μ‹€ν–‰ κ²°κ³Ό

PS C:\Users\chchc\Downloads\OSTServer> .\OSTServer.exe
[2021-07-14 13:40:19] DB | Server 127.0.0.1 is connected
[2021-07-14 13:40:19] System | Server is opend with port 6756



ν”„λ‘œκ·Έλž¨ μ‹€ν–‰

.Net Framework 4.7.2 기반이며 Window Forms 둜 μ œμž‘λ˜μ–΄ μœˆλ„μš°μ—μ„œλ§Œ μ‹€ν–‰ν•˜μ‹œκΈΈ λ°”λžλ‹ˆλ‹€. λ¦¬λˆ…μŠ€μ™€ 같은 μš΄μ˜μ²΄μ œμ—μ„œ μ‹€ν–‰κ°€λŠ₯ν•œ 방법도 μžˆμœΌλ‚˜ μ—¬κΈ°μ„œ 닀루진 μ•Šκ² μŠ΅λ‹ˆλ‹€.

Window (Powershell)

.\OfficeMessengarST.exe [server-ip] [server-port]

OfficeMessengarST.exe λ₯Ό κ·Έλƒ₯ 싀행해도 λ˜μ§€λ§Œ 기본값인 127.0.0.1:6756 으둜만 μ‹€ν–‰λ©λ‹ˆλ‹€.



μ†Œκ°œ

μ΄μ œλΆ€ν„° ν”„λ‘œκ·Έλž¨ κΈ°λŠ₯을 νŒŒν•΄μ³ 보도둝 ν•˜κ² μŠ΅λ‹ˆλ‹€.

접속


사원 등둝


둜그인 및 메인 ν™”λ©΄


쑰직도 및 사원 정보


1:1 μ±„νŒ…


νŒ€ μ±„νŒ…


λ³ΈλΆ€ μ±„νŒ…


νšŒμ‚¬ 전체 μ±„νŒ…


ER Diagram


Table: Employee


Table: Room

target 컬럼이 제1μ •κ·œν™”λ„ λ§Œμ‘±ν•˜μ§€ λͺ»ν•œλ‹€λŠ” 점이 아쉽긴 ν•©λ‹ˆλ‹€.

Table: Chat

μ±„νŒ… ν…Œμ΄λΈ”μ˜ key λ₯Ό μ§€μ •ν•˜κΈ° μœ„ν•΄ chat_date μ»¬λŸΌμ„ DATETIME(6) 으둜 μ§€μ •ν•˜μ—¬ millisecond κΉŒμ§€ μ €μž₯ν•˜λ„λ‘ ν•˜μ˜€μŠ΅λ‹ˆλ‹€.



νŠΉμ§•

μ±„νŒ… ν™”λ©΄ κ°„μ†Œν™”

μΉ΄μΉ΄μ˜€ν†‘ 처럼 κ°™μ€μ‚¬λžŒ, 같은 μ‹œκ°„(λΆ„ λ‹¨μœ„ κΉŒμ§€) 일 경우 μ±„νŒ…μ΄ μ—°κ²°λ˜λ„λ‘ λ˜μ–΄μžˆμŠ΅λ‹ˆλ‹€.


λΉ„λ°€λ²ˆν˜Έ 일방ν–₯ μ•”ν˜Έν™” μ €μž₯

λ°μ΄ν„°λ² μ΄μŠ€μ— 사원 정보가 μ €μž₯될 λ•Œ λΉ„λ°€λ²ˆν˜Έλ₯Ό SHA-512 μ•”ν˜Έν™” μ•Œκ³ λ¦¬μ¦˜μ„ μ μš©ν•˜μ—¬ μ €μž₯ν•˜μ—¬ λ³΄μ•ˆμ„ ν•œ μΈ΅ 더 κ°•ν™”ν•˜μ˜€μŠ΅λ‹ˆλ‹€.