Compare commits

..

3 Commits

129 changed files with 4909 additions and 52 deletions
@@ -0,0 +1,79 @@
<?php
namespace App\Http\Controllers;
use App\Models\AccionLog;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class AccionLogController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index(): JsonResponse
{
$items = AccionLog::all();
return response()->json([
'success' => true,
'data' => $items,
'message' => 'Registros obtenidos correctamente',
], 200);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): JsonResponse
{
$payload = $request->only((new AccionLog())->getFillable());
$accionLog = AccionLog::create($payload);
return response()->json([
'success' => true,
'data' => $accionLog,
'message' => 'Registro creado correctamente',
], 201);
}
/**
* Display the specified resource.
*/
public function show(AccionLog $accionLog): JsonResponse
{
return response()->json([
'success' => true,
'data' => $accionLog,
'message' => 'Registro obtenido correctamente',
], 200);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, AccionLog $accionLog): JsonResponse
{
$payload = $request->only((new AccionLog())->getFillable());
$accionLog->update($payload);
return response()->json([
'success' => true,
'data' => $accionLog,
'message' => 'Registro actualizado correctamente',
], 200);
}
/**
* Remove the specified resource from storage.
*/
public function destroy(AccionLog $accionLog): JsonResponse
{
$accionLog->delete();
return response()->json([
'success' => true,
'message' => 'Registro eliminado correctamente',
], 200);
}
}
@@ -0,0 +1,79 @@
<?php
namespace App\Http\Controllers;
use App\Models\Administrador;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class AdministradorController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index(): JsonResponse
{
$items = Administrador::all();
return response()->json([
'success' => true,
'data' => $items,
'message' => 'Registros obtenidos correctamente',
], 200);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): JsonResponse
{
$payload = $request->only((new Administrador())->getFillable());
$administrador = Administrador::create($payload);
return response()->json([
'success' => true,
'data' => $administrador,
'message' => 'Registro creado correctamente',
], 201);
}
/**
* Display the specified resource.
*/
public function show(Administrador $administrador): JsonResponse
{
return response()->json([
'success' => true,
'data' => $administrador,
'message' => 'Registro obtenido correctamente',
], 200);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, Administrador $administrador): JsonResponse
{
$payload = $request->only((new Administrador())->getFillable());
$administrador->update($payload);
return response()->json([
'success' => true,
'data' => $administrador,
'message' => 'Registro actualizado correctamente',
], 200);
}
/**
* Remove the specified resource from storage.
*/
public function destroy(Administrador $administrador): JsonResponse
{
$administrador->delete();
return response()->json([
'success' => true,
'message' => 'Registro eliminado correctamente',
], 200);
}
}
+79
View File
@@ -0,0 +1,79 @@
<?php
namespace App\Http\Controllers;
use App\Models\Agenda;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class AgendaController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index(): JsonResponse
{
$items = Agenda::all();
return response()->json([
'success' => true,
'data' => $items,
'message' => 'Registros obtenidos correctamente',
], 200);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): JsonResponse
{
$payload = $request->only((new Agenda())->getFillable());
$agenda = Agenda::create($payload);
return response()->json([
'success' => true,
'data' => $agenda,
'message' => 'Registro creado correctamente',
], 201);
}
/**
* Display the specified resource.
*/
public function show(Agenda $agenda): JsonResponse
{
return response()->json([
'success' => true,
'data' => $agenda,
'message' => 'Registro obtenido correctamente',
], 200);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, Agenda $agenda): JsonResponse
{
$payload = $request->only((new Agenda())->getFillable());
$agenda->update($payload);
return response()->json([
'success' => true,
'data' => $agenda,
'message' => 'Registro actualizado correctamente',
], 200);
}
/**
* Remove the specified resource from storage.
*/
public function destroy(Agenda $agenda): JsonResponse
{
$agenda->delete();
return response()->json([
'success' => true,
'message' => 'Registro eliminado correctamente',
], 200);
}
}
+79
View File
@@ -0,0 +1,79 @@
<?php
namespace App\Http\Controllers;
use App\Models\Baja;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class BajaController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index(): JsonResponse
{
$items = Baja::all();
return response()->json([
'success' => true,
'data' => $items,
'message' => 'Registros obtenidos correctamente',
], 200);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): JsonResponse
{
$payload = $request->only((new Baja())->getFillable());
$baja = Baja::create($payload);
return response()->json([
'success' => true,
'data' => $baja,
'message' => 'Registro creado correctamente',
], 201);
}
/**
* Display the specified resource.
*/
public function show(Baja $baja): JsonResponse
{
return response()->json([
'success' => true,
'data' => $baja,
'message' => 'Registro obtenido correctamente',
], 200);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, Baja $baja): JsonResponse
{
$payload = $request->only((new Baja())->getFillable());
$baja->update($payload);
return response()->json([
'success' => true,
'data' => $baja,
'message' => 'Registro actualizado correctamente',
], 200);
}
/**
* Remove the specified resource from storage.
*/
public function destroy(Baja $baja): JsonResponse
{
$baja->delete();
return response()->json([
'success' => true,
'message' => 'Registro eliminado correctamente',
], 200);
}
}
+79
View File
@@ -0,0 +1,79 @@
<?php
namespace App\Http\Controllers;
use App\Models\Bug;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class BugController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index(): JsonResponse
{
$items = Bug::all();
return response()->json([
'success' => true,
'data' => $items,
'message' => 'Registros obtenidos correctamente',
], 200);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): JsonResponse
{
$payload = $request->only((new Bug())->getFillable());
$bug = Bug::create($payload);
return response()->json([
'success' => true,
'data' => $bug,
'message' => 'Registro creado correctamente',
], 201);
}
/**
* Display the specified resource.
*/
public function show(Bug $bug): JsonResponse
{
return response()->json([
'success' => true,
'data' => $bug,
'message' => 'Registro obtenido correctamente',
], 200);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, Bug $bug): JsonResponse
{
$payload = $request->only((new Bug())->getFillable());
$bug->update($payload);
return response()->json([
'success' => true,
'data' => $bug,
'message' => 'Registro actualizado correctamente',
], 200);
}
/**
* Remove the specified resource from storage.
*/
public function destroy(Bug $bug): JsonResponse
{
$bug->delete();
return response()->json([
'success' => true,
'message' => 'Registro eliminado correctamente',
], 200);
}
}
@@ -0,0 +1,79 @@
<?php
namespace App\Http\Controllers;
use App\Models\Cliente;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class ClienteController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index(): JsonResponse
{
$items = Cliente::all();
return response()->json([
'success' => true,
'data' => $items,
'message' => 'Registros obtenidos correctamente',
], 200);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): JsonResponse
{
$payload = $request->only((new Cliente())->getFillable());
$cliente = Cliente::create($payload);
return response()->json([
'success' => true,
'data' => $cliente,
'message' => 'Registro creado correctamente',
], 201);
}
/**
* Display the specified resource.
*/
public function show(Cliente $cliente): JsonResponse
{
return response()->json([
'success' => true,
'data' => $cliente,
'message' => 'Registro obtenido correctamente',
], 200);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, Cliente $cliente): JsonResponse
{
$payload = $request->only((new Cliente())->getFillable());
$cliente->update($payload);
return response()->json([
'success' => true,
'data' => $cliente,
'message' => 'Registro actualizado correctamente',
], 200);
}
/**
* Remove the specified resource from storage.
*/
public function destroy(Cliente $cliente): JsonResponse
{
$cliente->delete();
return response()->json([
'success' => true,
'message' => 'Registro eliminado correctamente',
], 200);
}
}
@@ -0,0 +1,79 @@
<?php
namespace App\Http\Controllers;
use App\Models\ContenidoWeb;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class ContenidoWebController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index(): JsonResponse
{
$items = ContenidoWeb::all();
return response()->json([
'success' => true,
'data' => $items,
'message' => 'Registros obtenidos correctamente',
], 200);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): JsonResponse
{
$payload = $request->only((new ContenidoWeb())->getFillable());
$contenidoWeb = ContenidoWeb::create($payload);
return response()->json([
'success' => true,
'data' => $contenidoWeb,
'message' => 'Registro creado correctamente',
], 201);
}
/**
* Display the specified resource.
*/
public function show(ContenidoWeb $contenidoWeb): JsonResponse
{
return response()->json([
'success' => true,
'data' => $contenidoWeb,
'message' => 'Registro obtenido correctamente',
], 200);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, ContenidoWeb $contenidoWeb): JsonResponse
{
$payload = $request->only((new ContenidoWeb())->getFillable());
$contenidoWeb->update($payload);
return response()->json([
'success' => true,
'data' => $contenidoWeb,
'message' => 'Registro actualizado correctamente',
], 200);
}
/**
* Remove the specified resource from storage.
*/
public function destroy(ContenidoWeb $contenidoWeb): JsonResponse
{
$contenidoWeb->delete();
return response()->json([
'success' => true,
'message' => 'Registro eliminado correctamente',
], 200);
}
}
@@ -0,0 +1,79 @@
<?php
namespace App\Http\Controllers;
use App\Models\CredencialCliente;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class CredencialClienteController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index(): JsonResponse
{
$items = CredencialCliente::all();
return response()->json([
'success' => true,
'data' => $items,
'message' => 'Registros obtenidos correctamente',
], 200);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): JsonResponse
{
$payload = $request->only((new CredencialCliente())->getFillable());
$credencialCliente = CredencialCliente::create($payload);
return response()->json([
'success' => true,
'data' => $credencialCliente,
'message' => 'Registro creado correctamente',
], 201);
}
/**
* Display the specified resource.
*/
public function show(CredencialCliente $credencialCliente): JsonResponse
{
return response()->json([
'success' => true,
'data' => $credencialCliente,
'message' => 'Registro obtenido correctamente',
], 200);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, CredencialCliente $credencialCliente): JsonResponse
{
$payload = $request->only((new CredencialCliente())->getFillable());
$credencialCliente->update($payload);
return response()->json([
'success' => true,
'data' => $credencialCliente,
'message' => 'Registro actualizado correctamente',
], 200);
}
/**
* Remove the specified resource from storage.
*/
public function destroy(CredencialCliente $credencialCliente): JsonResponse
{
$credencialCliente->delete();
return response()->json([
'success' => true,
'message' => 'Registro eliminado correctamente',
], 200);
}
}
@@ -0,0 +1,79 @@
<?php
namespace App\Http\Controllers;
use App\Models\CredencialProfesional;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class CredencialProfesionalController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index(): JsonResponse
{
$items = CredencialProfesional::all();
return response()->json([
'success' => true,
'data' => $items,
'message' => 'Registros obtenidos correctamente',
], 200);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): JsonResponse
{
$payload = $request->only((new CredencialProfesional())->getFillable());
$credencialProfesional = CredencialProfesional::create($payload);
return response()->json([
'success' => true,
'data' => $credencialProfesional,
'message' => 'Registro creado correctamente',
], 201);
}
/**
* Display the specified resource.
*/
public function show(CredencialProfesional $credencialProfesional): JsonResponse
{
return response()->json([
'success' => true,
'data' => $credencialProfesional,
'message' => 'Registro obtenido correctamente',
], 200);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, CredencialProfesional $credencialProfesional): JsonResponse
{
$payload = $request->only((new CredencialProfesional())->getFillable());
$credencialProfesional->update($payload);
return response()->json([
'success' => true,
'data' => $credencialProfesional,
'message' => 'Registro actualizado correctamente',
], 200);
}
/**
* Remove the specified resource from storage.
*/
public function destroy(CredencialProfesional $credencialProfesional): JsonResponse
{
$credencialProfesional->delete();
return response()->json([
'success' => true,
'message' => 'Registro eliminado correctamente',
], 200);
}
}
+79
View File
@@ -0,0 +1,79 @@
<?php
namespace App\Http\Controllers;
use App\Models\Dia;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class DiaController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index(): JsonResponse
{
$items = Dia::all();
return response()->json([
'success' => true,
'data' => $items,
'message' => 'Registros obtenidos correctamente',
], 200);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): JsonResponse
{
$payload = $request->only((new Dia())->getFillable());
$dia = Dia::create($payload);
return response()->json([
'success' => true,
'data' => $dia,
'message' => 'Registro creado correctamente',
], 201);
}
/**
* Display the specified resource.
*/
public function show(Dia $dia): JsonResponse
{
return response()->json([
'success' => true,
'data' => $dia,
'message' => 'Registro obtenido correctamente',
], 200);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, Dia $dia): JsonResponse
{
$payload = $request->only((new Dia())->getFillable());
$dia->update($payload);
return response()->json([
'success' => true,
'data' => $dia,
'message' => 'Registro actualizado correctamente',
], 200);
}
/**
* Remove the specified resource from storage.
*/
public function destroy(Dia $dia): JsonResponse
{
$dia->delete();
return response()->json([
'success' => true,
'message' => 'Registro eliminado correctamente',
], 200);
}
}
@@ -0,0 +1,79 @@
<?php
namespace App\Http\Controllers;
use App\Models\DiaDeAtencion;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class DiaDeAtencionController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index(): JsonResponse
{
$items = DiaDeAtencion::all();
return response()->json([
'success' => true,
'data' => $items,
'message' => 'Registros obtenidos correctamente',
], 200);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): JsonResponse
{
$payload = $request->only((new DiaDeAtencion())->getFillable());
$diaDeAtencion = DiaDeAtencion::create($payload);
return response()->json([
'success' => true,
'data' => $diaDeAtencion,
'message' => 'Registro creado correctamente',
], 201);
}
/**
* Display the specified resource.
*/
public function show(DiaDeAtencion $diaDeAtencion): JsonResponse
{
return response()->json([
'success' => true,
'data' => $diaDeAtencion,
'message' => 'Registro obtenido correctamente',
], 200);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, DiaDeAtencion $diaDeAtencion): JsonResponse
{
$payload = $request->only((new DiaDeAtencion())->getFillable());
$diaDeAtencion->update($payload);
return response()->json([
'success' => true,
'data' => $diaDeAtencion,
'message' => 'Registro actualizado correctamente',
], 200);
}
/**
* Remove the specified resource from storage.
*/
public function destroy(DiaDeAtencion $diaDeAtencion): JsonResponse
{
$diaDeAtencion->delete();
return response()->json([
'success' => true,
'message' => 'Registro eliminado correctamente',
], 200);
}
}
@@ -0,0 +1,79 @@
<?php
namespace App\Http\Controllers;
use App\Models\DiaPreferencia;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class DiaPreferenciaController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index(): JsonResponse
{
$items = DiaPreferencia::all();
return response()->json([
'success' => true,
'data' => $items,
'message' => 'Registros obtenidos correctamente',
], 200);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): JsonResponse
{
$payload = $request->only((new DiaPreferencia())->getFillable());
$diaPreferencia = DiaPreferencia::create($payload);
return response()->json([
'success' => true,
'data' => $diaPreferencia,
'message' => 'Registro creado correctamente',
], 201);
}
/**
* Display the specified resource.
*/
public function show(DiaPreferencia $diaPreferencia): JsonResponse
{
return response()->json([
'success' => true,
'data' => $diaPreferencia,
'message' => 'Registro obtenido correctamente',
], 200);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, DiaPreferencia $diaPreferencia): JsonResponse
{
$payload = $request->only((new DiaPreferencia())->getFillable());
$diaPreferencia->update($payload);
return response()->json([
'success' => true,
'data' => $diaPreferencia,
'message' => 'Registro actualizado correctamente',
], 200);
}
/**
* Remove the specified resource from storage.
*/
public function destroy(DiaPreferencia $diaPreferencia): JsonResponse
{
$diaPreferencia->delete();
return response()->json([
'success' => true,
'message' => 'Registro eliminado correctamente',
], 200);
}
}
@@ -0,0 +1,79 @@
<?php
namespace App\Http\Controllers;
use App\Models\DocumentacionCliente;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class DocumentacionClienteController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index(): JsonResponse
{
$items = DocumentacionCliente::all();
return response()->json([
'success' => true,
'data' => $items,
'message' => 'Registros obtenidos correctamente',
], 200);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): JsonResponse
{
$payload = $request->only((new DocumentacionCliente())->getFillable());
$documentacionCliente = DocumentacionCliente::create($payload);
return response()->json([
'success' => true,
'data' => $documentacionCliente,
'message' => 'Registro creado correctamente',
], 201);
}
/**
* Display the specified resource.
*/
public function show(DocumentacionCliente $documentacionCliente): JsonResponse
{
return response()->json([
'success' => true,
'data' => $documentacionCliente,
'message' => 'Registro obtenido correctamente',
], 200);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, DocumentacionCliente $documentacionCliente): JsonResponse
{
$payload = $request->only((new DocumentacionCliente())->getFillable());
$documentacionCliente->update($payload);
return response()->json([
'success' => true,
'data' => $documentacionCliente,
'message' => 'Registro actualizado correctamente',
], 200);
}
/**
* Remove the specified resource from storage.
*/
public function destroy(DocumentacionCliente $documentacionCliente): JsonResponse
{
$documentacionCliente->delete();
return response()->json([
'success' => true,
'message' => 'Registro eliminado correctamente',
], 200);
}
}
+79
View File
@@ -0,0 +1,79 @@
<?php
namespace App\Http\Controllers;
use App\Models\Error as ErrorModel;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class ErrorController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index(): JsonResponse
{
$items = ErrorModel::all();
return response()->json([
'success' => true,
'data' => $items,
'message' => 'Registros obtenidos correctamente',
], 200);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): JsonResponse
{
$payload = $request->only((new ErrorModel())->getFillable());
$error = ErrorModel::create($payload);
return response()->json([
'success' => true,
'data' => $error,
'message' => 'Registro creado correctamente',
], 201);
}
/**
* Display the specified resource.
*/
public function show(ErrorModel $error): JsonResponse
{
return response()->json([
'success' => true,
'data' => $error,
'message' => 'Registro obtenido correctamente',
], 200);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, ErrorModel $error): JsonResponse
{
$payload = $request->only((new ErrorModel())->getFillable());
$error->update($payload);
return response()->json([
'success' => true,
'data' => $error,
'message' => 'Registro actualizado correctamente',
], 200);
}
/**
* Remove the specified resource from storage.
*/
public function destroy(ErrorModel $error): JsonResponse
{
$error->delete();
return response()->json([
'success' => true,
'message' => 'Registro eliminado correctamente',
], 200);
}
}
@@ -0,0 +1,79 @@
<?php
namespace App\Http\Controllers;
use App\Models\EstadoProfesional;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class EstadoProfesionalController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index(): JsonResponse
{
$items = EstadoProfesional::all();
return response()->json([
'success' => true,
'data' => $items,
'message' => 'Registros obtenidos correctamente',
], 200);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): JsonResponse
{
$payload = $request->only((new EstadoProfesional())->getFillable());
$estadoProfesional = EstadoProfesional::create($payload);
return response()->json([
'success' => true,
'data' => $estadoProfesional,
'message' => 'Registro creado correctamente',
], 201);
}
/**
* Display the specified resource.
*/
public function show(EstadoProfesional $estadoProfesional): JsonResponse
{
return response()->json([
'success' => true,
'data' => $estadoProfesional,
'message' => 'Registro obtenido correctamente',
], 200);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, EstadoProfesional $estadoProfesional): JsonResponse
{
$payload = $request->only((new EstadoProfesional())->getFillable());
$estadoProfesional->update($payload);
return response()->json([
'success' => true,
'data' => $estadoProfesional,
'message' => 'Registro actualizado correctamente',
], 200);
}
/**
* Remove the specified resource from storage.
*/
public function destroy(EstadoProfesional $estadoProfesional): JsonResponse
{
$estadoProfesional->delete();
return response()->json([
'success' => true,
'message' => 'Registro eliminado correctamente',
], 200);
}
}
@@ -0,0 +1,79 @@
<?php
namespace App\Http\Controllers;
use App\Models\EstadoTurno;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class EstadoTurnoController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index(): JsonResponse
{
$items = EstadoTurno::all();
return response()->json([
'success' => true,
'data' => $items,
'message' => 'Registros obtenidos correctamente',
], 200);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): JsonResponse
{
$payload = $request->only((new EstadoTurno())->getFillable());
$estadoTurno = EstadoTurno::create($payload);
return response()->json([
'success' => true,
'data' => $estadoTurno,
'message' => 'Registro creado correctamente',
], 201);
}
/**
* Display the specified resource.
*/
public function show(EstadoTurno $estadoTurno): JsonResponse
{
return response()->json([
'success' => true,
'data' => $estadoTurno,
'message' => 'Registro obtenido correctamente',
], 200);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, EstadoTurno $estadoTurno): JsonResponse
{
$payload = $request->only((new EstadoTurno())->getFillable());
$estadoTurno->update($payload);
return response()->json([
'success' => true,
'data' => $estadoTurno,
'message' => 'Registro actualizado correctamente',
], 200);
}
/**
* Remove the specified resource from storage.
*/
public function destroy(EstadoTurno $estadoTurno): JsonResponse
{
$estadoTurno->delete();
return response()->json([
'success' => true,
'message' => 'Registro eliminado correctamente',
], 200);
}
}
@@ -0,0 +1,79 @@
<?php
namespace App\Http\Controllers;
use App\Models\Feriado;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class FeriadoController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index(): JsonResponse
{
$items = Feriado::all();
return response()->json([
'success' => true,
'data' => $items,
'message' => 'Registros obtenidos correctamente',
], 200);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): JsonResponse
{
$payload = $request->only((new Feriado())->getFillable());
$feriado = Feriado::create($payload);
return response()->json([
'success' => true,
'data' => $feriado,
'message' => 'Registro creado correctamente',
], 201);
}
/**
* Display the specified resource.
*/
public function show(Feriado $feriado): JsonResponse
{
return response()->json([
'success' => true,
'data' => $feriado,
'message' => 'Registro obtenido correctamente',
], 200);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, Feriado $feriado): JsonResponse
{
$payload = $request->only((new Feriado())->getFillable());
$feriado->update($payload);
return response()->json([
'success' => true,
'data' => $feriado,
'message' => 'Registro actualizado correctamente',
], 200);
}
/**
* Remove the specified resource from storage.
*/
public function destroy(Feriado $feriado): JsonResponse
{
$feriado->delete();
return response()->json([
'success' => true,
'message' => 'Registro eliminado correctamente',
], 200);
}
}
@@ -0,0 +1,79 @@
<?php
namespace App\Http\Controllers;
use App\Models\Formulario;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class FormularioController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index(): JsonResponse
{
$items = Formulario::all();
return response()->json([
'success' => true,
'data' => $items,
'message' => 'Registros obtenidos correctamente',
], 200);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): JsonResponse
{
$payload = $request->only((new Formulario())->getFillable());
$formulario = Formulario::create($payload);
return response()->json([
'success' => true,
'data' => $formulario,
'message' => 'Registro creado correctamente',
], 201);
}
/**
* Display the specified resource.
*/
public function show(Formulario $formulario): JsonResponse
{
return response()->json([
'success' => true,
'data' => $formulario,
'message' => 'Registro obtenido correctamente',
], 200);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, Formulario $formulario): JsonResponse
{
$payload = $request->only((new Formulario())->getFillable());
$formulario->update($payload);
return response()->json([
'success' => true,
'data' => $formulario,
'message' => 'Registro actualizado correctamente',
], 200);
}
/**
* Remove the specified resource from storage.
*/
public function destroy(Formulario $formulario): JsonResponse
{
$formulario->delete();
return response()->json([
'success' => true,
'message' => 'Registro eliminado correctamente',
], 200);
}
}
@@ -0,0 +1,79 @@
<?php
namespace App\Http\Controllers;
use App\Models\FotoBug;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class FotoBugController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index(): JsonResponse
{
$items = FotoBug::all();
return response()->json([
'success' => true,
'data' => $items,
'message' => 'Registros obtenidos correctamente',
], 200);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): JsonResponse
{
$payload = $request->only((new FotoBug())->getFillable());
$fotoBug = FotoBug::create($payload);
return response()->json([
'success' => true,
'data' => $fotoBug,
'message' => 'Registro creado correctamente',
], 201);
}
/**
* Display the specified resource.
*/
public function show(FotoBug $fotoBug): JsonResponse
{
return response()->json([
'success' => true,
'data' => $fotoBug,
'message' => 'Registro obtenido correctamente',
], 200);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, FotoBug $fotoBug): JsonResponse
{
$payload = $request->only((new FotoBug())->getFillable());
$fotoBug->update($payload);
return response()->json([
'success' => true,
'data' => $fotoBug,
'message' => 'Registro actualizado correctamente',
], 200);
}
/**
* Remove the specified resource from storage.
*/
public function destroy(FotoBug $fotoBug): JsonResponse
{
$fotoBug->delete();
return response()->json([
'success' => true,
'message' => 'Registro eliminado correctamente',
], 200);
}
}
+79
View File
@@ -0,0 +1,79 @@
<?php
namespace App\Http\Controllers;
use App\Models\Foto;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class FotoController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index(): JsonResponse
{
$items = Foto::all();
return response()->json([
'success' => true,
'data' => $items,
'message' => 'Registros obtenidos correctamente',
], 200);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): JsonResponse
{
$payload = $request->only((new Foto())->getFillable());
$foto = Foto::create($payload);
return response()->json([
'success' => true,
'data' => $foto,
'message' => 'Registro creado correctamente',
], 201);
}
/**
* Display the specified resource.
*/
public function show(Foto $foto): JsonResponse
{
return response()->json([
'success' => true,
'data' => $foto,
'message' => 'Registro obtenido correctamente',
], 200);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, Foto $foto): JsonResponse
{
$payload = $request->only((new Foto())->getFillable());
$foto->update($payload);
return response()->json([
'success' => true,
'data' => $foto,
'message' => 'Registro actualizado correctamente',
], 200);
}
/**
* Remove the specified resource from storage.
*/
public function destroy(Foto $foto): JsonResponse
{
$foto->delete();
return response()->json([
'success' => true,
'message' => 'Registro eliminado correctamente',
], 200);
}
}
@@ -0,0 +1,79 @@
<?php
namespace App\Http\Controllers;
use App\Models\HorarioDeAtencion;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class HorarioDeAtencionController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index(): JsonResponse
{
$items = HorarioDeAtencion::all();
return response()->json([
'success' => true,
'data' => $items,
'message' => 'Registros obtenidos correctamente',
], 200);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): JsonResponse
{
$payload = $request->only((new HorarioDeAtencion())->getFillable());
$horarioDeAtencion = HorarioDeAtencion::create($payload);
return response()->json([
'success' => true,
'data' => $horarioDeAtencion,
'message' => 'Registro creado correctamente',
], 201);
}
/**
* Display the specified resource.
*/
public function show(HorarioDeAtencion $horarioDeAtencion): JsonResponse
{
return response()->json([
'success' => true,
'data' => $horarioDeAtencion,
'message' => 'Registro obtenido correctamente',
], 200);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, HorarioDeAtencion $horarioDeAtencion): JsonResponse
{
$payload = $request->only((new HorarioDeAtencion())->getFillable());
$horarioDeAtencion->update($payload);
return response()->json([
'success' => true,
'data' => $horarioDeAtencion,
'message' => 'Registro actualizado correctamente',
], 200);
}
/**
* Remove the specified resource from storage.
*/
public function destroy(HorarioDeAtencion $horarioDeAtencion): JsonResponse
{
$horarioDeAtencion->delete();
return response()->json([
'success' => true,
'message' => 'Registro eliminado correctamente',
], 200);
}
}
@@ -0,0 +1,79 @@
<?php
namespace App\Http\Controllers;
use App\Models\HorarioPreferencia;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class HorarioPreferenciaController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index(): JsonResponse
{
$items = HorarioPreferencia::all();
return response()->json([
'success' => true,
'data' => $items,
'message' => 'Registros obtenidos correctamente',
], 200);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): JsonResponse
{
$payload = $request->only((new HorarioPreferencia())->getFillable());
$horarioPreferencia = HorarioPreferencia::create($payload);
return response()->json([
'success' => true,
'data' => $horarioPreferencia,
'message' => 'Registro creado correctamente',
], 201);
}
/**
* Display the specified resource.
*/
public function show(HorarioPreferencia $horarioPreferencia): JsonResponse
{
return response()->json([
'success' => true,
'data' => $horarioPreferencia,
'message' => 'Registro obtenido correctamente',
], 200);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, HorarioPreferencia $horarioPreferencia): JsonResponse
{
$payload = $request->only((new HorarioPreferencia())->getFillable());
$horarioPreferencia->update($payload);
return response()->json([
'success' => true,
'data' => $horarioPreferencia,
'message' => 'Registro actualizado correctamente',
], 200);
}
/**
* Remove the specified resource from storage.
*/
public function destroy(HorarioPreferencia $horarioPreferencia): JsonResponse
{
$horarioPreferencia->delete();
return response()->json([
'success' => true,
'message' => 'Registro eliminado correctamente',
], 200);
}
}
@@ -0,0 +1,79 @@
<?php
namespace App\Http\Controllers;
use App\Models\HorarioReceso;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class HorarioRecesoController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index(): JsonResponse
{
$items = HorarioReceso::all();
return response()->json([
'success' => true,
'data' => $items,
'message' => 'Registros obtenidos correctamente',
], 200);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): JsonResponse
{
$payload = $request->only((new HorarioReceso())->getFillable());
$horarioReceso = HorarioReceso::create($payload);
return response()->json([
'success' => true,
'data' => $horarioReceso,
'message' => 'Registro creado correctamente',
], 201);
}
/**
* Display the specified resource.
*/
public function show(HorarioReceso $horarioReceso): JsonResponse
{
return response()->json([
'success' => true,
'data' => $horarioReceso,
'message' => 'Registro obtenido correctamente',
], 200);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, HorarioReceso $horarioReceso): JsonResponse
{
$payload = $request->only((new HorarioReceso())->getFillable());
$horarioReceso->update($payload);
return response()->json([
'success' => true,
'data' => $horarioReceso,
'message' => 'Registro actualizado correctamente',
], 200);
}
/**
* Remove the specified resource from storage.
*/
public function destroy(HorarioReceso $horarioReceso): JsonResponse
{
$horarioReceso->delete();
return response()->json([
'success' => true,
'message' => 'Registro eliminado correctamente',
], 200);
}
}
@@ -0,0 +1,79 @@
<?php
namespace App\Http\Controllers;
use App\Models\LogSeguridad;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class LogSeguridadController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index(): JsonResponse
{
$items = LogSeguridad::all();
return response()->json([
'success' => true,
'data' => $items,
'message' => 'Registros obtenidos correctamente',
], 200);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): JsonResponse
{
$payload = $request->only((new LogSeguridad())->getFillable());
$logSeguridad = LogSeguridad::create($payload);
return response()->json([
'success' => true,
'data' => $logSeguridad,
'message' => 'Registro creado correctamente',
], 201);
}
/**
* Display the specified resource.
*/
public function show(LogSeguridad $logSeguridad): JsonResponse
{
return response()->json([
'success' => true,
'data' => $logSeguridad,
'message' => 'Registro obtenido correctamente',
], 200);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, LogSeguridad $logSeguridad): JsonResponse
{
$payload = $request->only((new LogSeguridad())->getFillable());
$logSeguridad->update($payload);
return response()->json([
'success' => true,
'data' => $logSeguridad,
'message' => 'Registro actualizado correctamente',
], 200);
}
/**
* Remove the specified resource from storage.
*/
public function destroy(LogSeguridad $logSeguridad): JsonResponse
{
$logSeguridad->delete();
return response()->json([
'success' => true,
'message' => 'Registro eliminado correctamente',
], 200);
}
}
@@ -0,0 +1,79 @@
<?php
namespace App\Http\Controllers;
use App\Models\Modalidad;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class ModalidadController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index(): JsonResponse
{
$items = Modalidad::all();
return response()->json([
'success' => true,
'data' => $items,
'message' => 'Registros obtenidos correctamente',
], 200);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): JsonResponse
{
$payload = $request->only((new Modalidad())->getFillable());
$modalidad = Modalidad::create($payload);
return response()->json([
'success' => true,
'data' => $modalidad,
'message' => 'Registro creado correctamente',
], 201);
}
/**
* Display the specified resource.
*/
public function show(Modalidad $modalidad): JsonResponse
{
return response()->json([
'success' => true,
'data' => $modalidad,
'message' => 'Registro obtenido correctamente',
], 200);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, Modalidad $modalidad): JsonResponse
{
$payload = $request->only((new Modalidad())->getFillable());
$modalidad->update($payload);
return response()->json([
'success' => true,
'data' => $modalidad,
'message' => 'Registro actualizado correctamente',
], 200);
}
/**
* Remove the specified resource from storage.
*/
public function destroy(Modalidad $modalidad): JsonResponse
{
$modalidad->delete();
return response()->json([
'success' => true,
'message' => 'Registro eliminado correctamente',
], 200);
}
}
@@ -0,0 +1,79 @@
<?php
namespace App\Http\Controllers;
use App\Models\ModoVacaciones;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class ModoVacacionesController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index(): JsonResponse
{
$items = ModoVacaciones::all();
return response()->json([
'success' => true,
'data' => $items,
'message' => 'Registros obtenidos correctamente',
], 200);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): JsonResponse
{
$payload = $request->only((new ModoVacaciones())->getFillable());
$modoVacaciones = ModoVacaciones::create($payload);
return response()->json([
'success' => true,
'data' => $modoVacaciones,
'message' => 'Registro creado correctamente',
], 201);
}
/**
* Display the specified resource.
*/
public function show(ModoVacaciones $modoVacaciones): JsonResponse
{
return response()->json([
'success' => true,
'data' => $modoVacaciones,
'message' => 'Registro obtenido correctamente',
], 200);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, ModoVacaciones $modoVacaciones): JsonResponse
{
$payload = $request->only((new ModoVacaciones())->getFillable());
$modoVacaciones->update($payload);
return response()->json([
'success' => true,
'data' => $modoVacaciones,
'message' => 'Registro actualizado correctamente',
], 200);
}
/**
* Remove the specified resource from storage.
*/
public function destroy(ModoVacaciones $modoVacaciones): JsonResponse
{
$modoVacaciones->delete();
return response()->json([
'success' => true,
'message' => 'Registro eliminado correctamente',
], 200);
}
}
@@ -0,0 +1,79 @@
<?php
namespace App\Http\Controllers;
use App\Models\Persona;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class PersonaController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index(): JsonResponse
{
$items = Persona::all();
return response()->json([
'success' => true,
'data' => $items,
'message' => 'Registros obtenidos correctamente',
], 200);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): JsonResponse
{
$payload = $request->only((new Persona())->getFillable());
$persona = Persona::create($payload);
return response()->json([
'success' => true,
'data' => $persona,
'message' => 'Registro creado correctamente',
], 201);
}
/**
* Display the specified resource.
*/
public function show(Persona $persona): JsonResponse
{
return response()->json([
'success' => true,
'data' => $persona,
'message' => 'Registro obtenido correctamente',
], 200);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, Persona $persona): JsonResponse
{
$payload = $request->only((new Persona())->getFillable());
$persona->update($payload);
return response()->json([
'success' => true,
'data' => $persona,
'message' => 'Registro actualizado correctamente',
], 200);
}
/**
* Remove the specified resource from storage.
*/
public function destroy(Persona $persona): JsonResponse
{
$persona->delete();
return response()->json([
'success' => true,
'message' => 'Registro eliminado correctamente',
], 200);
}
}
@@ -0,0 +1,79 @@
<?php
namespace App\Http\Controllers;
use App\Models\Profesion;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class ProfesionController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index(): JsonResponse
{
$items = Profesion::all();
return response()->json([
'success' => true,
'data' => $items,
'message' => 'Registros obtenidos correctamente',
], 200);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): JsonResponse
{
$payload = $request->only((new Profesion())->getFillable());
$profesion = Profesion::create($payload);
return response()->json([
'success' => true,
'data' => $profesion,
'message' => 'Registro creado correctamente',
], 201);
}
/**
* Display the specified resource.
*/
public function show(Profesion $profesion): JsonResponse
{
return response()->json([
'success' => true,
'data' => $profesion,
'message' => 'Registro obtenido correctamente',
], 200);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, Profesion $profesion): JsonResponse
{
$payload = $request->only((new Profesion())->getFillable());
$profesion->update($payload);
return response()->json([
'success' => true,
'data' => $profesion,
'message' => 'Registro actualizado correctamente',
], 200);
}
/**
* Remove the specified resource from storage.
*/
public function destroy(Profesion $profesion): JsonResponse
{
$profesion->delete();
return response()->json([
'success' => true,
'message' => 'Registro eliminado correctamente',
], 200);
}
}
@@ -0,0 +1,79 @@
<?php
namespace App\Http\Controllers;
use App\Models\Profesional;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class ProfesionalController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index(): JsonResponse
{
$items = Profesional::all();
return response()->json([
'success' => true,
'data' => $items,
'message' => 'Registros obtenidos correctamente',
], 200);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): JsonResponse
{
$payload = $request->only((new Profesional())->getFillable());
$profesional = Profesional::create($payload);
return response()->json([
'success' => true,
'data' => $profesional,
'message' => 'Registro creado correctamente',
], 201);
}
/**
* Display the specified resource.
*/
public function show(Profesional $profesional): JsonResponse
{
return response()->json([
'success' => true,
'data' => $profesional,
'message' => 'Registro obtenido correctamente',
], 200);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, Profesional $profesional): JsonResponse
{
$payload = $request->only((new Profesional())->getFillable());
$profesional->update($payload);
return response()->json([
'success' => true,
'data' => $profesional,
'message' => 'Registro actualizado correctamente',
], 200);
}
/**
* Remove the specified resource from storage.
*/
public function destroy(Profesional $profesional): JsonResponse
{
$profesional->delete();
return response()->json([
'success' => true,
'message' => 'Registro eliminado correctamente',
], 200);
}
}
+70 -1
View File
@@ -2,9 +2,78 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Models\Servicio;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request; use Illuminate\Http\Request;
class ServicioController extends Controller class ServicioController extends Controller
{ {
// /**
* Display a listing of the resource.
*/
public function index(): JsonResponse
{
$items = Servicio::all();
return response()->json([
'success' => true,
'data' => $items,
'message' => 'Registros obtenidos correctamente',
], 200);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): JsonResponse
{
$payload = $request->only((new Servicio())->getFillable());
$servicio = Servicio::create($payload);
return response()->json([
'success' => true,
'data' => $servicio,
'message' => 'Registro creado correctamente',
], 201);
}
/**
* Display the specified resource.
*/
public function show(Servicio $servicio): JsonResponse
{
return response()->json([
'success' => true,
'data' => $servicio,
'message' => 'Registro obtenido correctamente',
], 200);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, Servicio $servicio): JsonResponse
{
$payload = $request->only((new Servicio())->getFillable());
$servicio->update($payload);
return response()->json([
'success' => true,
'data' => $servicio,
'message' => 'Registro actualizado correctamente',
], 200);
}
/**
* Remove the specified resource from storage.
*/
public function destroy(Servicio $servicio): JsonResponse
{
$servicio->delete();
return response()->json([
'success' => true,
'message' => 'Registro eliminado correctamente',
], 200);
}
} }
@@ -0,0 +1,79 @@
<?php
namespace App\Http\Controllers;
use App\Models\Telefono;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class TelefonoController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index(): JsonResponse
{
$items = Telefono::all();
return response()->json([
'success' => true,
'data' => $items,
'message' => 'Registros obtenidos correctamente',
], 200);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): JsonResponse
{
$payload = $request->only((new Telefono())->getFillable());
$telefono = Telefono::create($payload);
return response()->json([
'success' => true,
'data' => $telefono,
'message' => 'Registro creado correctamente',
], 201);
}
/**
* Display the specified resource.
*/
public function show(Telefono $telefono): JsonResponse
{
return response()->json([
'success' => true,
'data' => $telefono,
'message' => 'Registro obtenido correctamente',
], 200);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, Telefono $telefono): JsonResponse
{
$payload = $request->only((new Telefono())->getFillable());
$telefono->update($payload);
return response()->json([
'success' => true,
'data' => $telefono,
'message' => 'Registro actualizado correctamente',
], 200);
}
/**
* Remove the specified resource from storage.
*/
public function destroy(Telefono $telefono): JsonResponse
{
$telefono->delete();
return response()->json([
'success' => true,
'message' => 'Registro eliminado correctamente',
], 200);
}
}
+79
View File
@@ -0,0 +1,79 @@
<?php
namespace App\Http\Controllers;
use App\Models\Turno;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class TurnoController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index(): JsonResponse
{
$items = Turno::all();
return response()->json([
'success' => true,
'data' => $items,
'message' => 'Registros obtenidos correctamente',
], 200);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): JsonResponse
{
$payload = $request->only((new Turno())->getFillable());
$turno = Turno::create($payload);
return response()->json([
'success' => true,
'data' => $turno,
'message' => 'Registro creado correctamente',
], 201);
}
/**
* Display the specified resource.
*/
public function show(Turno $turno): JsonResponse
{
return response()->json([
'success' => true,
'data' => $turno,
'message' => 'Registro obtenido correctamente',
], 200);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, Turno $turno): JsonResponse
{
$payload = $request->only((new Turno())->getFillable());
$turno->update($payload);
return response()->json([
'success' => true,
'data' => $turno,
'message' => 'Registro actualizado correctamente',
], 200);
}
/**
* Remove the specified resource from storage.
*/
public function destroy(Turno $turno): JsonResponse
{
$turno->delete();
return response()->json([
'success' => true,
'message' => 'Registro eliminado correctamente',
], 200);
}
}
@@ -0,0 +1,79 @@
<?php
namespace App\Http\Controllers;
use App\Models\Ubicacion;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class UbicacionController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index(): JsonResponse
{
$items = Ubicacion::all();
return response()->json([
'success' => true,
'data' => $items,
'message' => 'Registros obtenidos correctamente',
], 200);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): JsonResponse
{
$payload = $request->only((new Ubicacion())->getFillable());
$ubicacion = Ubicacion::create($payload);
return response()->json([
'success' => true,
'data' => $ubicacion,
'message' => 'Registro creado correctamente',
], 201);
}
/**
* Display the specified resource.
*/
public function show(Ubicacion $ubicacion): JsonResponse
{
return response()->json([
'success' => true,
'data' => $ubicacion,
'message' => 'Registro obtenido correctamente',
], 200);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, Ubicacion $ubicacion): JsonResponse
{
$payload = $request->only((new Ubicacion())->getFillable());
$ubicacion->update($payload);
return response()->json([
'success' => true,
'data' => $ubicacion,
'message' => 'Registro actualizado correctamente',
], 200);
}
/**
* Remove the specified resource from storage.
*/
public function destroy(Ubicacion $ubicacion): JsonResponse
{
$ubicacion->delete();
return response()->json([
'success' => true,
'message' => 'Registro eliminado correctamente',
], 200);
}
}
+79
View File
@@ -0,0 +1,79 @@
<?php
namespace App\Http\Controllers;
use App\Models\User;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class UserController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index(): JsonResponse
{
$items = User::all();
return response()->json([
'success' => true,
'data' => $items,
'message' => 'Registros obtenidos correctamente',
], 200);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): JsonResponse
{
$payload = $request->only((new User())->getFillable());
$user = User::create($payload);
return response()->json([
'success' => true,
'data' => $user,
'message' => 'Registro creado correctamente',
], 201);
}
/**
* Display the specified resource.
*/
public function show(User $user): JsonResponse
{
return response()->json([
'success' => true,
'data' => $user,
'message' => 'Registro obtenido correctamente',
], 200);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, User $user): JsonResponse
{
$payload = $request->only((new User())->getFillable());
$user->update($payload);
return response()->json([
'success' => true,
'data' => $user,
'message' => 'Registro actualizado correctamente',
], 200);
}
/**
* Remove the specified resource from storage.
*/
public function destroy(User $user): JsonResponse
{
$user->delete();
return response()->json([
'success' => true,
'message' => 'Registro eliminado correctamente',
], 200);
}
}
+24
View File
@@ -0,0 +1,24 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class AccionLog extends Model
{
use HasFactory;
protected $table = 'accioneslogs';
protected $fillable = [
'descripcion',
];
//tiene una
public function logSeguridad()
{
return $this->hasMany(LogSeguridad::class, 'accion_id', 'id');
}
}
+28
View File
@@ -0,0 +1,28 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class Administrador extends Model
{
use HasFactory;
protected $table = 'administradores';
protected $fillable = [
'persona_id',
'dni',
'correo',
'credencialprofesional_id',
];
public function credencial()
{
return $this->belongsTo(CredencialProfesional::class, 'credencialprofesional_id','id');
}
public function persona()
{
return $this->belongsTo(Persona::class, 'persona_id','id');
}
}
+43
View File
@@ -0,0 +1,43 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class Agenda extends Model
{
use HasFactory;
protected $table = 'agendas';
protected $fillable = [
'estado',
'duracionturno',
'profesional_id',
];
public function profesional()
{
return $this->belongsTo(Profesional::class, 'profesional_id','id');
}
public function diaDeAtencion()
{
return $this->hasMany(DiaDeAtencion::class, 'agenda_id','id');
}
public function turno()
{
return $this->hasMany(Turno::class, 'agenda_id','id');
}
public function feriado()
{
return $this->hasMany(Feriado::class, 'agenda_id','id');
}
public function modoVacaciones()
{
return $this->hasMany(ModoVacaciones::class, 'agenda_id', 'id');
}
}
+29
View File
@@ -0,0 +1,29 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class Baja extends Model
{
use HasFactory;
protected $table = 'bajas';
protected $fillable = [
'motivo',
];
//tiene una
public function cliente()
{
return $this->hasOne(Cliente::class, 'baja_id', 'id');
}
public function profesional()
{
return $this->hasOne(Profesional::class, 'baja_id', 'id');
}
}
+27
View File
@@ -0,0 +1,27 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class Bug extends Model
{
use HasFactory;
protected $table = 'bugs';
protected $fillable = [
'titulo',
'descripcion',
'prioridad',
'estado',
'version',
'fotobug_id',
];
public function fotoBug()
{
return $this->belongsTo(FotoBug::class, 'fotobug_id', 'id');
}
}
+57
View File
@@ -0,0 +1,57 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class Cliente extends Model
{
use HasFactory;
protected $table = 'clientes';
protected $fillable = [
'dni',
'correo',
'persona_id',
'baja_id',
'credencialcliente_id',
];
public function persona()
{
return $this->belongsTo(Persona::class, 'persona_id','id');
}
public function baja()
{
return $this->belongsTo(Baja::class, 'baja_id','id');
}
public function credencialCliente()
{
return $this->belongsTo(CredencialCliente::class, 'credencialcliente_id','id');
}
public function documentosCliente()
{
return $this->hasMany(DocumentacionCliente::class, 'cliente_id','id');
}
public function turnos()
{
return $this->hasMany(Turno::class, 'cliente_id','id');
}
public function profesionales()
{
return $this->belongsToMany(Profesional::class, 'profesional_cliente','cliente_id', 'profesional_id')
->withPivot('estadorelacion')
->withTimestamps();
}
public function formularios()
{
return $this->hasMany(Formulario::class, 'cliente_id','id');
}
}
+21
View File
@@ -0,0 +1,21 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class ContenidoWeb extends Model
{
use HasFactory;
protected $table = 'contenidoswebs';
protected $fillable = [
'quienessomos',
];
public function ubicaciones()
{
return $this->hasMany(Ubicacion::class, 'contenidoweb_id', 'id');
}
}
+26
View File
@@ -0,0 +1,26 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class CredencialCliente extends Model
{
use HasFactory;
protected $table = 'credencialesclientes';
protected $fillable = [
'contra',
'correo',
'token',
'fecha_hora',
];
//tiene un
public function cliente()
{
return $this->hasOne(Cliente::class, 'credencialcliente_id', 'id');
}
}
+31
View File
@@ -0,0 +1,31 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class CredencialProfesional extends Model
{
use HasFactory;
protected $table = 'credencialesprofesionales';
protected $fillable = [
'usuario',
'contra',
'rol',
'token',
'fecha_hora',
];
public function profesional()
{
return $this->hasOne(Profesional::class, 'credencialprofesional_id', 'id');
}
public function administrador()
{
return $this->hasOne(Administrador::class, 'credencialprofesional_id', 'id');
}
}
+23
View File
@@ -0,0 +1,23 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class Dia extends Model
{
use HasFactory;
protected $table = 'dias';
protected $fillable = [
'descripcion',
];
public function diaDeAtencion()
{
return $this->hasMany(DiaDeAtencion::class, 'dia_id', 'id');
}
}
+40
View File
@@ -0,0 +1,40 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class DiaDeAtencion extends Model
{
use HasFactory;
protected $table = 'diasdeatenciones';
protected $fillable = [
'descripcion',
'agenda_id',
'dia_id',
];
public function agenda()
{
return $this->belongsTo(Agenda::class, 'agenda_id', 'id');
}
public function dias()
{
return $this->belongsTo(Dia::class, 'dia_id', 'id');
}
public function horariosRecesos()
{
return $this->hasMany(HorarioReceso::class, 'diadeatencion_id', 'id');
}
public function horariosAtenciones()
{
return $this->hasMany(HorarioAtencion::class, 'diadeatencion_id', 'id');
}
}
+23
View File
@@ -0,0 +1,23 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class DiaPreferencia extends Model
{
use HasFactory;
protected $table = 'diaspreferencias';
protected $fillable = [
'descripcion',
'formulario_id',
];
public function formularios()
{
return $this->belongsToMany(Formulario::class, 'formularios_diaspreferidos', 'diapreferencia_id', 'formulario_id');
}
}
+31
View File
@@ -0,0 +1,31 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class DocumentacionCliente extends Model
{
use HasFactory;
protected $table = 'documentacionesclientes';
protected $fillable=[
'nombre',
'mime_type',
'tamanio_bytes',
'extension',
'cliente_id',
'profesional_id',
];
public function cliente()
{
return $this->belongsTo(Cliente::class, 'cliente_id','id');
}
public function profesional()
{
return $this->belongsTo(Profesional::class, 'profesional_id','id');
}
}
+21
View File
@@ -0,0 +1,21 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class Error extends Model
{
use HasFactory;
protected $table = 'errores';
protected $fillable = [
'codigo',
'mensaje',
'track_trace',
'url',
'fecha_hora',
];
}
+22
View File
@@ -0,0 +1,22 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class EstadoProfesional extends Model
{
use HasFactory;
protected $table = 'estadosprofesionales';
protected $fillable = [
'descripcion',
];
public function profesional()
{
return $this->hasMany(Profesional::class, 'estadoprofesional_id', 'id');
}
}
+21
View File
@@ -0,0 +1,21 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class EstadoTurno extends Model
{
use HasFactory;
protected $table = 'estadosturnos';
protected $fillable = [
'descripcion',
];
public function turno()
{
return $this->hasMany(Turno::class, 'estadoturno_id', 'id');
}
}
+23
View File
@@ -0,0 +1,23 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class Feriado extends Model
{
use HasFactory;
protected $table = 'feriados';
protected $fillable = [
'fecha',
'descripcion',
'agenda_id',
];
public function agenda()
{
return $this->belongsTo(Agenda::class, 'agenda_id', 'id');
}
}
+64
View File
@@ -0,0 +1,64 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class Formulario extends Model
{
use HasFactory;
protected $table = 'formularios';
protected $fillable = [
'descripcion',
'nombrecompleto',
'correo',
'celular',
'estado',
'profesion_id',
'servicio_id',
'modalidad_id',
'profesional_id',
'cliente_id',
'fechaenvio',
];
public function modalidad()
{
return $this->belongsTo(Modalidad::class, 'modalidad_id', 'id');
}
public function profesion()
{
return $this->belongsTo(Profesion::class, 'profesion_id', 'id');
}
public function servicio()
{
return $this->belongsTo(Servicio::class, 'servicio_id', 'id');
}
public function cliente()
{
return $this->belongsTo(Cliente::class, 'cliente_id', 'id');
}
public function profesional()
{
return $this->belongsToMany(Profesional::class, 'profesionales_formularios', 'formulario_id', 'profesional_id')
->withPivot('estadoformulario')
->withTimestamps();
}
public function diasPreferidos()
{
return $this->belongsToMany(DiaPreferencia::class, 'formularios_diaspreferidos', 'formulario_id', 'diapreferencia_id');
}
public function horariopreferido()
{
return $this->belongsToMany(HorarioPreferencia::class, 'formularios_horariospreferidos', 'formulario_id', 'horariopreferencia_id');
}
}
+31
View File
@@ -0,0 +1,31 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class Foto extends Model
{
use HasFactory;
protected $table = 'fotos';
protected $fillable = [
'extension',
'tamanio_bytes',
'nombre',
'mime_type',
'ruta',
];
public function persona()
{
return $this->hasMany(Persona::class, 'foto_id', 'id');
}
public function servicio()
{
return $this->hasMany(Servicio::class, 'foto_id', 'id');
}
}
+25
View File
@@ -0,0 +1,25 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class FotoBug extends Model
{
use HasFactory;
protected $table = 'fotosbugs';
protected $fillable = [
'extension',
'tamanio_bytes',
'nombre',
'mime_type',
];
public function bug()
{
return $this->hasOne(Bug::class, 'fotobug_id', 'id');
}
}
+24
View File
@@ -0,0 +1,24 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class HorarioDeAtencion extends Model
{
use HasFactory;
protected $table = 'horariosatenciones';
protected $fillable = [
'horariocomienzo',
'horariofin',
'diadeatencion_id',
];
public function diaatencion()
{
return $this->belongsTo(DiaDeAtencion::class, 'diadeatencion_id', 'id');
}
}
+22
View File
@@ -0,0 +1,22 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class HorarioPreferencia extends Model
{
use HasFactory;
protected $table = 'horariospreferencias';
protected $fillable = [
'descripcion',
];
public function formularios()
{
return $this->belongsToMany(Formulario::class, 'formularios_horariospreferidos', 'horariopreferencia_id', 'formulario_id');
}
}
+24
View File
@@ -0,0 +1,24 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class HorarioReceso extends Model
{
use HasFactory;
protected $table = 'horariosrecesos';
protected $fillable = [
'comienzo',
'fin',
'diadeatencion_id',
];
public function diaDeAtencion()
{
return $this->belongsTo(DiaDeAtencion::class, 'diadeatencion_id', 'id');
}
}
+24
View File
@@ -4,7 +4,31 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Factories\HasFactory;
class LogSeguridad extends Model class LogSeguridad extends Model
{ {
use HasFactory;
protected $table = 'logseguridades';
protected $fillable = [
'descripcion',
'fechahora',
'IPorigen',
'rol',
'persona_id',
'accion_id',
];
//pertenece a
public function accion()
{
return $this->belongsTo(AccionLog::class, 'accion_id', 'id');
}
public function responsable()
{
return $this->belongsTo(Persona::class, 'persona_id', 'id');
}
} }
+22
View File
@@ -0,0 +1,22 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class Modalidad extends Model
{
use HasFactory;
protected $table = 'modalidades';
protected $fillable = [
'descripcion',
];
public function formularios()
{
return $this->hasMany(Formulario::class, 'modalidad_id', 'id');
}
}
+25
View File
@@ -0,0 +1,25 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class ModoVacaciones extends Model
{
use HasFactory;
protected $table = 'modosvacaciones';
protected $fillable = [
'inicio',
'fin',
'descripcion',
'agenda_id',
];
public function agenda()
{
return $this->belongsTo(Agenda::class, 'agenda_id', 'id');
}
}
+3 -3
View File
@@ -17,12 +17,12 @@ class Persona extends Model
'apellido', 'apellido',
'cuil', 'cuil',
'fechanac', 'fechanac',
'foto_id', 'foto_id'
]; ];
public function Foto() public function Foto()
{ {
return $this->belongsTo(Foto::class, 'foto_id'); return $this->belongsTo(Foto::class, 'foto_id', 'id');
} }
public function profesionales() public function profesionales()
@@ -32,7 +32,7 @@ class Persona extends Model
public function cliente() public function cliente()
{ {
return $this->hasOne(Cliente::class, 'persona_id'); return $this->hasOne(Cliente::class, 'persona_id', 'id');
} }
public function telefonos() public function telefonos()
+1 -1
View File
@@ -18,6 +18,6 @@ class Profesion extends Model
public function profesionales() public function profesionales()
{ {
return $this->hasMany(Profesional::class, 'profesion_id'); return $this->hasMany(Profesional::class, 'profesion_id', 'id');
} }
} }
+8 -5
View File
@@ -9,9 +9,12 @@ class Profesional extends Model
{ {
use HasFactory; use HasFactory;
protected $table = 'profesionales';
protected $fillable = [ protected $fillable = [
'matricula', 'matricula',
'correo', 'correo',
'dni',
'credencialprofesional_id', 'credencialprofesional_id',
'estadoprofesional_id', 'estadoprofesional_id',
'persona_id', 'persona_id',
@@ -24,17 +27,17 @@ class Profesional extends Model
public function profesion() public function profesion()
{ {
return $this->belongsTo(Profesion::class, 'profesion_id'); return $this->belongsTo(Profesion::class, 'profesion_id', 'id');
} }
public function credencialProfesional() public function credencialProfesional()
{ {
return $this->belongsTo(CredencialeProfesionale::class, 'credencialprofesional_id'); return $this->belongsTo(CredencialProfesional::class, 'credencialprofesional_id', 'id');
} }
public function estadoProfesional() public function estadoProfesional()
{ {
return $this->belongsTo(EstadoProfesional::class, 'estadoprofesional_id'); return $this->belongsTo(EstadoProfesional::class, 'estadoprofesional_id', 'id');
} }
public function persona() public function persona()
@@ -71,7 +74,7 @@ class Profesional extends Model
public function formularios() public function formularios()
{ {
return $this->belongsToMany(Formulario::class, 'profesionales_formularios') return $this->belongsToMany(Formulario::class, 'profesionales_formularios', 'profesional_id', 'formulario_id')
->withPivot('estadoformulario') ->withPivot('estadoformulario')
->withTimestamps(); ->withTimestamps();
} }
@@ -83,7 +86,7 @@ class Profesional extends Model
public function clientes() public function clientes()
{ {
return $this->belongsToMany(Cliente::class, 'profesionales_cliente') return $this->belongsToMany(Cliente::class, 'profesionales_cliente', 'profesional_id', 'cliente_id')
->withPivot('estadorelacion') ->withPivot('estadorelacion')
->withTimestamps(); ->withTimestamps();
} }
+14 -6
View File
@@ -9,41 +9,49 @@ class Servicio extends Model
{ {
use HasFactory; use HasFactory;
protected $table = 'servicios';
protected $fillable = [ protected $fillable = [
'titulo', 'titulo',
'estado', 'estado',
'descripcion', 'descripcion',
'contenidoweb_id',
'profesion_id', 'profesion_id',
'foto_id', 'foto_id',
]; ];
//pertenece a //pertenece a
public function contenido() public function contenidoWeb()
{ {
return $this->belongsTo(Contenido::class, 'contenido_id'); return $this->belongsTo(ContenidoWeb::class, 'contenidoweb_id', 'id');
} }
public function profesion() public function profesion()
{ {
return $this->belongsTo(Profesion::class, 'profesion_id'); return $this->belongsTo(Profesion::class, 'profesion_id', 'id');
} }
public function foto() public function foto()
{ {
return $this->belongsTo(Foto::class, 'foto_id'); return $this->belongsTo(Foto::class, 'foto_id', 'id');
} }
// Tiene un // Tiene un
public function formulario() public function formulario()
{ {
return $this->hasOne(Formulario::class, 'servicio_id'); return $this->hasOne(Formulario::class, 'servicio_id', 'id');
}
public function turno()
{
return $this->hasOne(Turno::class, 'servicio_id', 'id');
} }
//Tablas intermedias //Tablas intermedias
public function profesional() public function profesional()
{ {
return $this->belongsToMany(Profesional::class, 'profesional_servicio', 'servicio_id', 'profesional_id'); return $this->belongsToMany(Profesional::class, 'profesionales_servicios', 'servicio_id', 'profesional_id');
} }
+21
View File
@@ -0,0 +1,21 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class Telefono extends Model
{
use HasFactory;
protected $table = 'telefonos';
protected $fillable = [
'telefono',
];
public function persona()
{
return $this->belongsToMany(Persona::class, 'personas_telefonos', 'telefono_id', 'persona_id');
}
}
+48
View File
@@ -0,0 +1,48 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class Turno extends Model
{
use HasFactory;
protected $table = 'turnos';
protected $fillable = [
'inicio',
'correo',
'nombrecompleto',
'descripcion',
'cliente_id',
'estadoturno_id',
'agenda_id',
'profesional_id',
'servicio_id',
];
public function estadoTurno()
{
return $this->belongsTo(EstadoTurno::class, 'estadoturno_id', 'id');
}
public function cliente()
{
return $this->belongsTo(Cliente::class, 'cliente_id', 'id');
}
public function agenda()
{
return $this->belongsTo(Agenda::class, 'agenda_id', 'id');
}
public function profesional()
{
return $this->belongsTo(Profesional::class, 'profesional_id', 'id');
}
public function servicio()
{
return $this->belongsTo(Servicio::class, 'servicio_id', 'id');
}
}
+21
View File
@@ -0,0 +1,21 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class Ubicacion extends Model
{
use HasFactory;
protected $table = 'ubicaciones';
protected $fillable = [
'link',
];
public function contenidoweb()
{
return $this->belongsTo(ContenidoWeb::class, 'contenidoweb_id','id');
}
}
+31
View File
@@ -0,0 +1,31 @@
<?php
namespace Database\Factories;
use App\Models\AccionLog;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\AccionLog>
*/
class AccionLogFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = AccionLog::class;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'descripcion' => $this->faker->sentence(),
];
}
}
@@ -0,0 +1,36 @@
<?php
namespace Database\Factories;
use App\Models\Administrador;
use App\Models\CredencialProfesional;
use App\Models\Persona;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Administrador>
*/
class AdministradorFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Administrador::class;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'persona_id' => Persona::factory(),
'dni' => (string) $this->faker->unique()->numberBetween(20000000, 45000000),
'correo' => $this->faker->unique()->safeEmail(),
'credencialprofesional_id' => CredencialProfesional::factory(),
];
}
}
+34
View File
@@ -0,0 +1,34 @@
<?php
namespace Database\Factories;
use App\Models\Agenda;
use App\Models\Profesional;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Agenda>
*/
class AgendaFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Agenda::class;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'estado' => $this->faker->randomElement(['Activa', 'Inactiva']),
'duracionturno' => $this->faker->randomElement([15, 30, 45, 60]),
'profesional_id' => Profesional::factory(),
];
}
}
+31
View File
@@ -0,0 +1,31 @@
<?php
namespace Database\Factories;
use App\Models\Baja;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Baja>
*/
class BajaFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Baja::class;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'motivo' => $this->faker->optional()->sentence(),
];
}
}
+37
View File
@@ -0,0 +1,37 @@
<?php
namespace Database\Factories;
use App\Models\Bug;
use App\Models\FotoBug;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Bug>
*/
class BugFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Bug::class;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'titulo' => $this->faker->sentence(4),
'descripcion' => $this->faker->paragraph(),
'prioridad' => $this->faker->randomElement(['baja', 'media', 'alta']),
'estado' => $this->faker->randomElement(['abierto', 'en progreso', 'cerrado']),
'version' => $this->faker->regexify('[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}'),
'fotobug_id' => $this->faker->optional()->then(fn () => FotoBug::factory()),
];
}
}
+37
View File
@@ -0,0 +1,37 @@
<?php
namespace Database\Factories;
use App\Models\Cliente;
use App\Models\CredencialCliente;
use App\Models\Persona;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Cliente>
*/
class ClienteFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Cliente::class;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'dni' => (string) $this->faker->unique()->numberBetween(20000000, 45000000),
'correo' => $this->faker->unique()->safeEmail(),
'persona_id' => Persona::factory(),
'baja_id' => null,
'credencialcliente_id' => CredencialCliente::factory(),
];
}
}
@@ -0,0 +1,31 @@
<?php
namespace Database\Factories;
use App\Models\ContenidoWeb;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\ContenidoWeb>
*/
class ContenidoWebFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = ContenidoWeb::class;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'quienessomos' => $this->faker->paragraph(3),
];
}
}
@@ -0,0 +1,35 @@
<?php
namespace Database\Factories;
use App\Models\CredencialCliente;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Facades\Hash;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\CredencialCliente>
*/
class CredencialClienteFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = CredencialCliente::class;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'contra' => Hash::make('password'),
'correo' => $this->faker->unique()->safeEmail(),
'token' => null,
'fecha_hora' => null,
];
}
}
@@ -0,0 +1,36 @@
<?php
namespace Database\Factories;
use App\Models\CredencialProfesional;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Facades\Hash;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\CredencialProfesional>
*/
class CredencialProfesionalFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = CredencialProfesional::class;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'usuario' => $this->faker->unique()->userName(),
'contra' => Hash::make('password'),
'rol' => $this->faker->randomElement(['Administrador', 'Profesional']),
'token' => null,
'fecha_hora' => null,
];
}
}
@@ -0,0 +1,35 @@
<?php
namespace Database\Factories;
use App\Models\Agenda;
use App\Models\Dia;
use App\Models\DiaDeAtencion;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\DiaDeAtencion>
*/
class DiaDeAtencionFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = DiaDeAtencion::class;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'descripcion' => $this->faker->sentence(3),
'agenda_id' => Agenda::factory(),
'dia_id' => Dia::factory(),
];
}
}
+31
View File
@@ -0,0 +1,31 @@
<?php
namespace Database\Factories;
use App\Models\Dia;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Dia>
*/
class DiaFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Dia::class;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'descripcion' => $this->faker->randomElement(['Lunes', 'Martes', 'Miércoles', 'Jueves', 'Viernes', 'Sábado', 'Domingo']),
];
}
}
@@ -0,0 +1,33 @@
<?php
namespace Database\Factories;
use App\Models\DiaPreferencia;
use App\Models\Formulario;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\DiaPreferencia>
*/
class DiaPreferenciaFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = DiaPreferencia::class;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'descripcion' => $this->faker->sentence(3),
'formulario_id' => Formulario::factory(),
];
}
}
@@ -0,0 +1,41 @@
<?php
namespace Database\Factories;
use App\Models\Cliente;
use App\Models\DocumentacionCliente;
use App\Models\Profesional;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\DocumentacionCliente>
*/
class DocumentacionClienteFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = DocumentacionCliente::class;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
$extension = $this->faker->randomElement(['pdf', 'jpg', 'png']);
$nombre = $this->faker->word();
return [
'nombre' => $nombre,
'mime_type' => $this->faker->mimeType(),
'tamanio_bytes' => $this->faker->numberBetween(1024, 10_485_760),
'extension' => $extension,
'cliente_id' => Cliente::factory(),
'profesional_id' => Profesional::factory(),
];
}
}
@@ -0,0 +1,31 @@
<?php
namespace Database\Factories;
use App\Models\EstadoProfesional;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\EstadoProfesional>
*/
class EstadoProfesionalFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = EstadoProfesional::class;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'descripcion' => $this->faker->randomElement(['Activo', 'Baja']),
];
}
}
+31
View File
@@ -0,0 +1,31 @@
<?php
namespace Database\Factories;
use App\Models\EstadoTurno;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\EstadoTurno>
*/
class EstadoTurnoFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = EstadoTurno::class;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'descripcion' => $this->faker->randomElement(['Pendiente', 'Confirmado', 'Cancelado', 'Finalizado']),
];
}
}
+34
View File
@@ -0,0 +1,34 @@
<?php
namespace Database\Factories;
use App\Models\Agenda;
use App\Models\Feriado;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Feriado>
*/
class FeriadoFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Feriado::class;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'fecha' => $this->faker->dateTimeBetween('-1 year', '+1 year')->format('Y-m-d'),
'descripcion' => $this->faker->sentence(3),
'agenda_id' => Agenda::factory(),
];
}
}
+32
View File
@@ -0,0 +1,32 @@
<?php
namespace Database\Factories;
use App\Models\Formulario;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Formulario>
*/
class FormularioFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Formulario::class;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'nombre' => $this->faker->sentence(3),
'descripcion' => $this->faker->paragraph(2),
];
}
}
+37
View File
@@ -0,0 +1,37 @@
<?php
namespace Database\Factories;
use App\Models\FotoBug;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\FotoBug>
*/
class FotoBugFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = FotoBug::class;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
$extension = $this->faker->randomElement(['png', 'jpg', 'jpeg']);
$nombre = $this->faker->word();
return [
'extension' => $extension,
'tamanio_bytes' => $this->faker->numberBetween(1024, 512000),
'nombre' => $nombre,
'mime_type' => "image/{$extension}",
];
}
}
+38
View File
@@ -0,0 +1,38 @@
<?php
namespace Database\Factories;
use App\Models\Foto;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Foto>
*/
class FotoFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Foto::class;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
$extension = $this->faker->randomElement(['png', 'jpg', 'jpeg']);
$nombre = $this->faker->word();
return [
'extension' => $extension,
'tamanio_bytes' => $this->faker->numberBetween(1024, 512000),
'nombre' => $nombre,
'mime_type' => "image/{$extension}",
'ruta' => "fotos/{$nombre}.{$extension}",
];
}
}
@@ -0,0 +1,37 @@
<?php
namespace Database\Factories;
use App\Models\DiaDeAtencion;
use App\Models\HorarioDeAtencion;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\HorarioDeAtencion>
*/
class HorarioDeAtencionFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = HorarioDeAtencion::class;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
$start = $this->faker->time('H:i:s', '09:00:00');
$end = $this->faker->time('H:i:s', '18:00:00');
return [
'horariocomienzo' => $start,
'horariofin' => $end,
'diadeatencion_id' => DiaDeAtencion::factory(),
];
}
}
@@ -0,0 +1,33 @@
<?php
namespace Database\Factories;
use App\Models\Formulario;
use App\Models\HorarioPreferencia;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\HorarioPreferencia>
*/
class HorarioPreferenciaFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = HorarioPreferencia::class;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'descripcion' => $this->faker->sentence(3),
'formulario_id' => Formulario::factory(),
];
}
}
@@ -0,0 +1,37 @@
<?php
namespace Database\Factories;
use App\Models\DiaDeAtencion;
use App\Models\HorarioReceso;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\HorarioReceso>
*/
class HorarioRecesoFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = HorarioReceso::class;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
$start = $this->faker->time('H:i:s', '12:00:00');
$end = $this->faker->time('H:i:s', '14:00:00');
return [
'comienzo' => $start,
'fin' => $end,
'diadeatencion_id' => DiaDeAtencion::factory(),
];
}
}
@@ -0,0 +1,38 @@
<?php
namespace Database\Factories;
use App\Models\AccionLog;
use App\Models\LogSeguridad;
use App\Models\Persona;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\LogSeguridad>
*/
class LogSeguridadFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = LogSeguridad::class;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'descripcion' => $this->faker->sentence(),
'fechahora' => $this->faker->dateTimeBetween('-1 month', 'now'),
'IPorigen' => $this->faker->ipv4(),
'rol' => $this->faker->randomElement(['Cliente', 'Profesional', 'Administrador']),
'accion_id' => AccionLog::factory(),
'persona_id' => Persona::factory(),
];
}
}
+31
View File
@@ -0,0 +1,31 @@
<?php
namespace Database\Factories;
use App\Models\Modalidad;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Modalidad>
*/
class ModalidadFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Modalidad::class;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'descripcion' => $this->faker->randomElement(['Presencial', 'Virtual']),
];
}
}
+41
View File
@@ -0,0 +1,41 @@
<?php
namespace Database\Factories;
use App\Models\Foto;
use App\Models\Persona;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Persona>
*/
class PersonaFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Persona::class;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
$dni = $this->faker->unique()->numberBetween(20000000, 45000000);
$cuilPrefix = $this->faker->randomElement(['20', '27']);
$cuilSuffix = $this->faker->numberBetween(0, 9);
return [
'dni' => (string) $dni,
'nombre' => $this->faker->firstName(),
'apellido' => $this->faker->lastName(),
'cuil' => "{$cuilPrefix}{$dni}{$cuilSuffix}",
'fechanac' => $this->faker->dateTimeBetween('-60 years', '-18 years')->format('Y-m-d'),
'foto_id' => Foto::factory(),
];
}
}
+32
View File
@@ -0,0 +1,32 @@
<?php
namespace Database\Factories;
use App\Models\Profesion;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Profesion>
*/
class ProfesionFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Profesion::class;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'titulo' => $this->faker->unique()->jobTitle(),
'visible_en_formulario' => $this->faker->boolean(80),
];
}
}
+42
View File
@@ -0,0 +1,42 @@
<?php
namespace Database\Factories;
use App\Models\CredencialProfesional;
use App\Models\EstadoProfesional;
use App\Models\Persona;
use App\Models\Profesional;
use App\Models\Profesion;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Profesional>
*/
class ProfesionalFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Profesional::class;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'matricula' => $this->faker->unique()->numerify('#####'),
'correo' => $this->faker->unique()->safeEmail(),
'dni' => (string) $this->faker->unique()->numberBetween(20000000, 45000000),
'persona_id' => Persona::factory(),
'profesion_id' => Profesion::factory(),
'credencialprofesional_id' => CredencialProfesional::factory(),
'estadoprofesional_id' => EstadoProfesional::factory(),
'baja_id' => null,
];
}
}
+32
View File
@@ -0,0 +1,32 @@
<?php
namespace Database\Factories;
use App\Models\Servicio;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Servicio>
*/
class ServicioFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Servicio::class;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'nombre' => $this->faker->words(3, true),
'descripcion' => $this->faker->sentence(12),
];
}
}
+31
View File
@@ -0,0 +1,31 @@
<?php
namespace Database\Factories;
use App\Models\Telefono;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Telefono>
*/
class TelefonoFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Telefono::class;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'telefono' => $this->faker->phoneNumber(),
];
}
}
+44
View File
@@ -0,0 +1,44 @@
<?php
namespace Database\Factories;
use App\Models\Agenda;
use App\Models\Cliente;
use App\Models\EstadoTurno;
use App\Models\Profesional;
use App\Models\Servicio;
use App\Models\Turno;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Turno>
*/
class TurnoFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Turno::class;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'inicio' => $this->faker->dateTimeBetween('-1 month', '+1 month'),
'correo' => $this->faker->unique()->safeEmail(),
'nombrecompleto' => $this->faker->name(),
'descripcion' => $this->faker->paragraph(),
'cliente_id' => Cliente::factory(),
'estadoturno_id' => EstadoTurno::factory(),
'agenda_id' => Agenda::factory(),
'profesional_id' => Profesional::factory(),
'servicio_id' => Servicio::factory(),
];
}
}
+33
View File
@@ -0,0 +1,33 @@
<?php
namespace Database\Factories;
use App\Models\ContenidoWeb;
use App\Models\Ubicacion;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Ubicacion>
*/
class UbicacionFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Ubicacion::class;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'link' => $this->faker->url(),
'contenidoweb_id' => ContenidoWeb::factory(),
];
}
}
@@ -23,6 +23,6 @@ return new class extends Migration
*/ */
public function down(): void public function down(): void
{ {
Schema::dropIfExists('acciones_logs'); Schema::dropIfExists('accioneslogs');
} }
}; };
@@ -23,6 +23,6 @@ return new class extends Migration
*/ */
public function down(): void public function down(): void
{ {
Schema::dropIfExists('contenidos_webs'); Schema::dropIfExists('contenidoswebs');
} }
}; };

Some files were not shown because too many files have changed in this diff Show More