MonoloDoc

NoLoSay Database ERD

Generated by prisma-markdown

Localization

erDiagram
"Country" {
  Int id PK
  String name UK
  String code UK
  Float longitude "nullable"
  Float latitude "nullable"
  DateTime createdAt
  DateTime updatedAt
  DateTime deletedAt "nullable"
}
"Department" {
  Int id PK
  String name
  String code
  Float longitude "nullable"
  Float latitude "nullable"
  DateTime createdAt
  DateTime updatedAt
  DateTime deletedAt "nullable"
  Int countryId FK
}
"City" {
  Int id PK
  String name
  String zip
  Float longitude "nullable"
  Float latitude "nullable"
  DateTime createdAt
  DateTime updatedAt
  DateTime deletedAt "nullable"
  Int departmentId FK
}
"Address" {
  Int id PK
  String houseNumber "nullable"
  String street
  String zip
  String otherDetails "nullable"
  Float longitude
  Float latitude
  DateTime createdAt
  DateTime updatedAt
  DateTime deletedAt "nullable"
  Int cityId FK
}
"Department" }o--|| "Country" : country
"City" }o--|| "Department" : department
"Address" }o--|| "City" : city

Country

Represents a country with its geographical details and departments.

Properties

Department

Represents a department within a country, including its geographical details.

Properties

City

Represents a city within a department, including its geographical details and addresses.

Properties

Address

Represents an address within a city, including its geographical details.

Properties

Users

erDiagram
"User" {
  Int id PK
  String uuid UK
  String username UK
  String email UK
  Boolean emailVerified
  String password
  String picture "nullable"
  String telNumber "nullable"
  DateTime createdAt
  DateTime updatedAt
  DateTime deletedAt "nullable"
}
"Profile" {
  Int id PK
  Role role
  Boolean isActive
  DateTime createdAt
  DateTime updatedAt
  DateTime deletedAt "nullable"
  Int userId FK
}
"Sanctions" {
  Int id PK
  Int userId FK
  SanctionType sanctionType
  String reason
  Int issuerId FK "nullable"
  DateTime sanctionStart
  DateTime sanctionEnd "nullable"
  DateTime createdAt
  DateTime updatedAt
  DateTime deletedAt "nullable"
}
"Profile" }o--|| "User" : user
"Sanctions" }o--|| "User" : user
"Sanctions" }o--o| "Profile" : issuer

User

Represents a user in the system, including their profile and authentication details.

Properties

Profile

Represents a profile for a user, including personal details and preferences.

Properties

Sanctions

Represents a sanction imposed on a user.

Properties

OAuth

erDiagram
"OAuthProviders" {
  Int providerId PK
  String provider UK
}
"OAuthProviderUser" {
  String providerUserId
  Int userId FK
  Int providerId FK
  Int id PK
}
"OAuthProviderUser" }o--|| "OAuthProviders" : provider

OAuthProviders

Represents the OAuth providers available for authentication.

Properties

OAuthProviderUser

Represents the association between an OAuth provider and a user.

Properties

Persons

erDiagram
"Person" {
  Int id PK
  String name
  String bio "nullable"
  PersonType type
  String birthDate "nullable"
  String deathDate "nullable"
  String picture "nullable"
  DateTime createdAt
  DateTime updatedAt
  DateTime deletedAt "nullable"
}

Person

Represents a person in the system.

Properties

Items

erDiagram
"ItemCategory" {
  Int id PK
  String name UK
  String description "nullable"
  DateTime createdAt
  DateTime updatedAt
  DateTime deletedAt "nullable"
}
"ItemType" {
  Int id PK
  String name
  String description "nullable"
  DateTime createdAt
  DateTime updatedAt
  DateTime deletedAt "nullable"
  Int itemCategoryId FK
}
"Item" {
  Int id PK
  String uuid UK
  String name
  String description "nullable"
  String textToTranslate
  DateTime createdAt
  DateTime updatedAt
  DateTime deletedAt "nullable"
  Int itemTypeId FK "nullable"
  Int relatedPersonId FK "nullable"
  Int siteId FK "nullable"
}
"ItemType" }o--|| "ItemCategory" : itemCategory
"Item" }o--o| "ItemType" : itemType

ItemCategory

Represents a category of items.

Properties

ItemType

Represents a type of item.

Properties

Item

Represents an item in the system.

Properties

Videos

erDiagram
"SignLanguage" {
  Int id PK
  String uuid UK
  String name UK
  String code UK
  String color
  DateTime createdAt
  DateTime updatedAt
  DateTime deletedAt "nullable"
}
"Video" {
  Int id PK
  String uuid UK
  Int hostingProviderId FK
  String hostingProviderVideoId
  ValidationStatus validationStatus
  Int duration
  DateTime createdAt
  DateTime updatedAt
  DateTime deletedAt "nullable"
  String deletedReason "nullable"
  Int itemId FK
  Int profileId FK
  Int signLanguageId FK "nullable"
}
"HostingProvider" {
  Int id PK
  String name UK
  String url
  DateTime createdAt
  DateTime updatedAt
  DateTime deletedAt "nullable"
}
"UserlikesVideos" {
  Int id PK
  DateTime createdAt
  DateTime updatedAt
  DateTime deletedAt "nullable"
  Int userId FK
  Int videoId FK
}
"Video" }o--o| "SignLanguage" : signLanguage
"Video" }o--|| "HostingProvider" : hostingProvider
"UserlikesVideos" }o--|| "Video" : video

SignLanguage

Represents a sign language used in videos.

Properties

Video

Represents a video in the system.

Properties

HostingProvider

Represents a hosting provider for videos.

Properties

UserlikesVideos

Represents the relationship between users and videos they like.

Properties

Sites

erDiagram
"Site" {
  Int id PK
  String uuid UK
  String name
  String shortDescription "nullable"
  String longDescription "nullable"
  String telNumber "nullable"
  String email "nullable"
  String website "nullable"
  Float price
  SiteType type
  SiteTag tags
  DateTime createdAt
  DateTime updatedAt
  DateTime deletedAt "nullable"
  Int addressId FK
}
"SiteHasManager" {
  Int id PK
  Boolean isMain
  DateTime createdAt
  DateTime updatedAt
  DateTime deletedAt "nullable"
  Int siteId FK
  Int profileId FK
}
"SiteHasManager" }o--|| "Site" : site

Site

Represents a site in the system.

Properties

SiteHasManager

Represents the relationship between sites and their managers.

Properties

Exhibitions

erDiagram
"Exhibition" {
  Int id PK
  String name
  String shortDescription "nullable"
  String longDescription "nullable"
  DateTime startDate "nullable"
  DateTime endDate "nullable"
  DateTime createdAt
  DateTime updatedAt
  DateTime deletedAt "nullable"
  Int siteId FK
}
"ExhibitedItem" {
  Int id PK
  Int itemId FK
  Int exhibitionId FK
}
"ExhibitedItem" }o--|| "Exhibition" : exhibition

Exhibition

Represents an exhibition in the system.

Properties

ExhibitedItem

Represents an item exhibited in an exhibition.

Properties

Media

erDiagram
"Picture" {
  Int id PK
  String uuid UK
  String localPath "nullable"
  String hostingUrl
  DateTime createdAt
  DateTime updatedAt
  DateTime deletedAt "nullable"
  Int itemId FK "nullable"
  Int siteId FK "nullable"
}

Picture

Represents a picture in the system.

Properties

Logs

erDiagram
"UserLoginLog" {
  Int id PK
  DateTime loginTime
  Int userId FK
  Int providerId FK "nullable"
}
"UserActionLog" {
  Int id PK
  String action
  String object
  Int objectId
  String details "nullable"
  DateTime createdAt
  Int profileId FK
}
"SensitiveActionLog" {
  Int id PK
  String action
  String object
  Int objectId
  String details "nullable"
  DateTime createdAt
  Int profileId FK
}

UserLoginLog

Represents a log of user login attempts.

Properties

UserActionLog

Represents a log of user actions.

Properties

SensitiveActionLog

Represents a log of sensitive user actions.

Properties

Front

erDiagram
"RoleColor" {
  Int id PK
  Role role UK
  String color
}
"SiteTagColor" {
  Int id PK
  SiteTag siteTag UK
  String color
}
"SiteTypeColor" {
  Int id PK
  SiteType siteType UK
  String color
}
"PersonTypeColor" {
  Int id PK
  PersonType personType UK
  String color
}
"SanctionTypeColor" {
  Int id PK
  SanctionType sanctionType UK
  String color
}
"ValidationStatusColor" {
  Int id PK
  ValidationStatus validationStatus UK
  String color
}

RoleColor

Represents the color associated with each user role.

Properties

SiteTagColor

Represents the color associated with each site tag.

Properties

SiteTypeColor

Represents the color associated with each site type.

Properties

PersonTypeColor

Represents the color associated with each person type.

Properties

SanctionTypeColor

Represents the color associated with each sanction type.

Properties

ValidationStatusColor

Represents the color associated with each validation status.

Properties