Base de datos creada. Diagrama de clases agregado. Documentación de diagrama de clases y DER agregados.
This commit is contained in:
@@ -0,0 +1,455 @@
|
||||
@startuml
|
||||
' Configuración visual
|
||||
skinparam classAttributeIconSize 0
|
||||
skinparam linetype ortho
|
||||
|
||||
interface INotificadorTurnos <<interface>>
|
||||
{
|
||||
+ NotificarCancelacionTurno(mensaje:string, turno : Turno, destinatario : string)
|
||||
+ NotificarAsignacionTurno(mensaje:string, turno : Turno, destinatario : string)
|
||||
+ NotificarRecordatorio(mensaje:string, turno : Turno, destinatario : string)
|
||||
}
|
||||
|
||||
interface INotificadorCrearCliente <<interface>>
|
||||
{
|
||||
+ NotificarClienteCreado (cliente : Cliente, mensaje : string, destinatario : string)
|
||||
}
|
||||
|
||||
interface INotificadorCrearProfesional <<interface>>
|
||||
{
|
||||
+ NotificarProfesionalCreado(profesional : Profesional, mensaje : string, destinatario : string)
|
||||
}
|
||||
|
||||
interface INotificadorUsuario <<interface>> {
|
||||
+ NotificarRecuperacionCredenciales(destinatario: string, link : string, token : string)
|
||||
}
|
||||
|
||||
class ServicioMail {
|
||||
- mensaje : string
|
||||
- T : Turno //dentro de Turno, tengo el correo del destinatario
|
||||
|
||||
+ ServicioMail(T : Turno, mensaje: string)
|
||||
+ ServicioMail(mensaje: string)
|
||||
|
||||
+ NotificarCancelacionTurno(mensaje:string, turno : Turno, destinatario : string)
|
||||
+ NotificarAsignacionTurno(mensaje:string, turno : Turno, destinatario : string)
|
||||
+ NotificarRecordatorio(mensaje:string, turno : Turno, destinatario : string)
|
||||
|
||||
+ NotificarClienteCreado (cliente : Cliente, mensaje : string, destinatario : string)
|
||||
|
||||
+ NotificarProfesionalCreado(profesional : Profesional, mensaje : string, destinatario : string)
|
||||
|
||||
+ NotificarRecuperacionCredenciales(token : string, destinatario: string)
|
||||
}
|
||||
|
||||
class AuthController {
|
||||
//Recuperacion
|
||||
+ RecuperarProf(ROL : string, usuario : string, email :string, notificador : INotificadorUsuario) : void
|
||||
+ RecuperarCli(usuario : string, email :string, notificador : INotificadorUsuario) : void
|
||||
|
||||
+ RecuperarAdmin(DNI : string, correo : string, CUIL : string) //En caso de que el admin se olvide su usuario
|
||||
|
||||
- GenerarToken(ROL : string, usuario : string) : string //genera y guarda en la base de datos
|
||||
- ExisteUsuario(ROL : string, usuario : string) : bool
|
||||
- CorreoPertenece(ROL : string, ID_Credencial : integer) : bool
|
||||
- ExisteAdmin(DNI, correo, CUIL) : bool
|
||||
|
||||
//Login
|
||||
+ LoginCliente(string, string) : bool
|
||||
+ LoginProfesional(string, string) : bool
|
||||
}
|
||||
|
||||
package "Gestión de Usuarios" {
|
||||
class Persona {
|
||||
- Per_DNI: integer
|
||||
- Per_Nombre: string
|
||||
- Per_Apellido: string
|
||||
- Per_CUIL: string
|
||||
- Per_FechaNac: date
|
||||
|
||||
+ Persona(integer, string, string, string, date) : void
|
||||
- Existe(Per_DNI) : bool
|
||||
+ GuardarPersona(p:Persona, telefonos : array, foto_nombre:string, foto_mime_type: string, foto_tamanio_bytes: string, foto_extension: string) : bool
|
||||
}
|
||||
|
||||
class Telefono {
|
||||
- Tel_ID: integer
|
||||
- Tel_Numero: bigint
|
||||
|
||||
+ GuardarTelefono(DNI : integer, Telefono : integer) : void
|
||||
- Existe() : bool
|
||||
+ GetTelefonos (DNI: integer) : array
|
||||
}
|
||||
|
||||
class Administrador {
|
||||
- Admin_Correo: string
|
||||
- Admin_DNI: integer
|
||||
|
||||
+ Administrador(correo: string, dni: integer) : void
|
||||
|
||||
+ Recuperacion(correo : string, dni : integer, matricula : integer) : void
|
||||
+ EditarAdmin(nombre: string, apellido: string, correo: string, correoViejo: string, dni: integer) : bool
|
||||
|
||||
+ Login(string, string) : bool
|
||||
+ CerrarSesion() : void
|
||||
|
||||
+ VerLogs() : array
|
||||
}
|
||||
|
||||
class Cliente {
|
||||
- Cli_DNI: integer
|
||||
- Cli_Correo: string
|
||||
|
||||
+ Cliente(correo: string, dni: integer, foto_nombre:string, foto_mime_type: string, foto_tamanio_bytes: string, foto_extension: string) : bool
|
||||
+ Login(string, string) : bool
|
||||
+ EnviarFormulario(NombreyApellido:string, correo:string, celular:string, matriculaProfPref: string, dniProfPref: integer) : bool //se crea una instancia de formulario
|
||||
+ GuardarCliente(Cliente) : bool
|
||||
+ EditarCliente(integer, string, string, string, date, string) : bool
|
||||
+ MostrarClientes() : array
|
||||
+ CambiarEstado(Prof_DNI: integer, Prof_Matricula) : void
|
||||
+ CerrarSesion() : void
|
||||
}
|
||||
|
||||
class Profesional {
|
||||
- Profesion_ID: integer
|
||||
- Profesional_Matricula: integer
|
||||
- Prof_Correo: string
|
||||
|
||||
+ Profesional(matricula : integer, correo : string)
|
||||
+ Profesional(id : integer, matricula : integer, correo : string)
|
||||
|
||||
+ Login(string, string) : bool
|
||||
+ CerrarSesion() : void
|
||||
+ Recuperacion(correo : string, dni : integer, matricula : integer)
|
||||
+ EditarProfesional(Profesion_DNI:integer, Profesion_Matricula : integer, Persona, Foto) : bool
|
||||
+ AddProfesional(Profesion_DNI:integer, Profesion_Matricula : integer, Persona, Foto) : bool
|
||||
+ VerProfesionales() : array
|
||||
+ ConfigurarAgenda() : void
|
||||
|
||||
+ DarDeBaja() : void
|
||||
|
||||
+ CrearTurnoManual(F : Formulario, FechaHora : datetime) : Turno//crea una instancia de turno, llamo a GuardarTurno() de Agenda
|
||||
|
||||
+ CrearTurnoAutomatico(F : Formulario) : Turno //crea una instancia de turno, llamo a GuardarTurno() de Agenda
|
||||
}
|
||||
|
||||
class Credencial {
|
||||
- Cred_Usuario: string
|
||||
- Cred_Contra: string
|
||||
- ROL: string
|
||||
|
||||
+ Credencial(userForm : string, passForm : string, ROL : string) //verificar si no existe ese usuario
|
||||
+ LoginProfesional(userForm : string, passForm : string) : bool //verificar estado del profesional (si está de baja, no debe poder iniciar sesion)
|
||||
+ LoginCliente(userForm : string, passForm : string) : bool //Verificar si está de baja
|
||||
|
||||
- CredencialCorrecta(string, string) : bool
|
||||
+ GuardarCredencial(Credencial) : integer //Devuelve el ID generado por la BD
|
||||
+ CambiarContrasenia(ID_Credencial : integer, pass : string, ROL : string) : bool
|
||||
+ GuardarToken(token : string, HoraFecha : datetime) : void
|
||||
+ ValidarToken(ROL : string, tokenForm: string, ID_Credencial : integer) : bool
|
||||
+ ExisteUsuario(ROL : string, usuario : string) : bool
|
||||
}
|
||||
|
||||
class EstadoProfesional {
|
||||
- Estado_ID: integer
|
||||
- Estado_Descripcion: string
|
||||
|
||||
+ BajaProfesional(Prof_DNI: string, Prof_Matricula: string)
|
||||
+ ReactivarProfesional(Prof_DNI: string, Prof_Matricula: string)
|
||||
}
|
||||
}
|
||||
|
||||
package "Gestión de Turnos y Agenda" {
|
||||
class Turno {
|
||||
- Turno_ID: integer
|
||||
- Turno_Inicio: datetime
|
||||
- Turno_Correo: string //En caso de que no sea Cliente, sino un visitante
|
||||
- Turno_NombreCompleto: string //En caso de que no sea Cliente, sino un visitante
|
||||
|
||||
+ Turno(Turno_Inicio : datetime, Turno_Correo : string, Turno_NombreCompleto : string) //Si es cliente, correo y nombre son NULL
|
||||
+ CancelarTurno(ID_Turno : integer, INotificador : INotificadorTurnos)
|
||||
+ VerTurnosCliente(Cliente_DNI: integer)
|
||||
+ VerTurnosProfesional(id_Profesion : integer, Prof_Matricula : integer)
|
||||
|
||||
}
|
||||
|
||||
class EstadoTurno {
|
||||
- EstadoTurno_ID: integer
|
||||
- EstadoTurno_Descripcion: string
|
||||
|
||||
+ EstadoTurno()
|
||||
+ CambiarEstado(descripcion : string) : void
|
||||
}
|
||||
|
||||
class Agenda {
|
||||
- Agenda_ID: integer
|
||||
- Estado: string
|
||||
- DuracionTurno: integer
|
||||
|
||||
+ Agenda(DuracionTurno: integer, prof: Profesional)
|
||||
+ VerAgenda(): Agenda
|
||||
+ GuardarTurno(T: Turno, INotificador : INotificadorTurnos) : bool
|
||||
- Disponible(date) : bool //para asignar manualmente
|
||||
- VerificarDisponibilidad(f: Formulario) : datetime //Para asignacion automatica
|
||||
+ GuardarDiaDeAtencion(DiaAtencion) : void
|
||||
+ GuardarModoVacaciones(ModoVacaciones) : void
|
||||
+ GuardarFeriado(Feriado) : void
|
||||
}
|
||||
|
||||
class DiaDeAtencion {
|
||||
- Dia_ID: integer
|
||||
|
||||
+ DiaDeAtencion(ID_Dia : integer) //Los id los voy a hardcodear
|
||||
+ GuardarHorarioAtencion(HorarioAtencion) : void
|
||||
+ GuardarHorarioReceso(HorarioReceso) : void
|
||||
|
||||
+ BuscarID() : integer
|
||||
|
||||
+ EliminarHorarioAtencion(ID : integer) : void
|
||||
+ EliminarHorarioReceso(ID : integer) : void
|
||||
}
|
||||
|
||||
class HorarioAtencion {
|
||||
- Horario_ID: integer
|
||||
- Horario_Comienzo: time
|
||||
- Horario_Final : time
|
||||
|
||||
+ HorarioAtencion(Inicio : time, Final : time) : HorarioAtencion
|
||||
- BuscarIDHorarioAtencion(HorarioAtencion) : integer
|
||||
+ EliminarHorarioAtencion(HorarioAtencion) : void
|
||||
}
|
||||
|
||||
class HorarioReceso {
|
||||
- Receso_ID: integer
|
||||
- Receso_Comienzo: time
|
||||
- Receso_Fin: time
|
||||
|
||||
+ HorarioReceso(Inicio : time, Final : time) : HorarioReceso
|
||||
- BuscarIDHorarioReceso(HorarioReceso) : integer
|
||||
+ EliminarHorarioReceso(HorarioReceso) : void
|
||||
}
|
||||
|
||||
class ModoVacaciones {
|
||||
- Vacaciones_ID: integer
|
||||
- Vacaciones_Inicio: date
|
||||
- Vacaciones_Fin: date
|
||||
|
||||
+ ModoVacaciones(Inicio : time, Final : time)
|
||||
- BuscarIDModoVacaciones(ModoVacaciones) : integer
|
||||
+ EliminarModoVacaciones(ModoVacaciones) : void
|
||||
- ValidarFecha(inicio, fin) : bool
|
||||
}
|
||||
|
||||
class Feriados {
|
||||
-Feriado_ID: integer
|
||||
-Feriado_fecha : date
|
||||
-Feriado_Descripcion : string
|
||||
|
||||
+ Feriado(fecha : date, descripcion : string)
|
||||
- BuscarIDFeriado(Feriado) : integer
|
||||
+ EliminarFeriado(Feriado) : void
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class Profesion {
|
||||
- Profesion_ID: integer
|
||||
- Profesion_Titulo: string
|
||||
- VisibleEnFormulario: bool
|
||||
|
||||
- Existe(titulo:string) : bool
|
||||
+ AddProfesion(Titulo:string)
|
||||
+ DesactivarProfesion(Profesion_ID: integer) //VisibleEnFormulario = false
|
||||
}
|
||||
|
||||
class Servicio {
|
||||
- Ser_ID: integer
|
||||
- Ser_Descripcion: string
|
||||
- Ser_Titulo: string
|
||||
- Estado: string
|
||||
|
||||
- Existe(titulo : string) : bool //se llama antes de agregar un servicio
|
||||
- BuscarID(titulo : string) : integer
|
||||
+ AddServicio(titulo:string, descripcion:string, foto_nombre:string, foto_mime_type: string, foto_tamanio_bytes: string, foto_extension: string, Id_profesion: integer)
|
||||
+ EditarServicio(Ser_ID:integer, titulo:string, descripcion:string, foto_nombre:string, foto_mime_type: string, foto_tamanio_bytes: string, foto_extension: string)
|
||||
+ DesactivarServicio(Ser_ID:integer)
|
||||
}
|
||||
|
||||
class ContenidoWeb {
|
||||
- Contenido_ID: integer
|
||||
- QuienesSomos: string
|
||||
|
||||
+ EditarUbicacion(id : integer, string)
|
||||
+ EditarServicio(Ser_ID:integer, titulo:string, descripcion:string, foto_nombre:string, foto_mime_type: string, foto_tamanio_bytes: string, foto_extension: string)
|
||||
+ EditarQuienesSomos(string)
|
||||
}
|
||||
|
||||
class Ubicacion {
|
||||
- Ubi_ID: integer
|
||||
- Ubi_Link: string
|
||||
|
||||
+ Ubicacion (id : integer, string)
|
||||
|
||||
+ AddUbi(Ubicacion) : void
|
||||
+ EditarUbi(id : integer, string) : void
|
||||
- BuscarIDUbicacion(Ubicacion) : integer
|
||||
- GuardarUbi(id : integer, string) : void
|
||||
+ EliminarUbicacion(id : integer) : void
|
||||
}
|
||||
|
||||
class Foto {
|
||||
- Foto_ID: integer
|
||||
- Foto_Extension: string
|
||||
- Foto_Tamanio_bytes: integer
|
||||
- Foto_mime_type: string
|
||||
- Foto_Nombre: string
|
||||
|
||||
+ Foto(foto_nombre:string, foto_mime_type: string, foto_tamanio_bytes: string, foto_extension: string)
|
||||
+ GuardarFoto(Per_DNI : integer, Ser_ID : integer, Foto) //si la foto corresponde a una persona Ser_ID es null, si la foto correasponde a un servicio Per_DNI es null
|
||||
- GuardarRelacionConPersona(Foto_ID: integer, Per_DNI: integer)
|
||||
- GuardarRelacionConServicio(Foto_ID: integer, Ser_ID: integer)
|
||||
+ EditarFoto(Per_DNI : integer, Ser_ID : integer, Foto)
|
||||
- BuscarIDFoto(DNI : integer) : integer
|
||||
}
|
||||
|
||||
class DocumentacionCliente {
|
||||
- Doc_ID: integer
|
||||
- Doc_Nombre: string
|
||||
- Doc_mimetype: string
|
||||
- Doc_Tamanio_bytes: integer
|
||||
- Doc_Extension: string
|
||||
|
||||
+ DocumentacionCliente(doc_nombre:string, doc_mime_type: string, doc_tamanio_bytes: string, doc_extension: string)
|
||||
+ AgregarDocumentos(DocumentacionClienteProf_DNI, Prof_DNI : integer, Prof_Matricula : integer, Cli_DNI: integer)
|
||||
+ EliminarDocumento()
|
||||
+ EditarDocumento(ID_Documento : integer, Prof_DNI: integer, Cli_DNI: integer, DocumentacionCliente) //Hago una nueva instancia y la reemplazo en la base de datos
|
||||
}
|
||||
|
||||
|
||||
package "Solicitudes" {
|
||||
class Formulario {
|
||||
- Form_ID: integer
|
||||
- Form_Descripcion: string
|
||||
- Form_NombreCompleto: string
|
||||
- Form_Correo: string
|
||||
- Form_Celular: integer
|
||||
- Form_DNIProfPref: integer
|
||||
- Form_MatriculaProfPref: integer
|
||||
- FechaEnvio: date
|
||||
|
||||
+ Formulario(integer,string,string, string, integer, integer,integer,date)
|
||||
+ VerEstadoFormulario(ID_Formulario : integer) : string
|
||||
- BuscarIDFormulario(Formulario) : integer
|
||||
+ MostrarFormularios () : array
|
||||
+ Devolver(Profesional) : void
|
||||
+ Aceptar(Profesional) : void
|
||||
+ Rechazar(Profesional) : void
|
||||
+ VerFormulario (ID_Formulario : integer) : Formulario
|
||||
- CambiarEstadoConProf(Profesional, ID_Formulario : integer, estado : string) : void
|
||||
}
|
||||
|
||||
class HorarioPreferencia {
|
||||
- Horario_ID: integer
|
||||
- Horario_Descripcion: string
|
||||
|
||||
+ HorarioPreferencia(id : integer, descripcion : string)
|
||||
}
|
||||
|
||||
class DiaPreferencia {
|
||||
- Dia_ID: integer
|
||||
- Dia_Descripcion: string
|
||||
|
||||
+ DiaPreferencia(id : integer, descripcion : string)
|
||||
}
|
||||
|
||||
class Modalidad {
|
||||
- Modalidad_ID: integer
|
||||
- Modalidad_Descripcion: string
|
||||
|
||||
+ Modalidad(id : integer, descripcion : string)
|
||||
}
|
||||
}
|
||||
|
||||
' --- RELACIONES ---
|
||||
|
||||
' Persona
|
||||
Persona "1" o-- "1..*" Profesional
|
||||
Persona "1" o-- "1" Cliente
|
||||
Persona "1" o-- "1" Administrador
|
||||
Persona "1" -- "1" Foto
|
||||
Persona "1..*" -- "1..*" Telefono
|
||||
|
||||
'AuthController
|
||||
AuthController ..> Persona
|
||||
AuthController ..> INotificadorUsuario
|
||||
AuthController ..> CredencialCliente
|
||||
|
||||
' Autenticación
|
||||
Cliente "1" -- "1" CredencialCliente
|
||||
Profesional "1" -- "1" CredencialProfesional
|
||||
Administrador "1" -- "1" CredencialProfesional
|
||||
|
||||
' Profesional
|
||||
Profesional "1..*" -- "1" Profesion
|
||||
Profesional "1" ...> "1..*" Turno
|
||||
Profesional "1..*" -- "1" EstadoProfesional
|
||||
Profesional "1..*" -- "1..*" Cliente
|
||||
Profesional "1" ...> "1..*" DocumentacionCliente
|
||||
Profesional "1" -- "1" Agenda
|
||||
Profesional "1..*" -- "1..*" Servicio
|
||||
Profesional "1..*" -- "1..*" Formulario
|
||||
|
||||
' Cliente
|
||||
Cliente "1" ...> "1..*" Formulario
|
||||
Cliente "1" -- "1..*" Turno
|
||||
Cliente "1" -- "1..*" DocumentacionCliente
|
||||
|
||||
' Profesion, Servicio y ContenidoWeb
|
||||
Profesion "1" *-- "1..*" Servicio
|
||||
Profesion "1" -- "1..*" Formulario
|
||||
Servicio "1" -- "1" Foto
|
||||
Servicio "1..*" -- "1" ContenidoWeb
|
||||
Servicio "1" -- "1..*" Formulario
|
||||
ContenidoWeb "1" -- "1..*" Ubicacion
|
||||
|
||||
' Formulario
|
||||
Formulario "1..*" -- "1..*" HorarioPreferencia
|
||||
Formulario "1..*" -- "1..*" DiaPreferencia
|
||||
Formulario "1..*" -- "1" Modalidad
|
||||
|
||||
' Turnos y Agenda
|
||||
Turno "1..*" -- "1" EstadoTurno
|
||||
Turno "1..*" -- "1" Agenda
|
||||
|
||||
Agenda "1" *-- "1..*" DiaDeAtencion
|
||||
Agenda "1" *-- "0..*" ModoVacaciones
|
||||
Agenda "1" *-- "0..*" Feriados
|
||||
|
||||
DiaDeAtencion "1" *-- "1..*" HorarioAtencion
|
||||
DiaDeAtencion "1" *-- "0..*" HorarioReceso
|
||||
|
||||
' Administrador
|
||||
Administrador "1..*" ...> "1" Servicio
|
||||
Administrador "1..*" ...> "1" Profesion
|
||||
Administrador "1" -- "1" Profesional
|
||||
Administrador "1" ...> "1" ContenidoWeb
|
||||
|
||||
'Interfaces
|
||||
Profesional ...> INotificadorTurnos
|
||||
Cliente ...> INotificadorTurnos
|
||||
|
||||
|
||||
Profesional ...> INotificadorCrearCliente
|
||||
|
||||
Administrador ...> INotificadorCrearProfesional
|
||||
|
||||
Profesional ...> INotificadorUsuario
|
||||
Administrador ...> INotificadorUsuario
|
||||
Cliente ...> INotificadorUsuario
|
||||
|
||||
ServicioMail ..|> INotificadorTurnos
|
||||
ServicioMail ..|> INotificadorCrearCliente
|
||||
ServicioMail ..|> INotificadorCrearProfesional
|
||||
ServicioMail ..|> INotificadorUsuario
|
||||
|
||||
@enduml
|
||||
@@ -0,0 +1,81 @@
|
||||
ENTIDAD/RELACION EXPLICACION
|
||||
|
||||
_________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
|
||||
DocumentacionCliente -DNICreador y MatriculaCreador: Si una persona tiene dos o más profesiones, al momento de consultar los documentos del cliente solo deben aparecer aquellos documentos que pertenecen a la profesion del usuario donde se está consultando
|
||||
Ejemplo: Luciano es Abogado y Analista. Si quiero consultar los datos de un cliente desde el perfil de Analista, solo deben aparecer los documentos pertenecientes al perfil de analista (los documentos que se subieron desde el perfil de abogado, no deben aparecer)
|
||||
_________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
|
||||
EstadoProfesional -En vez de "Eliminar" a un profesional, simplemente se le cambia el estado de "Activo" a "Baja". De esta forma se mantienen las referencias a otras tablas (logs, documentacion, etc).
|
||||
_________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
|
||||
Profesional -La Primary key de Profesional es la matricula y el id de la profesion (Es imposible que esta combinación se repita. No puede haber dos abogados con la misma matricula. Pero puede haber un abogado y un contador con la misma matricula)
|
||||
_________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
|
||||
CredencialProfesional - CredProf_Usuario. Será la combinacion de: 'DNI de la persona' '-' 'codigo de profesion'.
|
||||
Ejemplo: Luciano es Contador (codigo=3) y tiene DNI=12345678. Usuario = 12345678-3
|
||||
- ROL: Sirve para saber a donde redireccionar en caso de que el login sea correcto (redirigir al perfil del administrador, o redirigir al perfil de un profesional)
|
||||
-Cred_Token: Acá se va a almacenar el token de recuperación (es null por defecto)
|
||||
-Cred_FechaHora: Acá se va a almacenar fecha y hora de la creacion del token (no puede durar para siempre, por lo general solo dura 1 hora)
|
||||
_________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
|
||||
CredencialCliente -CredCli_Token: Acá se va a almacenar el token de recuperación (es null por defecto)
|
||||
-CredCli_FechaHora: Acá se va a almacenar fecha y hora de la creacion del token (no puede durar para siempre, por lo general solo dura 1 hora)
|
||||
_________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
|
||||
Profesion -VisibleEnFormulario: Es posible que en el futuro hayan Profesiones que no queramos que aparezcan como opcion en los formularios para solicitar un turno (Ej: Secretario, Técnico Informático, etc).
|
||||
Además, si en el futuro se desea dar de baja esa profesion, simplemente se cambia VisibleEnFormulario a "No Visible".
|
||||
_________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
|
||||
Servicio -Estado: En vez de eliminar un servicio, simplemente se desactiva o se da de baja. En caso de que hayan formularios vinculados a ese servicio, no quedarían huerfanos
|
||||
_________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
|
||||
Persona -CorreoRecuperacion: Al momento de querer recuperar la contraseña o usuario, el usuario recibirá en su correo principal un link para cambiar su contraseña. En caso de perder acceso a su correo principal, se le enviará el link a un correo alternativo.
|
||||
_________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
|
||||
RELACION ENTRE: Formulario y Profesional -EstadoFormulario: Cada profesional tendra la posibilidad de Ignorar, Aceptar y Rechazar el formulario, por lo tanto, cada uno tendrá un mismo formulario con diferentes estados.
|
||||
_________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
|
||||
RELACION ENTRE: Profesional y Formulario -Si el formulario fue aceptado por algun profesional, automaticamente tendrá el estado "No disponible" (para aquellos profesionales que no aceptaron el formulario o nunca lo abrieron). Y tendra el estado de "Aceptado" para el profesional que lo aceptó.
|
||||
_________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
|
||||
Agenda -Si la agenda está en modo "vacaciones", entonces la asignación automática de turnos, ignora el periodo de vacaciones.
|
||||
_________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
|
||||
DiaDeAtencion -El dia de la semana tendrá una hora de inicio (Dia_Comienzo) y una hora de finalización (Dia_Fin). Ejemplo: El dia Lunes (Dia_Descripcion=Lunes, Dia_ID=1) comenzará a las 7AM (Dia_Comienzo=7) y terminará a las 14PM (Dia_Fin=14)
|
||||
_________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
|
||||
Turno -Turno_Inicio: Tendrá la hora de inicio del turno y la fecha del turno. (El fin del turno se calcularia Fin_Turno = Turno_Inicio + DuracionTurno)
|
||||
_________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
|
||||
RELACION ENTRE: Profesional y Cliente -Si en el futuro un profesional decide dar de baja a un Cliente, simplemente se cambia el estado de EstadoRelacion de "Activo" a "Baja". Si ese cliente tiene relacion con otros profesionales, esa relacion no se verá afectada.
|
||||
_________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
|
||||
Formulario -Si Cli_DNI es null, entonces ese formulario lo envió un Visitante, de lo contrario lo envió un Cliente.
|
||||
-Form_Estado: Si aún ningún profesional ha aceptado este formulario, el estado será Disponible. Si ya lo aceptó algún profesional, será No disponible.
|
||||
_________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
|
||||
LogSeguridad -Responsable_ID: Vendría a ser el DNI de la persona que ejecutó esa accion.
|
||||
_________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
----- Módulo Recuperación -----
|
||||
|
||||
Recuperacion Profesionales/Administrador
|
||||
|
||||
1) Llama al método RecuperarProf(rol, usuario, email) de la class AuthController. ROL = Profesional o Administrador
|
||||
|
||||
2) Se verifica si existe ese usuario con ExisteUsuario() de la class AuthController
|
||||
|
||||
3) Si existe, se verifica con CorreoPertenece(ROL, ID_Credencial) de la class AuthController que el email pasado en RecuperarProf() esté asociado a ese usuario
|
||||
|
||||
4) Si es verdadero, se genera un token de recuperación y se guarda en la BD con GenerarToken(ROL, usuario) de la class AuthController
|
||||
|
||||
5) Se notifica al correo ingresado en RecuperarProf() el token de recuperacion
|
||||
|
||||
6) Se verifica el token ingresado por el usuario con VerificarToken(ROL, token, ID_Credencial) de la class Credencial
|
||||
|
||||
7) Se actualiza la contraseña con CambiarContrasenia(ID_Credencial) de la class Credencial
|
||||
|
||||
Recuperacion de Administrador sin Usuario
|
||||
|
||||
1) Se llama al método RecuperarAdmin(DNI, correo, CUIL)
|
||||
|
||||
2) Se verifica si los datos son correctos con ExisteAdmin(DNI, correo, CUIL)
|
||||
|
||||
3) Si es verdadero, se genera el token de recuperacion y se almacena en la BD
|
||||
|
||||
4) Se envía el correo de recuperacion al correo ingresado en RecuperacionAdmin
|
||||
|
||||
5) Se verifica el token ingresado por el usuario con VerificarToken() de la class Credencial
|
||||
|
||||
6) Se actualiza la contraseña con CambiarContraseña(ID_Credencial, password, ROL) de la class Credencial
|
||||
|
||||
Recuperacion Clientes
|
||||
|
||||
1) Llama al método RecuperarCli(usuario, email) de la class AuthController.
|
||||
|
||||
2) Se verifica si existe ese usuario con ExisteUsuario(ROL, usuario) de la class AuthController. ROL = Cliente
|
||||
|
||||
3) Si existe, se verifica con CorreoPertenece(ROL, ID_Credencial) de la class AuthController que el email pasado en RecuperarCli() esté asociado a ese usuario
|
||||
|
||||
4) Si es verdadero, se genera un token de recuperación y se guarda en la BD con GenerarToken(ROL, usuario) de la class AuthController
|
||||
|
||||
5) Se notifica al correo ingresado en RecuperarCli() el token de recuperacion
|
||||
|
||||
6) Se verifica el token ingresado por el usuario con VerificarToken(ROL, token, ID_Credencial) de la class Credencial
|
||||
|
||||
7) Se actualiza la contraseña con CambiarContrasenia(ID_Credencial, password, ROL) de la class Credencial
|
||||
|
||||
@@ -14,7 +14,7 @@ return new class extends Migration
|
||||
Schema::create('contenidoswebs', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->text('quienes_somos');
|
||||
$table->text('quienessomos');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ return new class extends Migration
|
||||
Schema::create('horariospreferencias', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->text('descripcion');
|
||||
$table->string('descripcion');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ return new class extends Migration
|
||||
Schema::create('diaspreferencias', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->text('descripcion');
|
||||
$table->string('descripcion');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ return new class extends Migration
|
||||
Schema::create('modalidades', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->text('descripcion');
|
||||
$table->string('descripcion');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ return new class extends Migration
|
||||
Schema::create('estadosprofesionales', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->text('descripcion');
|
||||
$table->string('descripcion')->default('Activo');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -14,10 +14,11 @@ return new class extends Migration
|
||||
Schema::create('fotos', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->string('extension');
|
||||
$table->bigInteger('tamanio_bytes');
|
||||
$table->string('nombre');
|
||||
$table->string('mime_type');
|
||||
$table->string('extension')->nullable();
|
||||
$table->bigInteger('tamanio_bytes')->nullable();
|
||||
$table->string('nombre')->nullable();
|
||||
$table->string('mime_type')->nullable();
|
||||
$table->string('ruta')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ return new class extends Migration
|
||||
Schema::create('estadosturnos', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->srting('descripcion');
|
||||
$table->string('descripcion');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@ return new class extends Migration
|
||||
$table->timestamps();
|
||||
$table->text('link');
|
||||
|
||||
$table->foreingId('contenidoweb_id')
|
||||
->constrained('contenidosweb') // apunta a contenidosweb
|
||||
$table->foreignId('contenidoweb_id')
|
||||
->constrained('contenidoswebs') // apunta a contenidoswebs
|
||||
->onDelete('cascade'); // si se borra contenidosweb, se borra la ubicacion
|
||||
});
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ return new class extends Migration
|
||||
$table->string('rol');
|
||||
|
||||
$table->foreignId('accion_id')
|
||||
->constrained('acciones');
|
||||
->constrained('accioneslogs');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -18,8 +18,15 @@ return new class extends Migration
|
||||
$table->string('estado');
|
||||
$table->text('descripcion');
|
||||
|
||||
$table->foreingId('contenidoweb_id')
|
||||
$table->foreignId('contenidoweb_id')
|
||||
->constrained('contenidoswebs');
|
||||
|
||||
$table->foreignId('profesion_id')
|
||||
->constrained('profesiones');
|
||||
|
||||
$table->foreignId('foto_id')
|
||||
->constrained('fotos')
|
||||
->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -14,13 +14,13 @@ return new class extends Migration
|
||||
Schema::create('personas', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->string('dni');
|
||||
$table->string('dni')->unique;
|
||||
$table->string('nombre');
|
||||
$table->string('apellido');
|
||||
$table->string('cuil');
|
||||
$table->date('fechanac');
|
||||
|
||||
$table->foreingId('foto_id')
|
||||
$table->foreignId('foto_id')
|
||||
->constrained('fotos')
|
||||
->onDelete('cascade');
|
||||
});
|
||||
|
||||
@@ -15,11 +15,10 @@ return new class extends Migration
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreignId('persona_id')
|
||||
->constrained('personas');
|
||||
|
||||
$table->string('dni');
|
||||
$table->foreign('dni')
|
||||
->references('dni')
|
||||
->on('personas')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->string('correo');
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ return new class extends Migration
|
||||
|
||||
$table->string('matricula');
|
||||
$table->string('correo');
|
||||
$table->string('dni');
|
||||
|
||||
$table->foreignId('credencialprofesional_id')
|
||||
->constrained('credencialesprofesionales');
|
||||
@@ -27,13 +28,11 @@ return new class extends Migration
|
||||
$table->foreignId('estadoprofesional_id')
|
||||
->constrained('estadosprofesionales');
|
||||
|
||||
$table->string('dni');
|
||||
$table->foreign('dni')
|
||||
->references('dni')
|
||||
->on('personas')
|
||||
->onDelete('cascade');
|
||||
$table->foreignId('persona_id')
|
||||
->constrained('personas');
|
||||
|
||||
$table->foreignid('baja_id')
|
||||
$table->foreignId('baja_id')
|
||||
->nullable()
|
||||
->constrained('bajas');
|
||||
|
||||
$table->unique(['profesion_id', 'matricula']);
|
||||
|
||||
@@ -16,9 +16,8 @@ return new class extends Migration
|
||||
$table->timestamps();
|
||||
|
||||
$table->string('dni');
|
||||
$table->foreign('dni')
|
||||
->references('dni')
|
||||
->on('personas')
|
||||
$table->foreignId('persona_id')
|
||||
->constrained('personas')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->foreignId('telefono_id')
|
||||
|
||||
@@ -14,6 +14,18 @@ return new class extends Migration
|
||||
Schema::create('clientes', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
|
||||
$table->string('dni');
|
||||
$table->string('correo');
|
||||
$table->foreignId('persona_id')
|
||||
->constrained('personas')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->foreignId('baja_id')->nullable()
|
||||
->constrained('bajas')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->unique(['dni','correo']);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -18,8 +18,6 @@ return new class extends Migration
|
||||
$table->string('nombrecompleto');
|
||||
$table->string('correo');
|
||||
$table->string('celular');
|
||||
$table->string('dniprofpref')->nullable();
|
||||
$table->string('matriculaprofpref')->nullable();
|
||||
$table->string('estado')->defalut('Pendiente');
|
||||
|
||||
$table->foreignId('profesion_id')
|
||||
@@ -31,9 +29,13 @@ return new class extends Migration
|
||||
$table->foreignId('modalidad_id')
|
||||
->constrained('modalidades');
|
||||
|
||||
$table->string('cliente_dni');
|
||||
$table->foreign('cliente_dni')
|
||||
->references('clientes');
|
||||
$table->foreignId('profesional_id')->nullable()
|
||||
->constrained('profesionales')
|
||||
->onDelete('set null');
|
||||
|
||||
$table->foreignId('cliente_id')->nullable()
|
||||
->constrained('clientes')
|
||||
->onDelete('set null');
|
||||
|
||||
$table->date('fechaenvio');
|
||||
});
|
||||
|
||||
@@ -23,7 +23,7 @@ return new class extends Migration
|
||||
->constrained('servicios')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->unique(['profesional_id','servicio_id'], 'prof_ser_unique');
|
||||
$table->unique(['profesional_id','servicio_id'], 'profesionales_servicios_unique');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ return new class extends Migration
|
||||
->constrained('clientes')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->string('estadorelacion');
|
||||
$table->string('estadorelacion')->default('Activo');
|
||||
|
||||
$table->unique(['profesional_id','cliente_id'], 'profesionales_clientes_unique');
|
||||
});
|
||||
|
||||
@@ -14,6 +14,10 @@ return new class extends Migration
|
||||
Schema::create('dias', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->string('descripcion');
|
||||
$table->foreignId('agenda_id')
|
||||
->constrained('agendas')
|
||||
->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@ return new class extends Migration
|
||||
$table->foreignId('formulario_id')
|
||||
->constrained('formularios')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->unique(['formulario_id','horariopreferencia_id'], 'formularios_horariospreferidos_unique');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@ return new class extends Migration
|
||||
$table->foreignId('formulario_id')
|
||||
->constrained('formularios')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->unique(['formulario_id','diapreferencia_id'], 'formularios_diapreferidos_unique');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,17 @@ return new class extends Migration
|
||||
{
|
||||
Schema::create('profesionales_formularios', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->foreignId('profesional_id')
|
||||
->constrained('profesionales')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->foreignId('formulario_id')
|
||||
->constrained('formularios')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->string('estado')->default('Pendiente');
|
||||
|
||||
$table->unique(['profesional_id','formulario_id'], 'profesionales_formularios_unique');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('turnos', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->datetime('inicio');
|
||||
$table->string('correo');
|
||||
$table->string('nombrecompleto');
|
||||
$table->text('descripcion');
|
||||
|
||||
$table->foreignId('cliente_id')->nullable() //puede ser que el turno se le asigne a alguien que aún no es cliente
|
||||
->constrained('clientes')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->foreignId('estadoturno_id')
|
||||
->constrained('estadosturnos')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->foreignId('agenda_id')
|
||||
->constrained('agendas')
|
||||
->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('turnos');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('feriados', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->date('fecha');
|
||||
$table->string('descripcion')->default('Dia no laborable');
|
||||
$table->foreignId('agenda_id')
|
||||
->constrained('agendas')
|
||||
->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('feriados');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('modosvacaciones', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->date('inicio');
|
||||
$table->date('fin');
|
||||
$table->string('descripcion')->default('Vacaciones :)');
|
||||
|
||||
$table->foreignId('agenda_id')
|
||||
->constrained('agendas')
|
||||
->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('modosvacaciones');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user