... | @@ -20,9 +20,180 @@ Exemplo |
... | @@ -20,9 +20,180 @@ Exemplo |
|
# Modelagem do Banco de Dados
|
|
# Modelagem do Banco de Dados
|
|
A modelagem do banco de dados é TEXTO...
|
|
A modelagem do banco de dados é TEXTO...
|
|
|
|
|
|
## Tabela `Texto`
|
|
## Tabela User {
|
|
Representa as entidades 'Texto'. Suas colunas são:
|
|
id INT pk
|
|
- `texto`, chave primária da entidade
|
|
name TEXT
|
|
|
|
email VARCHAR(255)
|
|
|
|
password VARCHAR(255)
|
|
|
|
phone CHAR(11)
|
|
|
|
cpfcnpj VARCHAR(14)
|
|
|
|
photoURL TEXT
|
|
|
|
blocked BOOLEAN
|
|
|
|
registrarion_number VARCHAR(50)
|
|
|
|
institution_id INT fk
|
|
|
|
role_id INT fk
|
|
|
|
}
|
|
|
|
|
|
|
|
## Tabela Address {
|
|
|
|
id INT pk
|
|
|
|
user_id INT fk
|
|
|
|
street VARCHAR(100)
|
|
|
|
number VARCHAR(50)
|
|
|
|
complement VARCHAR(100)
|
|
|
|
neighborhood VARCHAR(50)
|
|
|
|
city VARCHAR(30)
|
|
|
|
state VARCHAR(30)
|
|
|
|
contry VARCHAR(30)
|
|
|
|
postalCode VARCHAR(8)
|
|
|
|
}
|
|
|
|
|
|
|
|
## Tabela Institution {
|
|
|
|
id INT pk
|
|
|
|
name TEXT
|
|
|
|
cnpj VARCHAR(14)
|
|
|
|
latitude DECIMAL(9,6),
|
|
|
|
longitude DECIMAL(9,6)
|
|
|
|
updatedAt DATETIME
|
|
|
|
updatedBy TEXT
|
|
|
|
}
|
|
|
|
|
|
|
|
## Tabela Role {
|
|
|
|
id INT pk
|
|
|
|
title TEXT
|
|
|
|
updatedAt DATETIME
|
|
|
|
updatedBy TEXT
|
|
|
|
}
|
|
|
|
|
|
|
|
## Tabela Event {
|
|
|
|
id INT pk
|
|
|
|
title TEXT
|
|
|
|
imageURL TEXT
|
|
|
|
description TEXT
|
|
|
|
date DATETIME
|
|
|
|
hour DATETIME
|
|
|
|
isOnline BOOLEAN
|
|
|
|
adress TEXT
|
|
|
|
latitude DECIMAL(9,6),
|
|
|
|
longitude DECIMAL(9,6),
|
|
|
|
project_id INT fk
|
|
|
|
institution_id INT fk
|
|
|
|
updatedBy TEXT
|
|
|
|
updatedAt DATETIME
|
|
|
|
}
|
|
|
|
|
|
|
|
## Tabela Project {
|
|
|
|
id INT pk
|
|
|
|
name TEXT
|
|
|
|
history TEXTUser {
|
|
|
|
id INT pk
|
|
|
|
name TEXT
|
|
|
|
email VARCHAR(255)
|
|
|
|
password VARCHAR(255)
|
|
|
|
phone CHAR(11)
|
|
|
|
cpfcnpj VARCHAR(14)
|
|
|
|
photoURL TEXT
|
|
|
|
blocked BOOLEAN
|
|
|
|
complement VARCHAR(100)
|
|
|
|
neighborhood
|
|
|
|
imageURL TEXT
|
|
|
|
purpose TEXT
|
|
|
|
contact VARCHAR(50)
|
|
|
|
start_date DATE
|
|
|
|
end_date DATE
|
|
|
|
status VARCHAR(30)
|
|
|
|
teacher_id INT fk
|
|
|
|
institution_id INT fk
|
|
|
|
updatedAt DATETIME
|
|
|
|
updatedBy TEXT
|
|
|
|
}
|
|
|
|
|
|
|
|
## Tabela Category {
|
|
|
|
id INT pk
|
|
|
|
name TEXT
|
|
|
|
type INT
|
|
|
|
updatedAt DATETIME
|
|
|
|
updatedBy TEXT
|
|
|
|
}
|
|
|
|
|
|
|
|
## Tabela Keyword {
|
|
|
|
id INT pk,
|
|
|
|
word TEXT
|
|
|
|
updatedAt DATETIME
|
|
|
|
updatedBy TEXT
|
|
|
|
}
|
|
|
|
|
|
|
|
## Tabela GeneralParameters {
|
|
|
|
id INT pk,
|
|
|
|
parameter Json
|
|
|
|
content TEXT
|
|
|
|
updatedAt DATETIME
|
|
|
|
updatedBy TEXT
|
|
|
|
}
|
|
|
|
|
|
|
|
## Tabela SocialNetwork {
|
|
|
|
id INT pk
|
|
|
|
name TEXT
|
|
|
|
icon TEXT
|
|
|
|
updatedAt DATETIME
|
|
|
|
updatedBy TEXT
|
|
|
|
}
|
|
|
|
|
|
|
|
## Tabela Post {
|
|
|
|
id INT pk
|
|
|
|
content TEXT
|
|
|
|
project_id INT fk
|
|
|
|
event_id INT fk
|
|
|
|
user_id INT fk
|
|
|
|
updatedAt DATETIME
|
|
|
|
updatedBy TEXT
|
|
|
|
}
|
|
|
|
|
|
|
|
## Tabela PostLikes {
|
|
|
|
id INT pk
|
|
|
|
post_id INT fk
|
|
|
|
user_id INT fk
|
|
|
|
updatedAt DATETIME
|
|
|
|
updatedBy TEXT
|
|
|
|
}
|
|
|
|
|
|
|
|
## Tabela PostComments {
|
|
|
|
id INT pk
|
|
|
|
content TEXT
|
|
|
|
post_id INT fk
|
|
|
|
user_id INT fk
|
|
|
|
updatedAt DATETIME
|
|
|
|
updatedBy TEXT
|
|
|
|
}
|
|
|
|
|
|
|
|
//many to many
|
|
|
|
## Tabela ProjectCategory {
|
|
|
|
project_id INT fk
|
|
|
|
category_id INT fk
|
|
|
|
updatedAt DATETIME
|
|
|
|
updatedBy TEXT
|
|
|
|
}
|
|
|
|
|
|
|
|
## Tabela EventCategory {
|
|
|
|
event_id INT fk
|
|
|
|
category_id INT fk
|
|
|
|
updatedAt DATETIME
|
|
|
|
updatedBy TEXT
|
|
|
|
}
|
|
|
|
|
|
|
|
## Tabela ProjectKeyword {
|
|
|
|
project_id INT fk,
|
|
|
|
keyword_id INT fk
|
|
|
|
updatedAt DATETIME
|
|
|
|
updatedBy TEXT
|
|
|
|
}
|
|
|
|
|
|
|
|
## Tabela UsersSocialNetwork {
|
|
|
|
user_id INT fk
|
|
|
|
social_network_id INT fk
|
|
|
|
social_network_URL TEXT
|
|
|
|
updatedAt DATETIME
|
|
|
|
updatedBy TEXT
|
|
|
|
}
|
|
|
|
|
|
## Tabela `Texto`
|
|
## Tabela `Texto`
|
|
Utilizada para 'Texto'. Suas colunas são:
|
|
Utilizada para 'Texto'. Suas colunas são:
|
... | | ... | |