Backend Models Reference
Autogenerated reference for backend document models.
AlertConfig
- Collection:
alertConfigs
- Indexes:
pool_id, updated_at
| Field |
Alias |
Type |
Required |
Default |
Enum |
Description |
id |
_id |
PydanticObjectId | None |
No |
|
|
MongoDB document ObjectID |
revision_id |
revision_id |
UUID | None |
No |
|
|
|
pool_id |
poolId |
PydanticObjectId |
Yes |
PydanticUndefined |
|
|
ph_min |
phMin |
float |
Yes |
PydanticUndefined |
|
|
ph_max |
phMax |
float |
Yes |
PydanticUndefined |
|
|
chlorine_min |
chlorineMin |
float |
Yes |
PydanticUndefined |
|
|
chlorine_max |
chlorineMax |
float |
Yes |
PydanticUndefined |
|
|
temperature_min |
temperatureMin |
float |
Yes |
PydanticUndefined |
|
|
temperature_max |
temperatureMax |
float |
Yes |
PydanticUndefined |
|
|
created_at |
createdAt |
datetime |
No |
factory:utcnow |
|
|
updated_at |
updatedAt |
datetime |
No |
factory:utcnow |
|
|
Invite
- Collection:
invites
- Indexes:
owner_id, technician_id, pool_id, status, expires_at
| Field |
Alias |
Type |
Required |
Default |
Enum |
Description |
id |
_id |
PydanticObjectId | None |
No |
|
|
MongoDB document ObjectID |
revision_id |
revision_id |
UUID | None |
No |
|
|
|
owner_id |
ownerId |
PydanticObjectId |
Yes |
PydanticUndefined |
|
|
technician_id |
technicianId |
PydanticObjectId |
Yes |
PydanticUndefined |
|
|
pool_id |
poolId |
PydanticObjectId |
Yes |
PydanticUndefined |
|
|
status |
status |
accepted | pending | declined |
No |
pending |
|
|
created_at |
createdAt |
datetime |
No |
factory:utcnow |
|
|
responded_at |
respondedAt |
datetime | None |
No |
|
|
|
expires_at |
expiresAt |
datetime | None |
No |
|
|
|
Message
- Collection:
messages
- Indexes:
thread_id, pool_id, author_id, message_type, created_at
| Field |
Alias |
Type |
Required |
Default |
Enum |
Description |
id |
_id |
PydanticObjectId | None |
No |
|
|
MongoDB document ObjectID |
revision_id |
revision_id |
UUID | None |
No |
|
|
|
thread_id |
threadId |
PydanticObjectId |
Yes |
PydanticUndefined |
|
|
pool_id |
poolId |
PydanticObjectId |
Yes |
PydanticUndefined |
|
|
author_id |
authorId |
PydanticObjectId |
Yes |
PydanticUndefined |
|
|
author_role |
authorRole |
owner | technician | admin |
Yes |
PydanticUndefined |
|
|
message_type |
messageType |
question | answer |
Yes |
PydanticUndefined |
|
|
body |
body |
str |
Yes |
PydanticUndefined |
|
|
reply_to_message_id |
replyToMessageId |
PydanticObjectId | None |
No |
|
|
|
created_at |
createdAt |
datetime |
No |
factory:utcnow |
|
|
updated_at |
updatedAt |
datetime | None |
No |
|
|
|
MessageThread
- Collection:
message_threads
- Indexes:
pool_id, created_by, status, last_message_at, visit_id
| Field |
Alias |
Type |
Required |
Default |
Enum |
Description |
id |
_id |
PydanticObjectId | None |
No |
|
|
MongoDB document ObjectID |
revision_id |
revision_id |
UUID | None |
No |
|
|
|
pool_id |
poolId |
PydanticObjectId |
Yes |
PydanticUndefined |
|
|
created_by |
createdBy |
PydanticObjectId |
Yes |
PydanticUndefined |
|
|
created_by_role |
createdByRole |
owner | technician | admin |
Yes |
PydanticUndefined |
|
|
subject |
subject |
str |
Yes |
PydanticUndefined |
|
|
status |
status |
open | answered | closed |
No |
open |
|
|
visit_id |
visitId |
PydanticObjectId | None |
No |
|
|
|
last_message_at |
lastMessageAt |
datetime |
No |
factory:utcnow |
|
|
last_message_preview |
lastMessagePreview |
str | None |
No |
|
|
|
last_message_author_id |
lastMessageAuthorId |
PydanticObjectId | None |
No |
|
|
|
last_message_author_role |
lastMessageAuthorRole |
owner | technician | admin | None |
No |
|
|
|
last_message_type |
lastMessageType |
question | answer | None |
No |
|
|
|
created_at |
createdAt |
datetime |
No |
factory:utcnow |
|
|
updated_at |
updatedAt |
datetime |
No |
factory:utcnow |
|
|
Photo
- Collection:
photos
- Indexes:
user_id, visit_id, pool_id, thread_id, message_id, uploaded_by, created_at
| Field |
Alias |
Type |
Required |
Default |
Enum |
Description |
id |
_id |
PydanticObjectId | None |
No |
|
|
MongoDB document ObjectID |
revision_id |
revision_id |
UUID | None |
No |
|
|
|
file_name |
fileName |
str |
Yes |
PydanticUndefined |
|
|
blob_path |
blobPath |
str |
Yes |
PydanticUndefined |
|
|
content_type |
contentType |
str |
Yes |
PydanticUndefined |
|
|
size |
size |
int |
Yes |
PydanticUndefined |
|
Size in bytes |
user_id |
userId |
PydanticObjectId | None |
No |
|
|
|
visit_id |
visitId |
PydanticObjectId | None |
No |
|
|
|
pool_id |
poolId |
PydanticObjectId | None |
No |
|
|
|
thread_id |
threadId |
PydanticObjectId | None |
No |
|
|
|
message_id |
messageId |
PydanticObjectId | None |
No |
|
|
|
uploaded_by |
uploadedBy |
PydanticObjectId | None |
No |
|
|
|
created_at |
createdAt |
datetime |
No |
factory:<lambda> |
|
|
description |
description |
str | None |
No |
|
|
|
Pool
- Collection:
pools
- Indexes:
owner_id, technician_ids
| Field |
Alias |
Type |
Required |
Default |
Enum |
Description |
id |
_id |
PydanticObjectId | None |
No |
|
|
MongoDB document ObjectID |
revision_id |
revision_id |
UUID | None |
No |
|
|
|
owner_id |
ownerId |
PydanticObjectId |
Yes |
PydanticUndefined |
|
Ref User owner |
name |
name |
str |
Yes |
PydanticUndefined |
|
Nombre de la piscina |
location |
location |
PoolLocation |
Yes |
PydanticUndefined |
|
Ubicación geográfica de la piscina |
volume |
volume |
float | None |
No |
|
|
Volumen de la piscina |
depth |
depth |
float | None |
No |
|
|
Profundidad de la piscina |
pool_type |
poolType |
SALTY | CHLORINE |
Yes |
PydanticUndefined |
|
|
technician_ids |
technicianIds |
list[PydanticObjectId] |
No |
factory:list |
|
|
created_at |
createdAt |
datetime |
No |
factory:utcnow |
|
|
updated_at |
updatedAt |
datetime |
No |
factory:utcnow |
|
|
PoolValues
- Collection:
poolValues
- Indexes:
pool_id, created_at
| Field |
Alias |
Type |
Required |
Default |
Enum |
Description |
id |
_id |
PydanticObjectId | None |
No |
|
|
MongoDB document ObjectID |
revision_id |
revision_id |
UUID | None |
No |
|
|
|
pool_id |
poolId |
PydanticObjectId |
Yes |
PydanticUndefined |
|
|
ph |
ph |
float |
Yes |
PydanticUndefined |
|
|
chlorine |
chlorine |
float |
Yes |
PydanticUndefined |
|
|
temperature |
temperature |
float |
Yes |
PydanticUndefined |
|
|
is_ok |
isOk |
bool |
Yes |
PydanticUndefined |
|
|
created_at |
createdAt |
datetime |
No |
factory:utcnow |
|
|
User
- Collection:
users
- Indexes:
email
| Field |
Alias |
Type |
Required |
Default |
Enum |
Description |
id |
_id |
PydanticObjectId | None |
No |
|
|
MongoDB document ObjectID |
revision_id |
revision_id |
UUID | None |
No |
|
|
|
name |
name |
str |
Yes |
PydanticUndefined |
|
Nombre |
last_name |
lastName |
str |
Yes |
PydanticUndefined |
|
Apellido |
email |
email |
Indexed EmailStr |
Yes |
PydanticUndefined |
|
Correo único |
password_hash |
passwordHash |
str | None |
No |
|
|
Hash de contraseña |
role |
role |
UserRole |
No |
UserRole.owner |
admin, owner, technician |
Rol del usuario |
status |
status |
UserStatus |
No |
UserStatus.pending |
active, blocked, pending, deleted |
Estado del usuario |
created_at |
createdAt |
datetime |
No |
factory:<lambda> |
|
|
last_login_at |
lastLoginAt |
datetime | None |
No |
|
|
Último login |
deleted_at |
deletedAt |
datetime | None |
No |
|
|
Fecha de borrado lógico |
Visit
- Collection:
visits
- Indexes:
date, technician_id, pool_id, pool_value_id, status
| Field |
Alias |
Type |
Required |
Default |
Enum |
Description |
id |
_id |
PydanticObjectId | None |
No |
|
|
MongoDB document ObjectID |
revision_id |
revision_id |
UUID | None |
No |
|
|
|
date |
date |
datetime |
Yes |
PydanticUndefined |
|
|
technician_id |
technicianId |
PydanticObjectId |
Yes |
PydanticUndefined |
|
|
pool_id |
poolId |
PydanticObjectId |
Yes |
PydanticUndefined |
|
|
pool_value_id |
poolValueId |
PydanticObjectId | None |
No |
|
|
|
is_pool_ok |
isPoolOk |
bool | None |
No |
|
|
|
is_ok |
isOk |
bool | None |
No |
|
|
|
actions |
actions |
str | None |
No |
|
|
|
problem |
problem |
str | None |
No |
|
|
|
status |
status |
pending | in_progress | resolved |
No |
pending |
|
|
observations |
observations |
str | None |
No |
|
|
|