fix(schema): remove commented lines
This commit is contained in:
parent
4cdc6dbc56
commit
ac1eaabb5d
|
|
@ -99,200 +99,6 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/oauth-sessions": {
|
|
||||||
"post": {
|
|
||||||
"operationId": "OauthSessionsController_create",
|
|
||||||
"parameters": [],
|
|
||||||
"requestBody": {
|
|
||||||
"required": true,
|
|
||||||
"content": {
|
|
||||||
"application/json": {
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/components/schemas/CreateOauthSessionDto"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"responses": {
|
|
||||||
"201": {
|
|
||||||
"description": "OAuth session created",
|
|
||||||
"content": {
|
|
||||||
"application/json": {
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/components/schemas/CreateOauthSessionDto"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"400": {
|
|
||||||
"description": "Incomplete task or invalid data"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"security": [
|
|
||||||
{
|
|
||||||
"sessions": []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"summary": "Create OAuth session",
|
|
||||||
"tags": [
|
|
||||||
"OAuth Sessions"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"get": {
|
|
||||||
"operationId": "OauthSessionsController_findAll",
|
|
||||||
"parameters": [],
|
|
||||||
"responses": {
|
|
||||||
"201": {
|
|
||||||
"description": "List of OAuth session found",
|
|
||||||
"content": {
|
|
||||||
"application/json": {
|
|
||||||
"schema": {
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"$ref": "#/components/schemas/CreateOauthSessionDto"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"400": {
|
|
||||||
"description": "List of OAuth session not found"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"security": [
|
|
||||||
{
|
|
||||||
"sessions": []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"summary": "Find all OAuth session",
|
|
||||||
"tags": [
|
|
||||||
"OAuth Sessions"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/oauth-sessions/{id}": {
|
|
||||||
"get": {
|
|
||||||
"operationId": "OauthSessionsController_findOne",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"name": "id",
|
|
||||||
"required": true,
|
|
||||||
"in": "path",
|
|
||||||
"schema": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
|
||||||
"201": {
|
|
||||||
"description": "OAuth session found",
|
|
||||||
"content": {
|
|
||||||
"application/json": {
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/components/schemas/CreateOauthSessionDto"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"400": {
|
|
||||||
"description": "OAuth session not found"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"security": [
|
|
||||||
{
|
|
||||||
"sessions": []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"summary": "Find OAuth session",
|
|
||||||
"tags": [
|
|
||||||
"OAuth Sessions"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"patch": {
|
|
||||||
"operationId": "OauthSessionsController_update",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"name": "id",
|
|
||||||
"required": true,
|
|
||||||
"in": "path",
|
|
||||||
"schema": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"requestBody": {
|
|
||||||
"required": true,
|
|
||||||
"content": {
|
|
||||||
"application/json": {
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/components/schemas/UpdateOauthSessionDto"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"responses": {
|
|
||||||
"201": {
|
|
||||||
"description": "OAuth session updated",
|
|
||||||
"content": {
|
|
||||||
"application/json": {
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/components/schemas/CreateOauthSessionDto"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"400": {
|
|
||||||
"description": "OAuth session not found"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"security": [
|
|
||||||
{
|
|
||||||
"sessions": []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"summary": "Update OAuth session",
|
|
||||||
"tags": [
|
|
||||||
"OAuth Sessions"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"delete": {
|
|
||||||
"operationId": "OauthSessionsController_remove",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"name": "id",
|
|
||||||
"required": true,
|
|
||||||
"in": "path",
|
|
||||||
"schema": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
|
||||||
"201": {
|
|
||||||
"description": "OAuth session deleted",
|
|
||||||
"content": {
|
|
||||||
"application/json": {
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/components/schemas/CreateOauthSessionDto"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"400": {
|
|
||||||
"description": "OAuth session not found"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"security": [
|
|
||||||
{
|
|
||||||
"sessions": []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"summary": "Delete OAuth session",
|
|
||||||
"tags": [
|
|
||||||
"OAuth Sessions"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/pay-periods/current-and-all": {
|
"/pay-periods/current-and-all": {
|
||||||
"get": {
|
"get": {
|
||||||
"operationId": "PayPeriodsController_getCurrentAndAll",
|
"operationId": "PayPeriodsController_getCurrentAndAll",
|
||||||
|
|
@ -887,114 +693,6 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"schemas": {
|
"schemas": {
|
||||||
"CreateOauthSessionDto": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"id": {
|
|
||||||
"type": "string",
|
|
||||||
"example": "cklwi0vb70000z2z20q6f19qk",
|
|
||||||
"description": "Unique ID of an OAuth token (auto-generated)"
|
|
||||||
},
|
|
||||||
"user_id": {
|
|
||||||
"type": "string",
|
|
||||||
"example": "S7A2U8R7O6N6",
|
|
||||||
"description": "User`s unique identification number"
|
|
||||||
},
|
|
||||||
"application": {
|
|
||||||
"type": "string",
|
|
||||||
"example": "app.targo.ca",
|
|
||||||
"description": "URL in which the access token is used for"
|
|
||||||
},
|
|
||||||
"access_token": {
|
|
||||||
"type": "string",
|
|
||||||
"example": "L5O6R4D3/O6F3#T8H4E3&R6I4N6G4S7 ...",
|
|
||||||
"description": "Access token"
|
|
||||||
},
|
|
||||||
"refresh_token": {
|
|
||||||
"type": "string",
|
|
||||||
"example": "Th3731102h1p07Th3R1n92",
|
|
||||||
"description": "Refresh token"
|
|
||||||
},
|
|
||||||
"access_token_expiry": {
|
|
||||||
"format": "date-time",
|
|
||||||
"type": "string",
|
|
||||||
"example": "25/12/3018",
|
|
||||||
"description": "Access token`s expiry date"
|
|
||||||
},
|
|
||||||
"refresh_token_expiry": {
|
|
||||||
"format": "date-time",
|
|
||||||
"type": "string",
|
|
||||||
"example": "26/02/3019",
|
|
||||||
"description": "Refresh token`s expiry date"
|
|
||||||
},
|
|
||||||
"scopes": {
|
|
||||||
"example": "access tolkiens, email, etc... ",
|
|
||||||
"description": "scopes of infos linked to the access token",
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"required": [
|
|
||||||
"id",
|
|
||||||
"user_id",
|
|
||||||
"application",
|
|
||||||
"access_token",
|
|
||||||
"refresh_token",
|
|
||||||
"access_token_expiry"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"UpdateOauthSessionDto": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"id": {
|
|
||||||
"type": "string",
|
|
||||||
"example": "cklwi0vb70000z2z20q6f19qk",
|
|
||||||
"description": "Unique ID of an OAuth token (auto-generated)"
|
|
||||||
},
|
|
||||||
"user_id": {
|
|
||||||
"type": "string",
|
|
||||||
"example": "S7A2U8R7O6N6",
|
|
||||||
"description": "User`s unique identification number"
|
|
||||||
},
|
|
||||||
"application": {
|
|
||||||
"type": "string",
|
|
||||||
"example": "app.targo.ca",
|
|
||||||
"description": "URL in which the access token is used for"
|
|
||||||
},
|
|
||||||
"access_token": {
|
|
||||||
"type": "string",
|
|
||||||
"example": "L5O6R4D3/O6F3#T8H4E3&R6I4N6G4S7 ...",
|
|
||||||
"description": "Access token"
|
|
||||||
},
|
|
||||||
"refresh_token": {
|
|
||||||
"type": "string",
|
|
||||||
"example": "Th3731102h1p07Th3R1n92",
|
|
||||||
"description": "Refresh token"
|
|
||||||
},
|
|
||||||
"access_token_expiry": {
|
|
||||||
"format": "date-time",
|
|
||||||
"type": "string",
|
|
||||||
"example": "25/12/3018",
|
|
||||||
"description": "Access token`s expiry date"
|
|
||||||
},
|
|
||||||
"refresh_token_expiry": {
|
|
||||||
"format": "date-time",
|
|
||||||
"type": "string",
|
|
||||||
"example": "26/02/3019",
|
|
||||||
"description": "Refresh token`s expiry date"
|
|
||||||
},
|
|
||||||
"scopes": {
|
|
||||||
"example": "access tolkiens, email, etc... ",
|
|
||||||
"description": "scopes of infos linked to the access token",
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"PayPeriodDto": {
|
"PayPeriodDto": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,8 @@ model Users {
|
||||||
role Roles @default(GUEST)
|
role Roles @default(GUEST)
|
||||||
|
|
||||||
employee Employees? @relation("UserEmployee")
|
employee Employees? @relation("UserEmployee")
|
||||||
// oauth_sessions OAuthSessions[] @relation("UserOAuthSessions")
|
oauth_sessions OAuthSessions[] @relation("UserOAuthSessions")
|
||||||
// preferences Preferences? @relation("UserPreferences")
|
preferences Preferences? @relation("UserPreferences")
|
||||||
|
|
||||||
@@map("users")
|
@@map("users")
|
||||||
}
|
}
|
||||||
|
|
@ -46,16 +46,16 @@ model Employees {
|
||||||
|
|
||||||
|
|
||||||
crew Employees[] @relation("EmployeeSupervisor")
|
crew Employees[] @relation("EmployeeSupervisor")
|
||||||
// timesheet Timesheets[] @relation("TimesheetEmployee")
|
timesheet Timesheets[] @relation("TimesheetEmployee")
|
||||||
// leave_request LeaveRequests[] @relation("LeaveRequestEmployee")
|
leave_request LeaveRequests[] @relation("LeaveRequestEmployee")
|
||||||
// schedule_presets SchedulePresets[] @relation("SchedulePreset")
|
schedule_presets SchedulePresets[] @relation("SchedulePreset")
|
||||||
|
|
||||||
@@map("employees")
|
@@map("employees")
|
||||||
}
|
}
|
||||||
|
|
||||||
model LeaveRequests {
|
model LeaveRequests {
|
||||||
id Int @id @default(autoincrement())
|
id Int @id @default(autoincrement())
|
||||||
// employee Employees @relation("LeaveRequestEmployee", fields: [employee_id], references: [id])
|
employee Employees @relation("LeaveRequestEmployee", fields: [employee_id], references: [id])
|
||||||
employee_id Int
|
employee_id Int
|
||||||
bank_code BankCodes @relation("LeaveRequestBankCodes", fields: [bank_code_id], references: [id])
|
bank_code BankCodes @relation("LeaveRequestBankCodes", fields: [bank_code_id], references: [id])
|
||||||
bank_code_id Int
|
bank_code_id Int
|
||||||
|
|
@ -107,7 +107,7 @@ view PayPeriods {
|
||||||
|
|
||||||
model Timesheets {
|
model Timesheets {
|
||||||
id Int @id @default(autoincrement())
|
id Int @id @default(autoincrement())
|
||||||
// employee Employees @relation("TimesheetEmployee", fields: [employee_id], references: [id])
|
employee Employees @relation("TimesheetEmployee", fields: [employee_id], references: [id])
|
||||||
employee_id Int
|
employee_id Int
|
||||||
|
|
||||||
start_date DateTime @db.Date
|
start_date DateTime @db.Date
|
||||||
|
|
@ -135,7 +135,7 @@ model TimesheetsArchive {
|
||||||
|
|
||||||
model SchedulePresets {
|
model SchedulePresets {
|
||||||
id Int @id @default(autoincrement())
|
id Int @id @default(autoincrement())
|
||||||
// employee Employees @relation("SchedulePreset", fields: [employee_id], references: [id])
|
employee Employees @relation("SchedulePreset", fields: [employee_id], references: [id])
|
||||||
employee_id Int
|
employee_id Int
|
||||||
|
|
||||||
name String
|
name String
|
||||||
|
|
@ -258,7 +258,7 @@ model ExpensesArchive {
|
||||||
|
|
||||||
model OAuthSessions {
|
model OAuthSessions {
|
||||||
id String @id @default(cuid())
|
id String @id @default(cuid())
|
||||||
// user Users @relation("UserOAuthSessions", fields: [user_id], references: [id])
|
user Users @relation("UserOAuthSessions", fields: [user_id], references: [id])
|
||||||
user_id String @db.Uuid
|
user_id String @db.Uuid
|
||||||
application String
|
application String
|
||||||
access_token String @unique
|
access_token String @unique
|
||||||
|
|
@ -327,7 +327,7 @@ model AttachmentVariants {
|
||||||
|
|
||||||
model Preferences {
|
model Preferences {
|
||||||
id Int @id @default(autoincrement())
|
id Int @id @default(autoincrement())
|
||||||
// user Users @relation("UserPreferences", fields: [user_id], references: [id])
|
user Users @relation("UserPreferences", fields: [user_id], references: [id])
|
||||||
user_id String @unique @db.Uuid
|
user_id String @unique @db.Uuid
|
||||||
|
|
||||||
notifications Int @default(0)
|
notifications Int @default(0)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user