Models¶
The models are described using Sequelize as object-relational mapping.
The source code for Sequelize’s objects are at src/models.
Users¶
-
class
UsuarioBaseModel(data)¶ Represents a user.
Arguments: - data (Object) – Data sent to server.
- data.primeiro_nome (string) – First name.
- data.ultimo_nome (string) – Family name.
- data.email (string) – Email address.
- data.senha (string) – Password for the user. We store a hash of the password.
- data.ativo (number) – 1 if account is active and 0 if account was disabled.
- data.admin (number) – 1 if account has admin rights and 0 otherwise.
Returns: Promise – Promise instance of Sequelize object that was created.
Images¶
-
class
ImagemModel(data)¶ Represents a image.
Arguments: - data (Object) – Data sent to server.
- data.nome (string) – Identifier for the image.
- data.doi (string) – DOI assign to the image.
- data.codigo_lamina (string) – Code from the glass.
- data.excluida (number) – 1 if image was removed and 0 otherwise.
- data.classificacao_aprovada (number) – 1 if image was approved and 0 otherwise.
- data.dt_aquisicao (string) – date when the image was scanned.
- data.altura (number) – height of the image in number of pixels.
- data.largura (number) – width of the image in number of pixels.
- data.id_usuario (number) – Integer referencing UsuarioBaseModel.
- data.id_lesao (number) – Integer referencing LesaoModel.
Returns: Promise – Promise instance of Sequelize object that was created.
Injury¶
-
class
LesaoModel(data)¶ Represents a injury.
Arguments: - data (Object) – Data sent to server.
- data.nome (string) – Name of the injury.
- data.detalhes (string) – Details of the injury.
- data.grade (number) – Integer indicating how severe is the injury. Higher number means more severe.
Returns: Promise – Promise instance of Sequelize object that was created.
Description¶
-
class
DescricaoModel(data)¶ Represents a injury.
Arguments: - data (Object) – Data sent to server.
- data.codigo (string) – Code used in the decision tree.
- data.nome (string) – Name of the node in the decision tree.
Returns: Promise – Promise instance of Sequelize object that was created.
Cells¶
-
class
CelulaModel(data)¶ Represents a cell.
Arguments: - data (Object) – Data sent to server.
- data.id_imagem (number) – Integer referencing ImagemModel where the cell belongs.
- data.id_descricao (number) – Integer referencing DescricaoModel that identify the description of the cell.
Returns: Promise – Promise instance of Sequelize object that was created.
-
class
ClassificacaoCelulaModel(data)¶ Represents the classification of one cell.
Arguments: - data (Object) – Data sent to server.
- data.coord_centro_nucleo_x (number) – Integer of coordinate x of the pixel that represents the cell.
- data.coord_centro_nucleo_y (number) – Integer of coordinate y of the pixel that represents the cell.
- data.id_lesao (number) – Integer referencing LesaoModel that identify the injury the cell has.
- data.id_usuario (number) – Integer referencing UsuarioBaseModel that create the classification.
- data.id_imagem (number) – Integer referencing ImagemModel where the classification belongs.
Returns: Promise – Promise instance of Sequelize object that was created.
-
class
SegmentacaoCitoplasmaModel(data)¶ Represents a cell.
Arguments: - data (Object) – Data sent to server.
- data.coord_x (number) – Integer of coordinate x of the pixel that is part of the cytoplasm segmentation.
- data.coord_y (number) – Integer of coordinate y of the pixel that is part of the cytoplasm segmentation.
- data.id_usuario (number) – Integer referencing UsuarioBaseModel that create the segmentation.
- data.id_celula (number) – Integer referencing CelulaModel where the segmentation belongs.
Returns: Promise – Promise instance of Sequelize object that was created.
-
class
SegmentacaoNucleoModel(data)¶ Represents a cell.
Arguments: - data (Object) – Data sent to server.
- data.coord_x (number) – Integer of coordinate x of the pixel that is part of the nucleus segmentation.
- data.coord_y (number) – Integer of coordinate y of the pixel that is part of the nucleus segmentation.
- data.id_usuario (number) – Integer referencing UsuarioBaseModel that create the segmentation.
- data.id_celula (number) – Integer referencing CelulaModel where the segmentation belongs.
Returns: Promise – Promise instance of Sequelize object that was created.
Authorization¶
-
class
SessaoUsuarioModel(data)¶ Represents the session of one user.
Arguments: - data (Object) – Data sent to server.
- data.email (string) – Email address of user.
- data.token_autenticacao (string) – Authorization token assigned to the email address.
Returns: Promise – Promise instance of Sequelize object that was created.