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
|
||||
Reference in New Issue
Block a user