forked from sudis/ticket-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtables.sql
33 lines (30 loc) · 1.21 KB
/
tables.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
CREATE DATABASE TicketBot;
CREATE TABLE Tickets (
pid INT AUTO_INCREMENT PRIMARY KEY NOT NULL,
member_id CHAR(18) NOT NULL,
claimed_staff CHAR(18),
ticket_status ENUM('AÇIK','ARŞİVDE','KAPALI','SİLİNMİŞ') DEFAULT 'AÇIK' NOT NULL,
ticket_type ENUM('GENEL','HATALAR','ÖNERİLER'),
ticket_room CHAR(18),
ticket_transcript VARCHAR(255),
opening_timestamp CHAR(10) NOT NULL,
opening_time DATETIME DEFAULT (CURRENT_TIME) NOT NULL
);
CREATE TABLE TicketStats (
pid INT AUTO_INCREMENT UNIQUE NOT NULL,
member_id CHAR(18) PRIMARY KEY NOT NULL,
clicked_buttons INT DEFAULT 0 NOT NULL,
opened_tickets INT DEFAULT 0 NOT NULL,
solved_tickets INT DEFAULT 0 NOT NULL,
unsolved_tickets INT DEFAULT 0 NOT NULL,
general_ask INT DEFAULT 0 NOT NULL,
problem_ask INT DEFAULT 0 NOT NULL,
suggestion_ask INT DEFAULT 0 NOT NULL
);
CREATE TABLE Comments (
pid INT AUTO_INCREMENT UNIQUE NOT NULL,
staff_id CHAR(18) PRIMARY KEY NOT NULL,
staff_solubility INT DEFAULT 0 NOT NULL,
staff_unsolubility INT DEFAULT 0 NOT NULL,
comment ENUM('Akıllı','Hızlı','Arkadaşça','Dalgacı','Bilgisiz','Kötü Hız','Belirtilmemiş') DEFAULT 'Belirtilmemiş' NOT NULL
);