From 9a6ad0f55e822f12f2d8d38b1fca2c1764cb0e54 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 20 Oct 2023 07:42:39 +0000 Subject: [PATCH] doc(api): updated database documentation[skip ci] https://github.com/ezpaarse-project/ezmesure/compare/9f132f8b2942...8826b911cfd3 Co-authored-by: @nojhamster --- api/prisma/doc/DIC.md | 228 +---------------------------------------- api/prisma/doc/ERD.svg | 2 +- 2 files changed, 2 insertions(+), 228 deletions(-) diff --git a/api/prisma/doc/DIC.md b/api/prisma/doc/DIC.md index 73f1f0b94..60b769aea 100644 --- a/api/prisma/doc/DIC.md +++ b/api/prisma/doc/DIC.md @@ -1,227 +1 @@ -# ezMESURE - -## Models - -### Institution - -| Property | Type | Description | Attributes | Default | -|-------------------|----------------------|-------------|------------|----------| -| id | `String` | | Id | `cuid()` | -| parentInstitution | `Institution?` | | | | -| createdAt | `DateTime` | | | `now()` | -| updatedAt | `DateTime` | | | | -| name | `String` | | | | -| namespace | `String?` | | | | -| validated | `Boolean` | | | `false` | -| hidePartner | `Boolean` | | | `false` | -| tags | `String[]` | | | | -| logoId | `String?` | | | | -| type | `String?` | | | | -| acronym | `String?` | | | | -| websiteUrl | `String?` | | | | -| city | `String?` | | | | -| uai | `String?` | | | | -| social | `Json?` | | | | -| auto | `Json?` | | | | -| sushiReadySince | `DateTime?` | | | | -| memberships | `Membership[]` | | | | -| spaces | `Space[]` | | | | -| historyEntries | `HistoryEntry[]` | | | | -| sushiCredentials | `SushiCredentials[]` | | | | -| childInstitutions | `Institution[]` | | | | -| repositories | `Repository[]` | | | | - -### User - -| Property | Type | Description | Attributes | Default | -|----------------|------------------|-------------|------------|---------| -| username | `String` | | Id | | -| fullName | `String` | | | | -| email | `String` | | | | -| createdAt | `DateTime` | | | `now()` | -| updatedAt | `DateTime` | | | | -| isAdmin | `Boolean` | | | `false` | -| metadata | `Json` | | | `{}` | -| memberships | `Membership[]` | | | | -| historyEntries | `HistoryEntry[]` | | | | - -### Membership - -| Property | Type | Description | Attributes | Default | -|-----------------------|--------------------------|-------------|------------|---------| -| user | `User` | | | | -| institution | `Institution` | | | | -| roles | `String[]` | | | | -| permissions | `String[]` | | | | -| spacePermissions | `SpacePermission[]` | | | | -| repositoryPermissions | `RepositoryPermission[]` | | | | -| locked | `Boolean` | | | `false` | - -### Space - -| Property | Type | Description | Attributes | Default | -|---------------|---------------------|-------------|------------|---------| -| id | `String` | | Id | | -| institution | `Institution?` | | | | -| createdAt | `DateTime` | | | `now()` | -| updatedAt | `DateTime` | | | | -| name | `String` | | | | -| description | `String?` | | | | -| initials | `String?` | | | | -| color | `String?` | | | | -| type | `String` | | | | -| indexPatterns | `Json[]` | | | | -| permissions | `SpacePermission[]` | | | | - -### SpacePermission - -| Property | Type | Description | Attributes | Default | -|------------|--------------|-------------|------------|---------| -| membership | `Membership` | | | | -| space | `Space` | | | | -| readonly | `Boolean` | | | `false` | -| locked | `Boolean` | | | `false` | - -### Repository - -| Property | Type | Description | Attributes | Default | -|-------------|--------------------------|-------------|------------|----------| -| id | `String` | | Id | `cuid()` | -| institution | `Institution?` | | | | -| createdAt | `DateTime` | | | `now()` | -| updatedAt | `DateTime` | | | | -| pattern | `String` | | | | -| type | `String` | | | | -| permissions | `RepositoryPermission[]` | | | | - -### RepositoryPermission - -| Property | Type | Description | Attributes | Default | -|------------|--------------|-------------|------------|---------| -| membership | `Membership` | | | | -| repository | `Repository` | | | | -| readonly | `Boolean` | | | `false` | -| locked | `Boolean` | | | `false` | - -### HistoryEntry - -| Property | Type | Description | Attributes | Default | -|-------------|---------------|-------------|------------|----------| -| id | `String` | | Id | `cuid()` | -| institution | `Institution` | | | | -| author | `User` | | | | -| createdAt | `DateTime` | | | `now()` | -| updatedAt | `DateTime` | | | | -| type | `String` | | | | -| message | `String?` | | | | -| data | `Json` | | | | - -### HarvestJob - -| Property | Type | Description | Attributes | Default | -|------------------|--------------------|---------------------------------------------------------------------------------------------------------|------------|----------| -| id | `String` | | Id | `cuid()` | -| credentials | `SushiCredentials` | | | | -| createdAt | `DateTime` | | | `now()` | -| updatedAt | `DateTime` | | | | -| startedAt | `DateTime?` | | | | -| beginDate | `String` | | | | -| endDate | `String` | | | | -| status | `String` | | | | -| reportType | `String` | | | | -| harvestId | `String` | | | | -| index | `String` | | | | -| runningTime | `Int?` | | | | -| timeout | `Int` | | | | -| forceDownload | `Boolean` | | | `false` | -| ignoreValidation | `Boolean` | | | `false` | -| params | `Json?` | | | `{}` | -| result | `Json?` | | | | -| errorCode | `String?` | Error code, if a fatal exception was encountered | | | -| sushiExceptions | `Json[]` | SUSHI exceptions returned by the endpoint (format: { code: string, severity: string, message: string }) | | | -| logs | `Log[]` | | | | -| steps | `Step[]` | | | | - -### Harvest - -| Property | Type | Description | Attributes | Default | -|-----------------|--------------------|---------------------------------------------------------------------------------------------------------|------------|---------| -| harvestedAt | `DateTime` | Date of the harvest | | `now()` | -| credentials | `SushiCredentials` | SUSHI credentials | | | -| reportId | `String` | Report ID (TR, PR, DR...) | | | -| period | `String` | Report period (format: yyyy-MM) | | | -| status | `String` | Status of the harvest (waiting, running, finished, failed...) | | | -| errorCode | `String?` | Error code, if a fatal exception was encountered | | | -| sushiExceptions | `Json[]` | SUSHI exceptions returned by the endpoint (format: { code: string, severity: string, message: string }) | | | -| insertedItems | `Int` | Number of report items that were successfuly inserted into Elasticsearch | | `0` | -| updatedItems | `Int` | Number of report items that were updated in Elasticsearch | | `0` | -| failedItems | `Int` | Number of report items that failed to be inserted into Elasticsearch | | `0` | - -### Log - -| Property | Type | Description | Attributes | Default | -|----------|--------------|-------------|------------|----------| -| id | `String` | | Id | `cuid()` | -| job | `HarvestJob` | | | | -| date | `DateTime` | | | `now()` | -| level | `String` | | | | -| message | `String` | | | | - -### Step - -| Property | Type | Description | Attributes | Default | -|-------------|--------------|-------------|------------|----------| -| id | `String` | | Id | `cuid()` | -| job | `HarvestJob` | | | | -| createdAt | `DateTime` | | | `now()` | -| updatedAt | `DateTime` | | | | -| startedAt | `DateTime` | | | | -| label | `String` | | | | -| status | `String` | | | | -| runningTime | `Int` | | | | -| data | `Json` | | | | - -### SushiEndpoint - -| Property | Type | Description | Attributes | Default | -|---------------------------|----------------------|-------------|------------|----------| -| id | `String` | | Id | `cuid()` | -| createdAt | `DateTime` | | | `now()` | -| updatedAt | `DateTime` | | | | -| sushiUrl | `String` | | | | -| vendor | `String` | | | | -| tags | `String[]` | | | | -| description | `String?` | | | | -| counterVersion | `String?` | | | | -| technicalProvider | `String?` | | | | -| requireCustomerId | `Boolean` | | | `false` | -| requireRequestorId | `Boolean` | | | `false` | -| requireApiKey | `Boolean` | | | `false` | -| ignoreReportValidation | `Boolean` | | | `false` | -| disabledUntil | `DateTime?` | | | | -| defaultCustomerId | `String?` | | | | -| defaultRequestorId | `String?` | | | | -| defaultApiKey | `String?` | | | | -| paramSeparator | `String?` | | | | -| supportedReports | `String[]` | | | | -| supportedReportsUpdatedAt | `DateTime?` | | | | -| credentials | `SushiCredentials[]` | | | | -| params | `Json[]` | | | | - -### SushiCredentials - -| Property | Type | Description | Attributes | Default | -|-------------|-----------------|-------------|------------|----------| -| id | `String` | | Id | `cuid()` | -| createdAt | `DateTime` | | | `now()` | -| updatedAt | `DateTime` | | | | -| customerId | `String?` | | | | -| requestorId | `String?` | | | | -| apiKey | `String?` | | | | -| comment | `String?` | | | | -| tags | `String[]` | | | | -| params | `Json[]` | | | | -| institution | `Institution` | | | | -| endpoint | `SushiEndpoint` | | | | -| harvestJobs | `HarvestJob[]` | | | | -| harvests | `Harvest[]` | | | | +{"message":"Route POST://dict/?name=ezMESURE not found","error":"Not Found","statusCode":404} \ No newline at end of file diff --git a/api/prisma/doc/ERD.svg b/api/prisma/doc/ERD.svg index c07ddeee3..c759c7a7d 100644 --- a/api/prisma/doc/ERD.svg +++ b/api/prisma/doc/ERD.svg @@ -1 +1 @@ -InstitutionStringidPKStringparentInstitutionIdFKDateTimecreatedAtDateTimeupdatedAtStringnameStringnamespaceBooleanvalidatedBooleanhidePartnerString[]tagsStringlogoIdStringtypeStringacronymStringwebsiteUrlStringcityStringuaiJsonsocialJsonautoDateTimesushiReadySinceUserStringusernamePKStringfullNameStringemailDateTimecreatedAtDateTimeupdatedAtBooleanisAdminJsonmetadataMembershipStringusernamePK,FKStringinstitutionIdPK,FKString[]rolesString[]permissionsBooleanlockedSpaceStringidPKStringinstitutionIdFKDateTimecreatedAtDateTimeupdatedAtStringnameStringdescriptionStringinitialsStringcolorStringtypeJson[]indexPatternsSpacePermissionStringusernamePK,FKStringinstitutionIdFKStringspaceIdPK,FKBooleanreadonlyBooleanlockedRepositoryStringidPKStringinstitutionIdFKDateTimecreatedAtDateTimeupdatedAtStringpatternStringtypeRepositoryPermissionStringusernamePK,FKStringinstitutionIdFKStringrepositoryIdPK,FKBooleanreadonlyBooleanlockedHistoryEntryStringidPKStringinstitutionIdFKStringauthorIdFKDateTimecreatedAtDateTimeupdatedAtStringtypeStringmessageJsondataHarvestJobStringidPKStringcredentialsIdFKDateTimecreatedAtDateTimeupdatedAtDateTimestartedAtStringbeginDateStringendDateStringstatusStringreportTypeStringharvestIdStringindexIntrunningTimeInttimeoutBooleanforceDownloadBooleanignoreValidationJsonparamsJsonresultStringerrorCodeJson[]sushiExceptionsHarvestDateTimeharvestedAtStringcredentialsIdPK,FKStringreportIdPKStringperiodPKStringstatusStringerrorCodeJson[]sushiExceptionsIntinsertedItemsIntupdatedItemsIntfailedItemsLogStringidPKStringjobIdFKDateTimedateStringlevelStringmessageStepStringidPKStringjobIdFKDateTimecreatedAtDateTimeupdatedAtDateTimestartedAtStringlabelStringstatusIntrunningTimeJsondataSushiEndpointStringidPKDateTimecreatedAtDateTimeupdatedAtStringsushiUrlStringvendorString[]tagsStringdescriptionStringcounterVersionStringtechnicalProviderBooleanrequireCustomerIdBooleanrequireRequestorIdBooleanrequireApiKeyBooleanignoreReportValidationDateTimedisabledUntilStringdefaultCustomerIdStringdefaultRequestorIdStringdefaultApiKeyStringparamSeparatorString[]supportedReportsDateTimesupportedReportsUpdatedAtJson[]paramsSushiCredentialsStringidPKDateTimecreatedAtDateTimeupdatedAtStringinstitutionIdFKStringendpointIdFKStringcustomerIdStringrequestorIdStringapiKeyStringcommentString[]tagsJson[]paramsparentInstitutionuserinstitutioninstitutionmembershipspaceinstitutionmembershiprepositoryinstitutionauthorcredentialscredentialsjobjobinstitutionendpoint \ No newline at end of file +{"message":"Route POST://erd/ not found","error":"Not Found","statusCode":404} \ No newline at end of file