Laravel 11, Vuexy Admin 10.3, by admin@koneko.mx
This commit is contained in:
BIN
modules/Admin/Database/data/catCFDI_V_4_20241121.xls
Normal file
BIN
modules/Admin/Database/data/catCFDI_V_4_20241121.xls
Normal file
Binary file not shown.
467
modules/Admin/Database/data/catalog-sat_bancos.json
Normal file
467
modules/Admin/Database/data/catalog-sat_bancos.json
Normal file
@ -0,0 +1,467 @@
|
||||
[
|
||||
{
|
||||
"c_banco": "002",
|
||||
"descripcion": "BANAMEX",
|
||||
"razon_social": "Banco Nacional de México, S.A., Institución de Banca Múltiple, Grupo Financiero Banamex"
|
||||
},
|
||||
{
|
||||
"c_banco": "006",
|
||||
"descripcion": "BANCOMEXT",
|
||||
"razon_social": "Banco Nacional de Comercio Exterior, Sociedad Nacional de Crédito, Institución de Banca de Desarrollo"
|
||||
},
|
||||
{
|
||||
"c_banco": "009",
|
||||
"descripcion": "BANOBRAS",
|
||||
"razon_social": "Banco Nacional de Obras y Servicios Públicos, Sociedad Nacional de Crédito, Institución de Banca de Desarrollo"
|
||||
},
|
||||
{
|
||||
"c_banco": "012",
|
||||
"descripcion": "BBVA BANCOMER",
|
||||
"razon_social": "BBVA Bancomer, S.A., Institución de Banca Múltiple, Grupo Financiero BBVA Bancomer"
|
||||
},
|
||||
{
|
||||
"c_banco": "014",
|
||||
"descripcion": "SANTANDER",
|
||||
"razon_social": "Banco Santander (México), S.A., Institución de Banca Múltiple, Grupo Financiero Santander"
|
||||
},
|
||||
{
|
||||
"c_banco": "019",
|
||||
"descripcion": "BANJERCITO",
|
||||
"razon_social": "Banco Nacional del Ejército, Fuerza Aérea y Armada, Sociedad Nacional de Crédito, Institución de Banca de Desarrollo"
|
||||
},
|
||||
{
|
||||
"c_banco": "021",
|
||||
"descripcion": "HSBC",
|
||||
"razon_social": "HSBC México, S.A., institución De Banca Múltiple, Grupo Financiero HSBC"
|
||||
},
|
||||
{
|
||||
"c_banco": "030",
|
||||
"descripcion": "BAJIO",
|
||||
"razon_social": "Banco del Bajío, S.A., Institución de Banca Múltiple"
|
||||
},
|
||||
{
|
||||
"c_banco": "032",
|
||||
"descripcion": "IXE",
|
||||
"razon_social": "IXE Banco, S.A., Institución de Banca Múltiple, IXE Grupo Financiero"
|
||||
},
|
||||
{
|
||||
"c_banco": "036",
|
||||
"descripcion": "INBURSA",
|
||||
"razon_social": "Banco Inbursa, S.A., Institución de Banca Múltiple, Grupo Financiero Inbursa"
|
||||
},
|
||||
{
|
||||
"c_banco": "037",
|
||||
"descripcion": "INTERACCIONES",
|
||||
"razon_social": "Banco Interacciones, S.A., Institución de Banca Múltiple"
|
||||
},
|
||||
{
|
||||
"c_banco": "042",
|
||||
"descripcion": "MIFEL",
|
||||
"razon_social": "Banca Mifel, S.A., Institución de Banca Múltiple, Grupo Financiero Mifel"
|
||||
},
|
||||
{
|
||||
"c_banco": "044",
|
||||
"descripcion": "SCOTIABANK",
|
||||
"razon_social": "Scotiabank Inverlat, S.A."
|
||||
},
|
||||
{
|
||||
"c_banco": "058",
|
||||
"descripcion": "BANREGIO",
|
||||
"razon_social": "Banco Regional de Monterrey, S.A., Institución de Banca Múltiple, Banregio Grupo Financiero"
|
||||
},
|
||||
{
|
||||
"c_banco": "059",
|
||||
"descripcion": "INVEX",
|
||||
"razon_social": "Banco Invex, S.A., Institución de Banca Múltiple, Invex Grupo Financiero"
|
||||
},
|
||||
{
|
||||
"c_banco": "060",
|
||||
"descripcion": "BANSI",
|
||||
"razon_social": "Bansi, S.A., Institución de Banca Múltiple"
|
||||
},
|
||||
{
|
||||
"c_banco": "062",
|
||||
"descripcion": "AFIRME",
|
||||
"razon_social": "Banca Afirme, S.A., Institución de Banca Múltiple"
|
||||
},
|
||||
{
|
||||
"c_banco": "072",
|
||||
"descripcion": "BANORTE",
|
||||
"razon_social": "Banco Mercantil del Norte, S.A., Institución de Banca Múltiple, Grupo Financiero Banorte"
|
||||
},
|
||||
{
|
||||
"c_banco": "102",
|
||||
"descripcion": "THE ROYAL BANK",
|
||||
"razon_social": "The Royal Bank of Scotland México, S.A., Institución de Banca Múltiple"
|
||||
},
|
||||
{
|
||||
"c_banco": "103",
|
||||
"descripcion": "AMERICAN EXPRESS",
|
||||
"razon_social": "American Express Bank (México), S.A., Institución de Banca Múltiple"
|
||||
},
|
||||
{
|
||||
"c_banco": "106",
|
||||
"descripcion": "BAMSA",
|
||||
"razon_social": "Bank of America México, S.A., Institución de Banca Múltiple, Grupo Financiero Bank of America"
|
||||
},
|
||||
{
|
||||
"c_banco": "108",
|
||||
"descripcion": "TOKYO",
|
||||
"razon_social": "Bank of Tokyo-Mitsubishi UFJ (México), S.A."
|
||||
},
|
||||
{
|
||||
"c_banco": "110",
|
||||
"descripcion": "JP MORGAN",
|
||||
"razon_social": "Banco J.P. Morgan, S.A., Institución de Banca Múltiple, J.P. Morgan Grupo Financiero"
|
||||
},
|
||||
{
|
||||
"c_banco": "112",
|
||||
"descripcion": "BMONEX",
|
||||
"razon_social": "Banco Monex, S.A., Institución de Banca Múltiple"
|
||||
},
|
||||
{
|
||||
"c_banco": "113",
|
||||
"descripcion": "VE POR MAS",
|
||||
"razon_social": "Banco Ve Por Mas, S.A. Institución de Banca Múltiple"
|
||||
},
|
||||
{
|
||||
"c_banco": "116",
|
||||
"descripcion": "ING",
|
||||
"razon_social": "ING Bank (México), S.A., Institución de Banca Múltiple, ING Grupo Financiero"
|
||||
},
|
||||
{
|
||||
"c_banco": "124",
|
||||
"descripcion": "DEUTSCHE",
|
||||
"razon_social": "Deutsche Bank México, S.A., Institución de Banca Múltiple"
|
||||
},
|
||||
{
|
||||
"c_banco": "126",
|
||||
"descripcion": "CREDIT SUISSE",
|
||||
"razon_social": "Banco Credit Suisse (México), S.A. Institución de Banca Múltiple, Grupo Financiero Credit Suisse (México)"
|
||||
},
|
||||
{
|
||||
"c_banco": "127",
|
||||
"descripcion": "AZTECA",
|
||||
"razon_social": "Banco Azteca, S.A. Institución de Banca Múltiple."
|
||||
},
|
||||
{
|
||||
"c_banco": "128",
|
||||
"descripcion": "AUTOFIN",
|
||||
"razon_social": "Banco Autofin México, S.A. Institución de Banca Múltiple"
|
||||
},
|
||||
{
|
||||
"c_banco": "129",
|
||||
"descripcion": "BARCLAYS",
|
||||
"razon_social": "Barclays Bank México, S.A., Institución de Banca Múltiple, Grupo Financiero Barclays México"
|
||||
},
|
||||
{
|
||||
"c_banco": "130",
|
||||
"descripcion": "COMPARTAMOS",
|
||||
"razon_social": "Banco Compartamos, S.A., Institución de Banca Múltiple"
|
||||
},
|
||||
{
|
||||
"c_banco": "131",
|
||||
"descripcion": "BANCO FAMSA",
|
||||
"razon_social": "Banco Ahorro Famsa, S.A., Institución de Banca Múltiple"
|
||||
},
|
||||
{
|
||||
"c_banco": "132",
|
||||
"descripcion": "BMULTIVA",
|
||||
"razon_social": "Banco Multiva, S.A., Institución de Banca Múltiple, Multivalores Grupo Financiero"
|
||||
},
|
||||
{
|
||||
"c_banco": "133",
|
||||
"descripcion": "ACTINVER",
|
||||
"razon_social": "Banco Actinver, S.A. Institución de Banca Múltiple, Grupo Financiero Actinver"
|
||||
},
|
||||
{
|
||||
"c_banco": "134",
|
||||
"descripcion": "WAL-MART",
|
||||
"razon_social": "Banco Wal-Mart de México Adelante, S.A., Institución de Banca Múltiple"
|
||||
},
|
||||
{
|
||||
"c_banco": "135",
|
||||
"descripcion": "NAFIN",
|
||||
"razon_social": "Nacional Financiera, Sociedad Nacional de Crédito, Institución de Banca de Desarrollo"
|
||||
},
|
||||
{
|
||||
"c_banco": "136",
|
||||
"descripcion": "INTERBANCO",
|
||||
"razon_social": "Inter Banco, S.A. Institución de Banca Múltiple"
|
||||
},
|
||||
{
|
||||
"c_banco": "137",
|
||||
"descripcion": "BANCOPPEL",
|
||||
"razon_social": "BanCoppel, S.A., Institución de Banca Múltiple"
|
||||
},
|
||||
{
|
||||
"c_banco": "138",
|
||||
"descripcion": "ABC CAPITAL",
|
||||
"razon_social": "ABC Capital, S.A., Institución de Banca Múltiple"
|
||||
},
|
||||
{
|
||||
"c_banco": "139",
|
||||
"descripcion": "UBS BANK",
|
||||
"razon_social": "UBS Bank México, S.A., Institución de Banca Múltiple, UBS Grupo Financiero"
|
||||
},
|
||||
{
|
||||
"c_banco": "140",
|
||||
"descripcion": "CONSUBANCO",
|
||||
"razon_social": "Consubanco, S.A. Institución de Banca Múltiple"
|
||||
},
|
||||
{
|
||||
"c_banco": "141",
|
||||
"descripcion": "VOLKSWAGEN",
|
||||
"razon_social": "Volkswagen Bank, S.A., Institución de Banca Múltiple"
|
||||
},
|
||||
{
|
||||
"c_banco": "143",
|
||||
"descripcion": "CIBANCO",
|
||||
"razon_social": "CIBanco, S.A."
|
||||
},
|
||||
{
|
||||
"c_banco": "145",
|
||||
"descripcion": "BBASE",
|
||||
"razon_social": "Banco Base, S.A., Institución de Banca Múltiple"
|
||||
},
|
||||
{
|
||||
"c_banco": "166",
|
||||
"descripcion": "BANSEFI",
|
||||
"razon_social": "Banco del Ahorro Nacional y Servicios Financieros, Sociedad Nacional de Crédito, Institución de Banca de Desarrollo"
|
||||
},
|
||||
{
|
||||
"c_banco": "168",
|
||||
"descripcion": "HIPOTECARIA FEDERAL",
|
||||
"razon_social": "Sociedad Hipotecaria Federal, Sociedad Nacional de Crédito, Institución de Banca de Desarrollo"
|
||||
},
|
||||
{
|
||||
"c_banco": "600",
|
||||
"descripcion": "MONEXCB",
|
||||
"razon_social": "Monex Casa de Bolsa, S.A. de C.V. Monex Grupo Financiero"
|
||||
},
|
||||
{
|
||||
"c_banco": "601",
|
||||
"descripcion": "GBM",
|
||||
"razon_social": "GBM Grupo Bursátil Mexicano, S.A. de C.V. Casa de Bolsa"
|
||||
},
|
||||
{
|
||||
"c_banco": "602",
|
||||
"descripcion": "MASARI",
|
||||
"razon_social": "Masari Casa de Bolsa, S.A."
|
||||
},
|
||||
{
|
||||
"c_banco": "605",
|
||||
"descripcion": "VALUE",
|
||||
"razon_social": "Value, S.A. de C.V. Casa de Bolsa"
|
||||
},
|
||||
{
|
||||
"c_banco": "606",
|
||||
"descripcion": "ESTRUCTURADORES",
|
||||
"razon_social": "Estructuradores del Mercado de Valores Casa de Bolsa, S.A. de C.V."
|
||||
},
|
||||
{
|
||||
"c_banco": "607",
|
||||
"descripcion": "TIBER",
|
||||
"razon_social": "Casa de Cambio Tiber, S.A. de C.V."
|
||||
},
|
||||
{
|
||||
"c_banco": "608",
|
||||
"descripcion": "VECTOR",
|
||||
"razon_social": "Vector Casa de Bolsa, S.A. de C.V."
|
||||
},
|
||||
{
|
||||
"c_banco": "610",
|
||||
"descripcion": "B&B",
|
||||
"razon_social": "B y B, Casa de Cambio, S.A. de C.V."
|
||||
},
|
||||
{
|
||||
"c_banco": "614",
|
||||
"descripcion": "ACCIVAL",
|
||||
"razon_social": "Acciones y Valores Banamex, S.A. de C.V., Casa de Bolsa"
|
||||
},
|
||||
{
|
||||
"c_banco": "615",
|
||||
"descripcion": "MERRILL LYNCH",
|
||||
"razon_social": "Merrill Lynch México, S.A. de C.V. Casa de Bolsa"
|
||||
},
|
||||
{
|
||||
"c_banco": "616",
|
||||
"descripcion": "FINAMEX",
|
||||
"razon_social": "Casa de Bolsa Finamex, S.A. de C.V."
|
||||
},
|
||||
{
|
||||
"c_banco": "617",
|
||||
"descripcion": "VALMEX",
|
||||
"razon_social": "Valores Mexicanos Casa de Bolsa, S.A. de C.V."
|
||||
},
|
||||
{
|
||||
"c_banco": "618",
|
||||
"descripcion": "UNICA",
|
||||
"razon_social": "Unica Casa de Cambio, S.A. de C.V."
|
||||
},
|
||||
{
|
||||
"c_banco": "619",
|
||||
"descripcion": "MAPFRE",
|
||||
"razon_social": "MAPFRE Tepeyac, S.A."
|
||||
},
|
||||
{
|
||||
"c_banco": "620",
|
||||
"descripcion": "PROFUTURO",
|
||||
"razon_social": "Profuturo G.N.P., S.A. de C.V., Afore"
|
||||
},
|
||||
{
|
||||
"c_banco": "621",
|
||||
"descripcion": "CB ACTINVER",
|
||||
"razon_social": "Actinver Casa de Bolsa, S.A. de C.V."
|
||||
},
|
||||
{
|
||||
"c_banco": "622",
|
||||
"descripcion": "OACTIN",
|
||||
"razon_social": "OPERADORA ACTINVER, S.A. DE C.V."
|
||||
},
|
||||
{
|
||||
"c_banco": "623",
|
||||
"descripcion": "SKANDIA",
|
||||
"razon_social": "Skandia Vida, S.A. de C.V."
|
||||
},
|
||||
{
|
||||
"c_banco": "626",
|
||||
"descripcion": "CBDEUTSCHE",
|
||||
"razon_social": "Deutsche Securities, S.A. de C.V. CASA DE BOLSA"
|
||||
},
|
||||
{
|
||||
"c_banco": "627",
|
||||
"descripcion": "ZURICH",
|
||||
"razon_social": "Zurich Compañía de Seguros, S.A."
|
||||
},
|
||||
{
|
||||
"c_banco": "628",
|
||||
"descripcion": "ZURICHVI",
|
||||
"razon_social": "Zurich Vida, Compañía de Seguros, S.A."
|
||||
},
|
||||
{
|
||||
"c_banco": "629",
|
||||
"descripcion": "SU CASITA",
|
||||
"razon_social": "Hipotecaria Su Casita, S.A. de C.V. SOFOM ENR"
|
||||
},
|
||||
{
|
||||
"c_banco": "630",
|
||||
"descripcion": "CB INTERCAM",
|
||||
"razon_social": "Intercam Casa de Bolsa, S.A. de C.V."
|
||||
},
|
||||
{
|
||||
"c_banco": "631",
|
||||
"descripcion": "CI BOLSA",
|
||||
"razon_social": "CI Casa de Bolsa, S.A. de C.V."
|
||||
},
|
||||
{
|
||||
"c_banco": "632",
|
||||
"descripcion": "BULLTICK CB",
|
||||
"razon_social": "Bulltick Casa de Bolsa, S.A., de C.V."
|
||||
},
|
||||
{
|
||||
"c_banco": "633",
|
||||
"descripcion": "STERLING",
|
||||
"razon_social": "Sterling Casa de Cambio, S.A. de C.V."
|
||||
},
|
||||
{
|
||||
"c_banco": "634",
|
||||
"descripcion": "FINCOMUN",
|
||||
"razon_social": "Fincomún, Servicios Financieros Comunitarios, S.A. de C.V."
|
||||
},
|
||||
{
|
||||
"c_banco": "636",
|
||||
"descripcion": "HDI SEGUROS",
|
||||
"razon_social": "HDI Seguros, S.A. de C.V."
|
||||
},
|
||||
{
|
||||
"c_banco": "637",
|
||||
"descripcion": "ORDER",
|
||||
"razon_social": "Order Express Casa de Cambio, S.A. de C.V"
|
||||
},
|
||||
{
|
||||
"c_banco": "638",
|
||||
"descripcion": "AKALA",
|
||||
"razon_social": "Akala, S.A. de C.V., Sociedad Financiera Popular"
|
||||
},
|
||||
{
|
||||
"c_banco": "640",
|
||||
"descripcion": "CB JPMORGAN",
|
||||
"razon_social": "J.P. Morgan Casa de Bolsa, S.A. de C.V. J.P. Morgan Grupo Financiero"
|
||||
},
|
||||
{
|
||||
"c_banco": "642",
|
||||
"descripcion": "REFORMA",
|
||||
"razon_social": "Operadora de Recursos Reforma, S.A. de C.V., S.F.P."
|
||||
},
|
||||
{
|
||||
"c_banco": "646",
|
||||
"descripcion": "STP",
|
||||
"razon_social": "Sistema de Transferencias y Pagos STP, S.A. de C.V.SOFOM ENR"
|
||||
},
|
||||
{
|
||||
"c_banco": "647",
|
||||
"descripcion": "TELECOMM",
|
||||
"razon_social": "Telecomunicaciones de México"
|
||||
},
|
||||
{
|
||||
"c_banco": "648",
|
||||
"descripcion": "EVERCORE",
|
||||
"razon_social": "Evercore Casa de Bolsa, S.A. de C.V."
|
||||
},
|
||||
{
|
||||
"c_banco": "649",
|
||||
"descripcion": "SKANDIA",
|
||||
"razon_social": "Skandia Operadora de Fondos, S.A. de C.V."
|
||||
},
|
||||
{
|
||||
"c_banco": "651",
|
||||
"descripcion": "SEGMTY",
|
||||
"razon_social": "Seguros Monterrey New York Life, S.A de C.V"
|
||||
},
|
||||
{
|
||||
"c_banco": "652",
|
||||
"descripcion": "ASEA",
|
||||
"razon_social": "Solución Asea, S.A. de C.V., Sociedad Financiera Popular"
|
||||
},
|
||||
{
|
||||
"c_banco": "653",
|
||||
"descripcion": "KUSPIT",
|
||||
"razon_social": "Kuspit Casa de Bolsa, S.A. de C.V."
|
||||
},
|
||||
{
|
||||
"c_banco": "655",
|
||||
"descripcion": "SOFIEXPRESS",
|
||||
"razon_social": "J.P. SOFIEXPRESS, S.A. de C.V., S.F.P."
|
||||
},
|
||||
{
|
||||
"c_banco": "656",
|
||||
"descripcion": "UNAGRA",
|
||||
"razon_social": "UNAGRA, S.A. de C.V., S.F.P."
|
||||
},
|
||||
{
|
||||
"c_banco": "659",
|
||||
"descripcion": "OPCIONES EMPRESARIALES DEL NOROESTE",
|
||||
"razon_social": "OPCIONES EMPRESARIALES DEL NORESTE, S.A. DE C.V., S.F.P."
|
||||
},
|
||||
{
|
||||
"c_banco": "901",
|
||||
"descripcion": "CLS",
|
||||
"razon_social": "Cls Bank International"
|
||||
},
|
||||
{
|
||||
"c_banco": "902",
|
||||
"descripcion": "INDEVAL",
|
||||
"razon_social": "SD. Indeval, S.A. de C.V."
|
||||
},
|
||||
{
|
||||
"c_banco": "670",
|
||||
"descripcion": "LIBERTAD",
|
||||
"razon_social": "Libertad Servicios Financieros, S.A. De C.V."
|
||||
},
|
||||
{
|
||||
"c_banco": "999",
|
||||
"descripcion": "N/A",
|
||||
"razon_social": null
|
||||
}
|
||||
]
|
14
modules/Admin/Database/data/users.csv
Normal file
14
modules/Admin/Database/data/users.csv
Normal file
@ -0,0 +1,14 @@
|
||||
name,email,role
|
||||
Administrador Web,webadmin@concierge.test,Administrador Web
|
||||
Productos y servicios,productos@concierge.test,Productos y servicios
|
||||
Recursos humanos,rrhh@concierge.test,Recursos humanos
|
||||
Nómina,nomina@concierge.test,Nómina
|
||||
Activos fijos,activos@concierge.test,Activos fijos
|
||||
Compras y gastos,compras@concierge.test,Compras y gastos
|
||||
CRM,crm@concierge.test,CRM
|
||||
Vendedor,vendedor@concierge.test,Vendedor
|
||||
Gerente,gerente@concierge.test,Gerente
|
||||
Facturación,facturacion@concierge.test,Facturación
|
||||
Facturación avanzado,facturacion_avanzado@concierge.test,Facturación avanzado
|
||||
Finanzas,finanzas@concierge.test,Finanzas
|
||||
Auditor,auditor@concierge.test,Auditor
|
|
49
modules/Admin/Database/factories/UserFactory.php
Normal file
49
modules/Admin/Database/factories/UserFactory.php
Normal file
@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\Database\factories;
|
||||
|
||||
use Modules\Admin\App\Models\User;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\Modules\Admin\App\Models\User>
|
||||
*/
|
||||
class UserFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The current password being used by the factory.
|
||||
*/
|
||||
protected static ?string $password;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'name' => fake()->name(),
|
||||
'email' => fake()->unique()->safeEmail(),
|
||||
'email_verified_at' => now(),
|
||||
'password' => static::$password ??= Hash::make('password'),
|
||||
'two_factor_secret' => null,
|
||||
'two_factor_recovery_codes' => null,
|
||||
'remember_token' => Str::random(10),
|
||||
'profile_photo_path' => null,
|
||||
'status' => fake()->randomElement([User::STATUS_ENABLED, User::STATUS_DISABLED])
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate that the model's email address should be unverified.
|
||||
*/
|
||||
public function unverified(): static
|
||||
{
|
||||
return $this->state(fn(array $attributes) => [
|
||||
'email_verified_at' => null,
|
||||
]);
|
||||
}
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('users', function (Blueprint $table) {
|
||||
$table->mediumIncrements('id');
|
||||
|
||||
$table->string('contact_code', 50)->unique()->nullable()->comment('Código único del contacto');
|
||||
|
||||
$table->string('name', 100)->comment('Nombre')->index();
|
||||
$table->string('last_name', 100)->comment('Apellidos')->nullable()->index();
|
||||
|
||||
$table->string('email')->unique()->index();
|
||||
$table->timestamp('email_verified_at')->nullable();
|
||||
$table->string('password')->nullable();
|
||||
$table->rememberToken();
|
||||
$table->string('profile_photo_path', 2048)->nullable();
|
||||
|
||||
$table->string('company', 100)->nullable()->comment('Nombre de la empresa')->index();
|
||||
|
||||
$table->date('birth_date')->nullable()->comment('Fecha de nacimiento');
|
||||
$table->date('hire_date')->nullable()->comment('Fecha de contratación');
|
||||
|
||||
$table->string('curp', 50)->nullable()->comment('Clave Única de Registro de Población (CURP)')->index();
|
||||
$table->string('nss', 11)->nullable()->comment('Número de seguridad social')->index();
|
||||
|
||||
$table->string('job_title', 100)->nullable()->comment('Cargo del contacto en la empresa');
|
||||
|
||||
$table->json('face_vector')->nullable()->comment('Vector de características faciales');
|
||||
|
||||
$table->string('rfc', 13)->unique()->nullable()->index();
|
||||
$table->string('nombre_fiscal')->nullable()->index();
|
||||
|
||||
$table->unsignedTinyInteger('tipo_persona')->nullable()->index();
|
||||
|
||||
$table->unsignedSmallInteger('c_regimen_fiscal')->nullable()->index(); // sat_regimen_fiscal.c_regimen_fiscal
|
||||
|
||||
$table->unsignedMediumInteger('domicilio_fiscal')->nullable()->index(); // sat_codigo_postal.c_codigo_postal
|
||||
|
||||
$table->char('c_uso_cfdi', 4)->charset('ascii')->collation('ascii_general_ci')->nullable()->index(); // sat_uso_cfdi.c_uso_cfdi
|
||||
|
||||
$table->unsignedTinyInteger('is_partner')->nullable()->index();
|
||||
$table->unsignedTinyInteger('is_employee')->nullable()->index();
|
||||
$table->unsignedTinyInteger('is_prospect')->nullable()->index();
|
||||
$table->unsignedTinyInteger('is_customer')->nullable()->index();
|
||||
$table->unsignedTinyInteger('is_provider')->nullable()->index();
|
||||
$table->unsignedTinyInteger('is_user')->nullable()->index();
|
||||
|
||||
$table->unsignedTinyInteger('status')->nullable()->index();
|
||||
|
||||
// Auditoría
|
||||
$table->dateTime('last_login_at')->nullable();
|
||||
$table->ipAddress('last_login_ip')->nullable();
|
||||
|
||||
$table->unsignedMediumInteger('created_by')->nullable()->index(); // users.id
|
||||
$table->timestamps();
|
||||
|
||||
// Relaciones
|
||||
$table->foreign('created_by')->references('id')->on('users')->onUpdate('restrict')->onDelete('restrict');
|
||||
});
|
||||
|
||||
Schema::create('password_reset_tokens', function (Blueprint $table) {
|
||||
$table->string('email')->primary();
|
||||
$table->string('token');
|
||||
$table->timestamp('created_at')->nullable();
|
||||
});
|
||||
|
||||
Schema::create('sessions', function (Blueprint $table) {
|
||||
$table->string('id')->primary();
|
||||
$table->foreignId('user_id')->nullable()->index();
|
||||
$table->string('ip_address', 45)->nullable();
|
||||
$table->text('user_agent')->nullable();
|
||||
$table->longText('payload');
|
||||
$table->integer('last_activity')->index();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('users');
|
||||
Schema::dropIfExists('password_reset_tokens');
|
||||
Schema::dropIfExists('sessions');
|
||||
}
|
||||
};
|
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('cache', function (Blueprint $table) {
|
||||
$table->string('key')->primary();
|
||||
$table->mediumText('value');
|
||||
$table->integer('expiration');
|
||||
});
|
||||
|
||||
Schema::create('cache_locks', function (Blueprint $table) {
|
||||
$table->string('key')->primary();
|
||||
$table->string('owner');
|
||||
$table->integer('expiration');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('cache');
|
||||
Schema::dropIfExists('cache_locks');
|
||||
}
|
||||
};
|
@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('jobs', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('queue')->index();
|
||||
$table->longText('payload');
|
||||
$table->unsignedTinyInteger('attempts');
|
||||
$table->unsignedInteger('reserved_at')->nullable();
|
||||
$table->unsignedInteger('available_at');
|
||||
$table->unsignedInteger('created_at');
|
||||
});
|
||||
|
||||
Schema::create('job_batches', function (Blueprint $table) {
|
||||
$table->string('id')->primary();
|
||||
$table->string('name');
|
||||
$table->integer('total_jobs');
|
||||
$table->integer('pending_jobs');
|
||||
$table->integer('failed_jobs');
|
||||
$table->longText('failed_job_ids');
|
||||
$table->mediumText('options')->nullable();
|
||||
$table->integer('cancelled_at')->nullable();
|
||||
$table->integer('created_at');
|
||||
$table->integer('finished_at')->nullable();
|
||||
});
|
||||
|
||||
Schema::create('failed_jobs', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('uuid')->unique();
|
||||
$table->text('connection');
|
||||
$table->text('queue');
|
||||
$table->longText('payload');
|
||||
$table->longText('exception');
|
||||
$table->timestamp('failed_at')->useCurrent();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('jobs');
|
||||
Schema::dropIfExists('job_batches');
|
||||
Schema::dropIfExists('failed_jobs');
|
||||
}
|
||||
};
|
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('user_logins', function (Blueprint $table) {
|
||||
$table->integerIncrements('id');
|
||||
|
||||
$table->unsignedMediumInteger('user_id')->nullable()->index();
|
||||
$table->ipAddress('ip_address')->nullable();
|
||||
$table->string('user_agent')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
// Relaciones
|
||||
$table->foreign('user_id')->references('id')->on('users');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('user_logins');
|
||||
}
|
||||
};
|
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('personal_access_tokens', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->morphs('tokenable');
|
||||
$table->string('name');
|
||||
$table->string('token', 64)->unique();
|
||||
$table->text('abilities')->nullable();
|
||||
$table->timestamp('last_used_at')->nullable();
|
||||
$table->timestamp('expires_at')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('personal_access_tokens');
|
||||
}
|
||||
};
|
@ -0,0 +1,153 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
$teams = config('permission.teams');
|
||||
$tableNames = config('permission.table_names');
|
||||
$columnNames = config('permission.column_names');
|
||||
$pivotRole = $columnNames['role_pivot_key'] ?? 'role_id';
|
||||
$pivotPermission = $columnNames['permission_pivot_key'] ?? 'permission_id';
|
||||
|
||||
if (empty($tableNames)) {
|
||||
throw new \Exception('Error: config/permission.php not loaded. Run [php artisan config:clear] and try again.');
|
||||
}
|
||||
|
||||
if ($teams && empty($columnNames['team_foreign_key'] ?? null)) {
|
||||
throw new \Exception('Error: team_foreign_key on config/permission.php not loaded. Run [php artisan config:clear] and try again.');
|
||||
}
|
||||
|
||||
Schema::create($tableNames['permissions'], function (Blueprint $table) {
|
||||
//$table->engine('InnoDB');
|
||||
$table->bigIncrements('id'); // permission id
|
||||
$table->string('name'); // For MyISAM use string('name', 225); // (or 166 for InnoDB with Redundant/Compact row format)
|
||||
$table->string('group_name')->nullable()->index();
|
||||
$table->string('sub_group_name')->nullable()->index();
|
||||
$table->string('action')->nullable()->index();
|
||||
$table->string('guard_name'); // For MyISAM use string('guard_name', 25);
|
||||
$table->timestamps();
|
||||
|
||||
$table->unique(['name', 'guard_name']);
|
||||
$table->unique(['group_name', 'sub_group_name', 'action', 'guard_name']);
|
||||
});
|
||||
|
||||
Schema::create($tableNames['roles'], function (Blueprint $table) use ($teams, $columnNames) {
|
||||
//$table->engine('InnoDB');
|
||||
$table->bigIncrements('id'); // role id
|
||||
if ($teams || config('permission.testing')) { // permission.testing is a fix for sqlite testing
|
||||
$table->unsignedBigInteger($columnNames['team_foreign_key'])->nullable();
|
||||
$table->index($columnNames['team_foreign_key'], 'roles_team_foreign_key_index');
|
||||
}
|
||||
$table->string('name'); // For MyISAM use string('name', 225); // (or 166 for InnoDB with Redundant/Compact row format)
|
||||
$table->string('style')->nullable();
|
||||
$table->string('guard_name'); // For MyISAM use string('guard_name', 25);
|
||||
$table->timestamps();
|
||||
if ($teams || config('permission.testing')) {
|
||||
$table->unique([$columnNames['team_foreign_key'], 'name', 'guard_name']);
|
||||
} else {
|
||||
$table->unique(['name', 'guard_name']);
|
||||
}
|
||||
});
|
||||
|
||||
Schema::create($tableNames['model_has_permissions'], function (Blueprint $table) use ($tableNames, $columnNames, $pivotPermission, $teams) {
|
||||
$table->unsignedBigInteger($pivotPermission);
|
||||
|
||||
$table->string('model_type');
|
||||
$table->unsignedBigInteger($columnNames['model_morph_key']);
|
||||
$table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_permissions_model_id_model_type_index');
|
||||
|
||||
$table->foreign($pivotPermission)
|
||||
->references('id') // permission id
|
||||
->on($tableNames['permissions'])
|
||||
->onDelete('cascade');
|
||||
if ($teams) {
|
||||
$table->unsignedBigInteger($columnNames['team_foreign_key']);
|
||||
$table->index($columnNames['team_foreign_key'], 'model_has_permissions_team_foreign_key_index');
|
||||
|
||||
$table->primary(
|
||||
[$columnNames['team_foreign_key'], $pivotPermission, $columnNames['model_morph_key'], 'model_type'],
|
||||
'model_has_permissions_permission_model_type_primary'
|
||||
);
|
||||
} else {
|
||||
$table->primary(
|
||||
[$pivotPermission, $columnNames['model_morph_key'], 'model_type'],
|
||||
'model_has_permissions_permission_model_type_primary'
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
Schema::create($tableNames['model_has_roles'], function (Blueprint $table) use ($tableNames, $columnNames, $pivotRole, $teams) {
|
||||
$table->unsignedBigInteger($pivotRole);
|
||||
|
||||
$table->string('model_type');
|
||||
$table->unsignedBigInteger($columnNames['model_morph_key']);
|
||||
$table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_roles_model_id_model_type_index');
|
||||
|
||||
$table->foreign($pivotRole)
|
||||
->references('id') // role id
|
||||
->on($tableNames['roles'])
|
||||
->onDelete('cascade');
|
||||
if ($teams) {
|
||||
$table->unsignedBigInteger($columnNames['team_foreign_key']);
|
||||
$table->index($columnNames['team_foreign_key'], 'model_has_roles_team_foreign_key_index');
|
||||
|
||||
$table->primary(
|
||||
[$columnNames['team_foreign_key'], $pivotRole, $columnNames['model_morph_key'], 'model_type'],
|
||||
'model_has_roles_role_model_type_primary'
|
||||
);
|
||||
} else {
|
||||
$table->primary(
|
||||
[$pivotRole, $columnNames['model_morph_key'], 'model_type'],
|
||||
'model_has_roles_role_model_type_primary'
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
Schema::create($tableNames['role_has_permissions'], function (Blueprint $table) use ($tableNames, $pivotRole, $pivotPermission) {
|
||||
$table->unsignedBigInteger($pivotPermission);
|
||||
$table->unsignedBigInteger($pivotRole);
|
||||
|
||||
$table->foreign($pivotPermission)
|
||||
->references('id') // permission id
|
||||
->on($tableNames['permissions'])
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->foreign($pivotRole)
|
||||
->references('id') // role id
|
||||
->on($tableNames['roles'])
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->primary([$pivotPermission, $pivotRole], 'role_has_permissions_permission_id_role_id_primary');
|
||||
});
|
||||
|
||||
app('cache')
|
||||
->store(config('permission.cache.store') != 'default' ? config('permission.cache.store') : null)
|
||||
->forget(config('permission.cache.key'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
$tableNames = config('permission.table_names');
|
||||
|
||||
if (empty($tableNames)) {
|
||||
throw new \Exception('Error: config/permission.php not found and defaults could not be merged. Please publish the package configuration before proceeding, or drop the tables manually.');
|
||||
}
|
||||
|
||||
Schema::drop($tableNames['role_has_permissions']);
|
||||
Schema::drop($tableNames['model_has_roles']);
|
||||
Schema::drop($tableNames['model_has_permissions']);
|
||||
Schema::drop($tableNames['roles']);
|
||||
Schema::drop($tableNames['permissions']);
|
||||
}
|
||||
};
|
@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Laravel\Fortify\Fortify;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->text('two_factor_secret')
|
||||
->after('password')
|
||||
->nullable();
|
||||
|
||||
$table->text('two_factor_recovery_codes')
|
||||
->after('two_factor_secret')
|
||||
->nullable();
|
||||
|
||||
if (Fortify::confirmsTwoFactorAuthentication()) {
|
||||
$table->timestamp('two_factor_confirmed_at')
|
||||
->after('two_factor_recovery_codes')
|
||||
->nullable();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->dropColumn(array_merge([
|
||||
'two_factor_secret',
|
||||
'two_factor_recovery_codes',
|
||||
], Fortify::confirmsTwoFactorAuthentication() ? [
|
||||
'two_factor_confirmed_at',
|
||||
] : []));
|
||||
});
|
||||
}
|
||||
};
|
@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$connection = config('audit.drivers.database.connection', config('database.default'));
|
||||
$table = config('audit.drivers.database.table', 'audits');
|
||||
|
||||
Schema::connection($connection)->create($table, function (Blueprint $table) {
|
||||
|
||||
$morphPrefix = config('audit.user.morph_prefix', 'user');
|
||||
|
||||
$table->bigIncrements('id');
|
||||
$table->string($morphPrefix . '_type')->nullable();
|
||||
$table->unsignedBigInteger($morphPrefix . '_id')->nullable();
|
||||
$table->string('event');
|
||||
$table->morphs('auditable');
|
||||
$table->text('old_values')->nullable();
|
||||
$table->text('new_values')->nullable();
|
||||
$table->text('url')->nullable();
|
||||
$table->ipAddress('ip_address')->nullable();
|
||||
$table->string('user_agent', 1023)->nullable();
|
||||
$table->string('tags')->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
$table->index([$morphPrefix . '_id', $morphPrefix . '_type']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
$connection = config('audit.drivers.database.connection', config('database.default'));
|
||||
$table = config('audit.drivers.database.table', 'audits');
|
||||
|
||||
Schema::connection($connection)->drop($table);
|
||||
}
|
||||
};
|
@ -0,0 +1,305 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('sat_banco', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
|
||||
$table->unsignedSmallInteger('c_banco')->index();
|
||||
$table->string('descripcion');
|
||||
$table->string('razon_social')->nullable();
|
||||
$table->string('rfc', 13)->nullable();
|
||||
|
||||
$table->unsignedTinyInteger('status');
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('sat_clave_prod_serv', function (Blueprint $table) {
|
||||
$table->mediumIncrements('id');
|
||||
|
||||
$table->unsignedInteger('c_clave_prod_serv');
|
||||
$table->string('descripcion')->nullable()->fulltext();
|
||||
$table->string('incluir_iva_trasladado')->nullable();
|
||||
$table->string('incluir_ieps_trasladado')->nullable();
|
||||
$table->string('complemento_que_debe_incluir')->nullable();
|
||||
$table->date('fecha_inicio_vigencia')->nullable();
|
||||
$table->date('fecha_fin_vigencia')->nullable();
|
||||
$table->unsignedTinyInteger('estimulo_franja_fronteriza')->nullable();
|
||||
$table->string('palabras_similares', 1024)->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
// Indices
|
||||
$table->unique('c_clave_prod_serv');
|
||||
});
|
||||
|
||||
Schema::create('sat_clave_unidad', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
|
||||
$table->string('c_clave_unidad', 3)->unique();
|
||||
$table->string('nombre')->fulltext();
|
||||
$table->string('descripcion', 1024)->nullable();
|
||||
$table->string('categoria', 1024)->nullable();
|
||||
$table->string('nota', 1024)->nullable();
|
||||
$table->date('fecha_de_inicio_de_vigencia')->nullable();
|
||||
$table->date('fecha_de_fin_de_vigencia')->nullable();
|
||||
$table->string('simbolo')->nullable();
|
||||
$table->boolean('is_base')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('sat_forma_pago', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
|
||||
$table->unsignedTinyInteger('c_forma_pago');
|
||||
$table->string('descripcion');
|
||||
$table->string('bancarizado')->nullable();
|
||||
$table->string('numero_de_operacion')->nullable();
|
||||
$table->string('rfc_del_emisor_de_la_cuenta_ordenante')->nullable();
|
||||
$table->string('cuenta_ordenante')->nullable();
|
||||
$table->string('patron_para_cuenta_ordenante')->nullable();
|
||||
$table->string('rfc_del_emisor_cuenta_de_beneficiario')->nullable();
|
||||
$table->string('cuenta_de_benenficiario')->nullable();
|
||||
$table->string('patron_para_cuenta_beneficiaria')->nullable();
|
||||
$table->string('tipo_cadena_pago')->nullable();
|
||||
$table->string('banco_emisor_de_la_cuenta_ordenante')->nullable();
|
||||
$table->date('fecha_inicio_de_vigencia')->nullable();
|
||||
$table->date('fecha_fin_de_vigencia')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
// Indices
|
||||
$table->unique('c_forma_pago');
|
||||
});
|
||||
|
||||
Schema::create('sat_moneda', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
|
||||
$table->char('c_moneda', 3)->charset('ascii')->collation('ascii_general_ci');
|
||||
$table->string('descripcion');
|
||||
$table->string('decimales')->nullable();
|
||||
$table->string('porcentaje_variacion')->nullable();
|
||||
$table->date('fecha_inicio_de_vigencia')->nullable();
|
||||
$table->date('fecha_fin_de_vigencia')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
// Indices
|
||||
$table->unique('c_moneda');
|
||||
});
|
||||
|
||||
Schema::create('sat_codigo_postal', function (Blueprint $table) {
|
||||
$table->mediumIncrements('id');
|
||||
|
||||
$table->unsignedMediumInteger('c_codigo_postal');
|
||||
$table->string('c_estado', 3)->charset('ascii')->collation('ascii_general_ci');
|
||||
$table->unsignedSmallInteger('c_municipio')->nullable();
|
||||
$table->unsignedTinyInteger('c_localidad')->nullable();
|
||||
$table->string('estimulo_franja_fronteriza')->nullable();
|
||||
$table->date('fecha_inicio_de_vigencia')->nullable();
|
||||
$table->date('fecha_fin_de_vigencia')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
// Indices
|
||||
$table->index('c_codigo_postal');
|
||||
$table->index('c_estado');
|
||||
$table->index('c_municipio');
|
||||
$table->index('c_localidad');
|
||||
|
||||
$table->unique('c_codigo_postal');
|
||||
});
|
||||
|
||||
Schema::create('sat_regimen_fiscal', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
|
||||
$table->unsignedSmallInteger('c_regimen_fiscal');
|
||||
$table->string('descripcion');
|
||||
$table->char('fisica', 2)->nullable();
|
||||
$table->char('moral', 2)->nullable();
|
||||
$table->date('fecha_de_inicio_de_vigencia')->nullable();
|
||||
$table->date('fecha_de_fin_de_vigencia')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
// Indices
|
||||
$table->unique('c_regimen_fiscal');
|
||||
});
|
||||
|
||||
Schema::create('sat_pais', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
|
||||
$table->char('c_pais', 3)->charset('ascii')->collation('ascii_general_ci');
|
||||
$table->string('descripcion');
|
||||
$table->string('formato_de_codigo_postal')->nullable();
|
||||
$table->string('formato_de_registro_de_identidad_tributaria')->nullable();
|
||||
$table->string('validacion_del_registro_de_identidad_tributaria')->nullable();
|
||||
$table->string('agrupaciones')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
// Indices
|
||||
$table->unique('c_pais');
|
||||
});
|
||||
|
||||
Schema::create('sat_uso_cfdi', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
|
||||
$table->char('c_uso_cfdi', 4)->charset('ascii')->collation('ascii_general_ci');
|
||||
$table->string('descripcion');
|
||||
$table->char('aplica_para_tipo_persona_fisica', 2)->nullable();
|
||||
$table->char('aplica_para_tipo_persona_moral', 2)->nullable();
|
||||
$table->date('fecha_inicio_de_vigencia')->nullable();
|
||||
$table->date('fecha_fin_de_vigencia')->nullable();
|
||||
$table->string('regimen_fiscal_receptor')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
// Indices
|
||||
$table->unique('c_uso_cfdi');
|
||||
});
|
||||
|
||||
Schema::create('sat_colonia', function (Blueprint $table) {
|
||||
$table->mediumIncrements('id');
|
||||
|
||||
$table->unsignedMediumInteger('c_colonia');
|
||||
$table->unsignedMediumInteger('c_codigo_postal');
|
||||
$table->string('nombre_del_asentamiento')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
// Indices
|
||||
$table->index('c_colonia');
|
||||
$table->index('c_codigo_postal');
|
||||
|
||||
$table->unique(['c_colonia', 'c_codigo_postal']);
|
||||
});
|
||||
|
||||
Schema::create('sat_estado', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
|
||||
$table->string('c_estado', 3)->charset('ascii')->collation('ascii_general_ci');
|
||||
$table->char('c_pais', 3)->charset('ascii')->collation('ascii_general_ci');
|
||||
$table->string('nombre_del_estado');
|
||||
$table->date('fecha_inicio_de_vigencia')->nullable();
|
||||
$table->date('fecha_fin_de_vigencia')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
// Indices
|
||||
$table->index('c_estado');
|
||||
$table->index('c_pais');
|
||||
|
||||
$table->unique(['c_estado', 'c_pais']);
|
||||
});
|
||||
|
||||
Schema::create('sat_localidad', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
|
||||
$table->unsignedTinyInteger('c_localidad');
|
||||
$table->string('c_estado', 3)->charset('ascii')->collation('ascii_general_ci');
|
||||
$table->string('descripcion');
|
||||
$table->date('fecha_de_inicio_de_vigencia')->nullable();
|
||||
$table->date('fecha_de_fin_de_vigencia')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
// Indices
|
||||
$table->index('c_localidad');
|
||||
$table->index('c_estado');
|
||||
|
||||
$table->unique(['c_localidad', 'c_estado']);
|
||||
});
|
||||
|
||||
Schema::create('sat_municipio', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
|
||||
$table->unsignedSmallInteger('c_municipio');
|
||||
$table->string('c_estado', 3)->charset('ascii')->collation('ascii_general_ci');
|
||||
$table->string('descripcion');
|
||||
$table->date('fecha_de_inicio_de_vigencia')->nullable();
|
||||
$table->date('fecha_de_fin_de_vigencia')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
// Indices
|
||||
$table->index('c_municipio');
|
||||
$table->index('c_estado');
|
||||
|
||||
$table->unique(['c_municipio', 'c_estado']);
|
||||
});
|
||||
|
||||
Schema::create('sat_deduccion', function (Blueprint $table) {
|
||||
$table->tinyIncrements('id');
|
||||
|
||||
$table->unsignedTinyInteger('c_deduccion')->index();
|
||||
$table->string('descripcion');
|
||||
$table->date('fecha_inicio_de_vigencia')->nullable();
|
||||
$table->date('fecha_fin_de_vigencia')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('sat_percepcion', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
|
||||
$table->unsignedTinyInteger('c_percepcion')->index();
|
||||
$table->string('descripcion');
|
||||
$table->date('fecha_inicio_de_vigencia')->nullable();
|
||||
$table->date('fecha_fin_de_vigencia')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
// Indices
|
||||
$table->foreign('c_regimen_fiscal')
|
||||
->references('c_regimen_fiscal')
|
||||
->on('sat_regimen_fiscal')
|
||||
->onUpdate('restrict')
|
||||
->onDelete('restrict');
|
||||
|
||||
$table->foreign('domicilio_fiscal')
|
||||
->references('c_codigo_postal')
|
||||
->on('sat_codigo_postal')
|
||||
->onUpdate('restrict')
|
||||
->onDelete('restrict');
|
||||
|
||||
$table->foreign('c_uso_cfdi')
|
||||
->references('c_uso_cfdi')
|
||||
->on('sat_uso_cfdi')
|
||||
->onUpdate('restrict')
|
||||
->onDelete('restrict');
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('sat_forma_pago');
|
||||
Schema::dropIfExists('sat_moneda');
|
||||
Schema::dropIfExists('sat_codigo_postal');
|
||||
Schema::dropIfExists('sat_regimen_fiscal');
|
||||
Schema::dropIfExists('sat_pais');
|
||||
Schema::dropIfExists('sat_uso_cfdi');
|
||||
Schema::dropIfExists('sat_colonia');
|
||||
Schema::dropIfExists('sat_estado');
|
||||
Schema::dropIfExists('sat_localidad');
|
||||
Schema::dropIfExists('sat_municipio');
|
||||
}
|
||||
};
|
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('settings', function (Blueprint $table) {
|
||||
$table->mediumIncrements('id');
|
||||
|
||||
$table->string('key')->index();
|
||||
$table->text('value');
|
||||
$table->unsignedMediumInteger('user_id')->nullable()->index();
|
||||
|
||||
// Unique constraints
|
||||
$table->unique(['user_id', 'key']);
|
||||
|
||||
// Relaciones
|
||||
$table->foreign('user_id')->references('id')->on('users');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('settings');
|
||||
}
|
||||
|
||||
};
|
@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('media_items', function (Blueprint $table) {
|
||||
$table->mediumIncrements('id');
|
||||
|
||||
// Relación polimórfica
|
||||
$table->unsignedMediumInteger('mediaable_id');
|
||||
$table->string('mediaable_type');
|
||||
|
||||
$table->unsignedTinyInteger('type')->index(); // Tipo de medio: 'image', 'video', 'file', 'youtube'
|
||||
$table->unsignedTinyInteger('sub_type')->index(); // Subtipo de medio: 'thumbnail', 'main', 'additional'
|
||||
|
||||
$table->string('url', 255)->nullable(); // URL del medio
|
||||
$table->string('path')->nullable(); // Ruta del archivo si está almacenado localmente
|
||||
|
||||
$table->string('title')->nullable()->index(); // Título del medio
|
||||
$table->mediumText('description')->nullable(); // Descripción del medio
|
||||
$table->unsignedTinyInteger('order')->nullable(); // Orden de presentación
|
||||
|
||||
// Authoría
|
||||
$table->timestamps();
|
||||
|
||||
// Índices
|
||||
$table->index(['mediaable_type', 'mediaable_id']);
|
||||
$table->index(['mediaable_type', 'mediaable_id', 'type']);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('images');
|
||||
}
|
||||
};
|
16
modules/Admin/Database/seeders/AdminDatabaseSeeder.php
Normal file
16
modules/Admin/Database/seeders/AdminDatabaseSeeder.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\Database\seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class AdminDatabaseSeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
$this->call(RoleSeeder::class);
|
||||
$this->call(UserSeeder::class);
|
||||
$this->call(SettingSeeder::class);
|
||||
$this->call(SATCatalogsSeeder::class);
|
||||
}
|
||||
}
|
1272
modules/Admin/Database/seeders/RoleSeeder.php
Normal file
1272
modules/Admin/Database/seeders/RoleSeeder.php
Normal file
File diff suppressed because it is too large
Load Diff
83
modules/Admin/Database/seeders/SATCatalogsSeeder.php
Normal file
83
modules/Admin/Database/seeders/SATCatalogsSeeder.php
Normal file
@ -0,0 +1,83 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\Database\seeders;
|
||||
|
||||
use Modules\Admin\App\Imports\SatCatalogsImport;
|
||||
use Maatwebsite\Excel\Facades\Excel;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\File;
|
||||
use Modules\Admin\App\Models\Sat\Banco;
|
||||
|
||||
class SATCatalogsSeeder extends Seeder
|
||||
{
|
||||
protected $console;
|
||||
|
||||
public function __construct($console = null)
|
||||
{
|
||||
$this->console = $console;
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$this->importCatCFDIV4(base_path("modules/Admin/Database/data/catCFDI_V_4_20241121.xls"));
|
||||
$this->importCatBancos(base_path('modules/Admin/Database/data/catalog-sat_bancos.json'));
|
||||
}
|
||||
|
||||
private function importCatCFDIV4($file_path)
|
||||
{
|
||||
$import = new SatCatalogsImport($this->console);
|
||||
|
||||
$sheets = [
|
||||
'c_FormaPago',
|
||||
'c_Moneda',
|
||||
'c_CodigoPostal_Parte_1',
|
||||
'c_CodigoPostal_Parte_2',
|
||||
'c_RegimenFiscal',
|
||||
'c_Pais',
|
||||
'c_UsoCFDI',
|
||||
'C_Colonia_1',
|
||||
'C_Colonia_2',
|
||||
'C_Colonia_3',
|
||||
'c_Estado',
|
||||
'C_Localidad',
|
||||
'C_Municipio',
|
||||
];
|
||||
|
||||
$this->command->getOutput()->progressStart(count($sheets));
|
||||
|
||||
foreach ($sheets as $sheet) {
|
||||
$import = new SatCatalogsImport();
|
||||
$import->onlySheets($sheet);
|
||||
|
||||
Excel::import($import, $file_path);
|
||||
|
||||
$this->command->getOutput()->progressAdvance();
|
||||
}
|
||||
|
||||
$this->command->getOutput()->progressFinish();
|
||||
}
|
||||
|
||||
private function importCatBancos($file_path)
|
||||
{
|
||||
$json = File::get($file_path);
|
||||
|
||||
// Convierte el contenido JSON a un array asociativo
|
||||
$bancos = json_decode($json, true);
|
||||
|
||||
// Inserta cada banco en la base de datos
|
||||
foreach ($bancos as $banco) {
|
||||
Banco::create([
|
||||
'c_banco' => $banco['c_banco'],
|
||||
'descripcion' => $banco['descripcion'],
|
||||
'razon_social' => $banco['razon_social'],
|
||||
'rfc' => null,
|
||||
'status' => Banco::STATUS_ENABLED,
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
108
modules/Admin/Database/seeders/SettingSeeder.php
Normal file
108
modules/Admin/Database/seeders/SettingSeeder.php
Normal file
@ -0,0 +1,108 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\Database\seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\Crypt;
|
||||
use Modules\Admin\App\Models\Setting;
|
||||
|
||||
class SettingSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$settings_array = [
|
||||
/*
|
||||
'app_title' => 'Quimiplastic S.A de C.V.',
|
||||
'app_faviconIcon' => '../assets/img/logo/koneko-02.png',
|
||||
'app_name' => 'Quimiplastic',
|
||||
'app_imageLogo' => '../assets/img/logo/koneko-02.png',
|
||||
|
||||
'app_myLayout' => 'vertical',
|
||||
'app_myTheme' => 'theme-default',
|
||||
'app_myStyle' => 'light',
|
||||
'app_navbarType' => 'sticky',
|
||||
'app_menuFixed' => true,
|
||||
'app_menuCollapsed' => false,
|
||||
'app_headerType' => 'static',
|
||||
'app_showDropdownOnHover' => false,
|
||||
'app_authViewMode' => 'cover',
|
||||
'app_maxQuickLinks' => 5,
|
||||
|
||||
|
||||
|
||||
'smtp.host' => 'webmail.koneko.mx',
|
||||
'smtp.port' => 465,
|
||||
'smtp.encryption' => 'tls',
|
||||
'smtp.username' => 'no-responder@koneko.mx',
|
||||
'smtp.password' => null,
|
||||
'smtp.from_email' => 'no-responder@koneko.mx',
|
||||
'smtp.from_name' => 'Koneko Soluciones en Tecnología',
|
||||
'smtp.reply_to_method' => 'smtp',
|
||||
'smtp.reply_to_email' => null,
|
||||
'smtp.reply_to_name' => null,
|
||||
|
||||
|
||||
|
||||
'website.title',
|
||||
'website.favicon',
|
||||
'website.description',
|
||||
'website.image_logo',
|
||||
'website.image_logoDark',
|
||||
|
||||
'admin.title',
|
||||
'admin.favicon',
|
||||
'admin.description',
|
||||
'admin.image_logo',
|
||||
'admin.image_logoDark',
|
||||
|
||||
|
||||
'favicon.icon' => null,
|
||||
|
||||
'contact.phone_number' => '(222) 462 0903',
|
||||
'contact.phone_number_ext' => 'Ext. 5',
|
||||
'contact.email' => 'virtualcompras@live.com.mx',
|
||||
'contact.form.email' => 'contacto@conciergetravellife.com',
|
||||
'contact.form.email_cc' => 'arturo@koneko.mx',
|
||||
'contact.form.subject' => 'Has recibido un mensaje del formulario de covirsast.com',
|
||||
'contact.direccion' => '51 PTE 505 loc. 14, Puebla, Pue.',
|
||||
'contact.horario' => '9am - 7 pm',
|
||||
'contact.location.lat' => '19.024439',
|
||||
'contact.location.lng' => '-98.215777',
|
||||
|
||||
'social.whatsapp' => '',
|
||||
'social.whatsapp.message' => '👋 Hola! Estoy buscando más información sobre Covirsa Soluciones en Tecnología. ¿Podrías proporcionarme los detalles que necesito? ¡Te lo agradecería mucho! 💻✨',
|
||||
|
||||
'social.facebook' => 'https://www.facebook.com/covirsast/?locale=es_LA',
|
||||
'social.Whatsapp' => '2228 200 201',
|
||||
'social.Whatsapp.message' => '¡Hola! 🌟 Estoy interesado en obtener más información acerca de Concierge Travel. ¿Podrías ayudarme con los detalles? ¡Gracias de antemano! ✈️🏝',
|
||||
'social.Facebook' => 'test',
|
||||
'social.Instagram' => 'test',
|
||||
'social.Linkedin' => 'test',
|
||||
'social.Tiktok' => 'test',
|
||||
'social.X_twitter' => 'test',
|
||||
'social.Google' => 'test',
|
||||
'social.Pinterest' => 'test',
|
||||
'social.Youtube' => 'test',
|
||||
'social.Vimeo' => 'test',
|
||||
|
||||
|
||||
'chat.provider' => '',
|
||||
'chat.whatsapp.number' => '',
|
||||
'chat.whatsapp.message' => '👋 Hola! Estoy buscando más información sobre Covirsa Soluciones en Tecnología. ¿Podrías proporcionarme los detalles que necesito? ¡Te lo agradecería mucho! 💻✨',
|
||||
|
||||
'webTpl.container' => 'custom-container',
|
||||
*/];
|
||||
|
||||
foreach ($settings_array as $key => $value) {
|
||||
Setting::create([
|
||||
'key' => $key,
|
||||
'value' => $value,
|
||||
]);
|
||||
};
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user