-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
16 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,11 @@ | ||
from pydantic import BaseModel | ||
from bson import ObjectId | ||
|
||
|
||
class Bank(BaseModel): | ||
label: str | ||
bcra_id: str | ||
|
||
|
||
class BankDB(Bank): | ||
id: str | None | ||
|
||
def __init__(self, **bank): | ||
if "_id" in bank and isinstance(bank["_id"], ObjectId): | ||
bank["id"] = str(bank["_id"]) | ||
super().__init__(**bank) | ||
|
||
|
||
class AdminCredentials(BaseModel): | ||
username: str | ||
password: str |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
ERR_BANK_NOT_FOUND = "Banco no encontrado." | ||
ERR_BANK_ALREADY_EXISTS = "El banco con id {id} ya existe." | ||
ERR_BANK_NOT_CHANGED = "El banco ingresado posee los mismos datos." | ||
ERR_FAILED_TO_UPDATE = "No se pudo actualizar la lista de bancos." | ||
ERR_SCHEMA = "Los datos ingresados no tienen la estructura adecuada. Argumentos faltantes o incorrectos: {err_args}." | ||
MSG_SUCCESS_GENERIC = "Éxito al realizar la operación." | ||
MSG_SUCCESS_SAVE = "Exito al guardar los datos." | ||
MSG_ERROR_UNAUTHORIZED = "No autorizado." | ||
MSG_ERROR_UNAUTHORIZED = "No autorizado." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters