Private
Public Access
estado del documento en la tercer entrega al profesor
This commit is contained in:
1 parent
fec57d4886
commit
24e746b1b7
8 files changed
+1741
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 740 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.0 MiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" data-diagram-type="CLASS" style="width:15076px;height:2584px;background:#FFFFFF;" width="15076px" height="2584px" viewBox="0 0 15076 2584" zoomAndPan="magnify" preserveAspectRatio="none" contentStyleType="text/css"><?plantuml 1.2026.9beta4?><defs/><g font-family="sans-serif" lengthAdjust="spacing"><g class="title" data-source-line="1"><text x="7357.078" y="22.995" fill="#000" font-size="14" textLength="355.482" font-weight="700" font-family="Arial">Diagrama de Clases — Backend (Repuestera)</text></g><!--cluster main--><g class="cluster" data-qualified-name="main" id="ent0001" data-source-line="12"><rect x="7267.89" y="44.297" width="108" height="123.56" fill="none" style="stroke:#000;stroke-width:1.5;" rx="2.5" ry="2.5"/><text x="7302.49" y="59.292" fill="#000" font-size="14" textLength="38.801" font-weight="700" font-family="Arial">main</text></g><!--cluster routes--><g class="cluster" data-qualified-name="routes" id="ent0003" data-source-line="19"><rect x="6137.89" y="220.327" width="2342" height="123.56" fill="none" style="stroke:#000;stroke-width:1.5;" rx="2.5" ry="2.5"/><text x="7283.385" y="235.322" fill="#000" font-size="14" textLength="51.01" font-weight="700" font-family="Arial">routes</text></g><!--cluster controllers--><g class="cluster" data-qualified-name="controllers" id="ent0013" data-source-line="58"><rect x="5645.89" y="381.347" width="2928" height="319.12" fill="none" style="stroke:#000;stroke-width:1.5;" rx="2.5" ry="2.5"/><text x="7067.176" y="396.342" fill="#000" font-size="14" textLength="85.429" font-weight="700" font-family="Arial">controllers</text></g><!--cluster dto--><g class="cluster" data-qualified-name="dto" id="ent0026" data-source-line="157"><rect x="3787.89" y="839.847" width="1966" height="950.58" fill="none" style="stroke:#000;stroke-width:1.5;" rx="2.5" ry="2.5"/><text x="4757.724" y="854.842" fill="#000" font-size="14" textLength="26.332" font-weight="700" font-family="Arial">dto</text></g><!--cluster dto/Logs--><g class="cluster" data-qualified-name="dto.Logs" id="ent0039" data-source-line="263"><rect x="8139.89" y="1626.237" width="430" height="180.48" fill="none" style="stroke:#000;stroke-width:1.5;" rx="2.5" ry="2.5"/><text x="8320.721" y="1641.232" fill="#000" font-size="14" textLength="68.339" font-weight="700" font-family="Arial">dto/Logs</text></g><!--cluster dto/Repuestos--><g class="cluster" data-qualified-name="dto.Repuestos" id="ent0042" data-source-line="280"><rect x="7623.89" y="1609.937" width="426" height="213.08" fill="none" style="stroke:#000;stroke-width:1.5;" rx="2.5" ry="2.5"/><text x="7779.8" y="1624.932" fill="#000" font-size="14" textLength="114.181" font-weight="700" font-family="Arial">dto/Repuestos</text></g><!--cluster dto/Builders--><g class="cluster" data-qualified-name="dto.Builders" id="ent0045" data-source-line="302"><rect x="8593.89" y="1314.527" width="2054" height="738.72" fill="none" style="stroke:#000;stroke-width:1.5;" rx="2.5" ry="2.5"/><text x="9572.673" y="1329.522" fill="#000" font-size="14" textLength="96.435" font-weight="700" font-family="Arial">dto/Builders</text></g><!--cluster models--><g class="cluster" data-qualified-name="models" id="ent0053" data-source-line="360"><rect x="1173.89" y="401.777" width="1782" height="2164.94" fill="none" style="stroke:#000;stroke-width:1.5;" rx="2.5" ry="2.5"/><text x="2036.463" y="416.772" fill="#000" font-size="14" textLength="56.854" font-weight="700" font-family="Arial">models</text></g><!--cluster models/seguridad--><g class="cluster" data-qualified-name="models.seguridad" id="ent0079" data-source-line="568"><rect x="5953.89" y="1257.487" width="924" height="1313.25" fill="none" style="stroke:#000;stroke-width:1.5;" rx="2.5" ry="2.5"/><text x="6345.401" y="1272.482" fill="#000" font-size="14" textLength="140.978" font-weight="700" font-family="Arial">models/seguridad</text></g><!--cluster models/contabilidad--><g class="cluster" data-qualified-name="models.contabilidad" id="ent0090" data-source-line="677"><rect x="311.89" y="191.857" width="310" height="877.36" fill="none" style="stroke:#000;stroke-width:1.5;" rx="2.5" ry="2.5"/><text x="386.94" y="206.852" fill="#000" font-size="14" textLength="159.899" font-weight="700" font-family="Arial">models/contabilidad</text></g><!--cluster models/logs--><g class="cluster" data-qualified-name="models.logs" id="ent0094" data-source-line="708"><rect x="10982.89" y="1889.057" width="208" height="475.9" fill="none" style="stroke:#000;stroke-width:1.5;" rx="2.5" ry="2.5"/><text x="11039.52" y="1904.052" fill="#000" font-size="14" textLength="94.739" font-weight="700" font-family="Arial">models/logs</text></g><!--cluster repositorios--><g class="cluster" data-qualified-name="repositorios" id="ent0097" data-source-line="729"><rect x="10729.89" y="434.367" width="4048" height="1093.24" fill="none" style="stroke:#000;stroke-width:1.5;" rx="2.5" ry="2.Line truncated
|
||||
|
After Width: | Height: | Size: 345 KiB |
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,145 @@
|
||||
# Diagrama de Paquetes — Backend (Repuestera)
|
||||
|
||||
Diagrama de paquetes UML del backend Go (`/back`), con las dependencias internas entre paquetes.
|
||||
|
||||
```plantuml
|
||||
@startuml DiagramaPaquetesBackend
|
||||
title Diagrama de Paquetes — Backend (Repuestera)
|
||||
|
||||
top to bottom direction
|
||||
skinparam shadowing false
|
||||
skinparam defaultFontName Arial
|
||||
skinparam linetype ortho
|
||||
skinparam packageStyle rectangle
|
||||
skinparam nodesep 60
|
||||
skinparam ranksep 80
|
||||
|
||||
package "main" as MAIN #LightGray
|
||||
|
||||
package "config" as CONFIG #LightBlue
|
||||
|
||||
package "models" as MODELS #LightGreen
|
||||
package "models/seguridad" as MSEG #LightGreen
|
||||
package "models/logs" as MLOG #LightGreen
|
||||
package "models/contabilidad" as MCONT #LightGreen
|
||||
|
||||
package "dto" as DTO #LightYellow
|
||||
package "dto/Builders" as DBLD #LightYellow
|
||||
package "dto/Logs" as DLOG #LightYellow
|
||||
package "dto/Repuestos" as DREP #LightYellow
|
||||
|
||||
package "repositorios" as REPOS #Orange
|
||||
|
||||
package "controllers/auth" as CAUTH #Pink
|
||||
package "controllers/permisos" as CPERM #Pink
|
||||
package "controllers/usuarios" as CUSR #Pink
|
||||
package "controllers/repuestos" as CREP #Pink
|
||||
package "controllers/grupos" as CGRP #Pink
|
||||
package "controllers/logs" as CLOG #Pink
|
||||
package "controllers/marcas" as CMAR #Pink
|
||||
package "controllers/empresa" as CEMP #Pink
|
||||
package "controllers/plataforma" as CPLAT #Pink
|
||||
|
||||
package "routes" as ROUTES #Plum
|
||||
package "middleware" as MW #Plum
|
||||
|
||||
package "services" as SERV #Cyan
|
||||
|
||||
package "utils" as UTILS #Gainsboro
|
||||
package "jwtutils" as JWT #Gainsboro
|
||||
|
||||
MAIN --> CONFIG
|
||||
MAIN --> MODELS
|
||||
MAIN --> MCONT
|
||||
MAIN --> MLOG
|
||||
MAIN --> MSEG
|
||||
MAIN --> REPOS
|
||||
MAIN --> ROUTES
|
||||
|
||||
CONFIG --> MSEG
|
||||
|
||||
MODELS --> MSEG
|
||||
MLOG --> MSEG
|
||||
|
||||
DLOG --> MLOG
|
||||
DBLD --> DTO
|
||||
DBLD --> DLOG
|
||||
DBLD --> DREP
|
||||
DBLD --> MODELS
|
||||
DBLD --> MLOG
|
||||
DBLD --> MSEG
|
||||
|
||||
REPOS --> CONFIG
|
||||
REPOS --> DBLD
|
||||
REPOS --> DLOG
|
||||
REPOS --> MODELS
|
||||
REPOS --> MLOG
|
||||
REPOS --> MSEG
|
||||
REPOS --> UTILS
|
||||
|
||||
CAUTH --> DTO
|
||||
CAUTH --> JWT
|
||||
CAUTH --> MSEG
|
||||
CAUTH --> REPOS
|
||||
CAUTH --> SERV
|
||||
CAUTH --> UTILS
|
||||
|
||||
CPERM --> DTO
|
||||
CPERM --> MSEG
|
||||
CPERM --> REPOS
|
||||
|
||||
CUSR --> MSEG
|
||||
CUSR --> REPOS
|
||||
|
||||
CREP --> DBLD
|
||||
CREP --> DREP
|
||||
CREP --> REPOS
|
||||
|
||||
CGRP --> DTO
|
||||
CGRP --> DBLD
|
||||
CGRP --> MSEG
|
||||
CGRP --> REPOS
|
||||
|
||||
CLOG --> DBLD
|
||||
CLOG --> DLOG
|
||||
CLOG --> MLOG
|
||||
CLOG --> REPOS
|
||||
|
||||
CMAR --> MODELS
|
||||
CMAR --> REPOS
|
||||
|
||||
CEMP --> DTO
|
||||
CEMP --> MSEG
|
||||
CEMP --> REPOS
|
||||
CEMP --> SERV
|
||||
CEMP --> UTILS
|
||||
|
||||
CPLAT --> MSEG
|
||||
CPLAT --> REPOS
|
||||
CPLAT --> SERV
|
||||
|
||||
ROUTES --> CAUTH
|
||||
ROUTES --> CPERM
|
||||
ROUTES --> CUSR
|
||||
ROUTES --> CREP
|
||||
ROUTES --> CGRP
|
||||
ROUTES --> CLOG
|
||||
ROUTES --> CMAR
|
||||
ROUTES --> CEMP
|
||||
ROUTES --> CPLAT
|
||||
ROUTES --> MW
|
||||
|
||||
MW --> CONFIG
|
||||
MW --> JWT
|
||||
MW --> MSEG
|
||||
MW --> UTILS
|
||||
|
||||
SERV --> DTO
|
||||
SERV --> JWT
|
||||
SERV --> MSEG
|
||||
SERV --> REPOS
|
||||
SERV --> UTILS
|
||||
|
||||
UTILS --> MSEG
|
||||
@enduml
|
||||
```
|
||||
@@ -0,0 +1,422 @@
|
||||
@startuml
|
||||
!theme plain
|
||||
top to bottom direction
|
||||
skinparam linetype ortho
|
||||
skinparam packageStyle rectangle
|
||||
|
||||
title Diagrama Entidad-Relación (DER) - Base de Datos MySQL
|
||||
|
||||
package "Módulo Usuarios, Empresas y Accesos" {
|
||||
entity "empresas" as empresas {
|
||||
* id : bigint unsigned <<PK>>
|
||||
--
|
||||
nombre : varchar(120)
|
||||
slug : varchar(60) <<UQ>>
|
||||
cuit : varchar(11) <<UQ>>
|
||||
activa : tinyint(1)
|
||||
created_at : datetime(3)
|
||||
updated_at : datetime(3)
|
||||
deleted_at : datetime(3)
|
||||
}
|
||||
|
||||
entity "usuarios" as usuarios {
|
||||
* id : bigint unsigned <<PK>>
|
||||
--
|
||||
email : varchar(100) <<UQ>>
|
||||
password : longtext
|
||||
name : longtext
|
||||
activo : tinyint(1)
|
||||
debe_cambiar_password : tinyint(1)
|
||||
created_at : datetime(3)
|
||||
updated_at : datetime(3)
|
||||
deleted_at : datetime(3)
|
||||
}
|
||||
|
||||
entity "empresa_usuarios" as empresa_usuarios {
|
||||
* usuario_id : bigint unsigned <<PK, FK>>
|
||||
* empresa_id : bigint unsigned <<PK, FK>>
|
||||
--
|
||||
rol : varchar(20)
|
||||
activo : tinyint(1)
|
||||
created_at : datetime(3)
|
||||
updated_at : datetime(3)
|
||||
}
|
||||
|
||||
entity "plataforma_admins" as plataforma_admins {
|
||||
* usuario_id : bigint unsigned <<PK, FK>>
|
||||
--
|
||||
rol : varchar(20)
|
||||
activo : tinyint(1)
|
||||
created_at : datetime(3)
|
||||
updated_at : datetime(3)
|
||||
}
|
||||
|
||||
entity "invitaciones_empresa" as invitaciones_empresa {
|
||||
* id : bigint unsigned <<PK>>
|
||||
--
|
||||
empresa_id : bigint unsigned <<FK>>
|
||||
email : varchar(100)
|
||||
rol : varchar(20)
|
||||
token_hash : varchar(64) <<UQ>>
|
||||
expira_en : datetime(3)
|
||||
usada_en : datetime(3)
|
||||
creada_por : bigint unsigned
|
||||
grupo_id : bigint unsigned
|
||||
created_at : datetime(3)
|
||||
}
|
||||
}
|
||||
|
||||
package "Módulo Roles, Grupos y Permisos" {
|
||||
entity "groupos" as groupos {
|
||||
* id : bigint unsigned <<PK>>
|
||||
--
|
||||
nombre : varchar(100)
|
||||
descripcion : text
|
||||
imagen : varchar(500)
|
||||
empresa_id : bigint unsigned
|
||||
created_at : datetime(3)
|
||||
updated_at : datetime(3)
|
||||
deleted_at : datetime(3)
|
||||
}
|
||||
|
||||
entity "permisos" as permisos {
|
||||
* id : bigint unsigned <<PK>>
|
||||
--
|
||||
nombre : varchar(100) <<UQ>>
|
||||
alias : varchar(100) <<UQ>>
|
||||
descripcion : text
|
||||
imagen : varchar(500)
|
||||
created_at : datetime(3)
|
||||
updated_at : datetime(3)
|
||||
deleted_at : datetime(3)
|
||||
}
|
||||
|
||||
entity "grupo_permisos" as grupo_permisos {
|
||||
* grupo_id : bigint unsigned <<PK, FK>>
|
||||
* permiso_id : bigint unsigned <<PK, FK>>
|
||||
}
|
||||
|
||||
entity "grupo_grupos" as grupo_grupos {
|
||||
* parent_group_id : bigint unsigned <<PK, FK>>
|
||||
* child_group_id : bigint unsigned <<PK, FK>>
|
||||
}
|
||||
|
||||
entity "usuarios_grupos" as usuarios_grupos {
|
||||
* usuario_id : bigint unsigned <<PK, FK>>
|
||||
* grupo_id : bigint unsigned <<PK, FK>>
|
||||
}
|
||||
}
|
||||
|
||||
package "Módulo Inventario y Almacenes" {
|
||||
entity "marca" as marca {
|
||||
* id : bigint unsigned <<PK>>
|
||||
--
|
||||
nombre : varchar(70)
|
||||
empresa_id : bigint unsigned
|
||||
created_at : datetime(3)
|
||||
updated_at : datetime(3)
|
||||
deleted_at : datetime(3)
|
||||
}
|
||||
|
||||
entity "repuesto" as repuesto {
|
||||
* id : bigint unsigned <<PK>>
|
||||
--
|
||||
nombre : varchar(50)
|
||||
precio : decimal(10,2)
|
||||
stock_minimo : bigint
|
||||
descripcion : varchar(70)
|
||||
marcaID : bigint unsigned <<FK>>
|
||||
aliases : json
|
||||
empresa_id : bigint unsigned
|
||||
created_at : datetime(3)
|
||||
updated_at : datetime(3)
|
||||
deleted_at : datetime(3)
|
||||
}
|
||||
|
||||
entity "almacen" as almacen {
|
||||
* id : bigint unsigned <<PK>>
|
||||
--
|
||||
empresa_id : bigint unsigned
|
||||
codigo : varchar(5)
|
||||
ubicacion : varchar(40)
|
||||
}
|
||||
|
||||
entity "stock" as stock {
|
||||
* id : bigint unsigned <<PK>>
|
||||
--
|
||||
repuesto_id : bigint unsigned <<FK>>
|
||||
almacen_id : bigint unsigned <<FK>>
|
||||
cantidad : bigint unsigned
|
||||
cantidad_reservada : bigint unsigned
|
||||
observacion : varchar(60)
|
||||
movmientos : json
|
||||
empresa_id : bigint unsigned
|
||||
}
|
||||
|
||||
entity "reservas" as reservas {
|
||||
* id : bigint unsigned <<PK>>
|
||||
--
|
||||
repuesto_id : bigint unsigned <<FK>>
|
||||
almacen_id : bigint unsigned <<FK>>
|
||||
cliente_id : bigint unsigned <<FK>>
|
||||
cantidad : double
|
||||
estado : varchar(20)
|
||||
fecha_vencimiento : datetime(3)
|
||||
empresa_id : bigint unsigned
|
||||
created_at : datetime(3)
|
||||
updated_at : datetime(3)
|
||||
deleted_at : datetime(3)
|
||||
}
|
||||
}
|
||||
|
||||
package "Módulo Ventas, Compras y Comprobantes" {
|
||||
entity "clientes" as clientes {
|
||||
* id : bigint unsigned <<PK>>
|
||||
--
|
||||
nombre : varchar(40)
|
||||
cuit : varchar(11)
|
||||
email : varchar(80)
|
||||
empresa_id : bigint unsigned
|
||||
created_at : datetime(3)
|
||||
updated_at : datetime(3)
|
||||
deleted_at : datetime(3)
|
||||
}
|
||||
|
||||
entity "proveedors" as proveedors {
|
||||
* id : bigint unsigned <<PK>>
|
||||
--
|
||||
nombre : varchar(40)
|
||||
empresa_id : bigint unsigned
|
||||
created_at : datetime(3)
|
||||
updated_at : datetime(3)
|
||||
deleted_at : datetime(3)
|
||||
}
|
||||
|
||||
entity "orden_compra" as orden_compra {
|
||||
* id : bigint unsigned <<PK>>
|
||||
--
|
||||
proveedorID : bigint unsigned <<FK>>
|
||||
usuarioID : bigint unsigned <<FK>>
|
||||
estado : varchar(20)
|
||||
total : decimal(15,2)
|
||||
detalles : json
|
||||
empresa_id : bigint unsigned
|
||||
created_at : datetime(3)
|
||||
updated_at : datetime(3)
|
||||
deleted_at : datetime(3)
|
||||
}
|
||||
|
||||
entity "factura" as factura {
|
||||
* id : bigint unsigned <<PK>>
|
||||
--
|
||||
ClienteID : bigint unsigned <<FK>>
|
||||
usuarioID : bigint unsigned <<FK>>
|
||||
proveedor_id : bigint unsigned <<FK>>
|
||||
estado : varchar(20)
|
||||
total : decimal(15,2)
|
||||
se_aviso : tinyint(1)
|
||||
detalles : json
|
||||
empresa_id : bigint unsigned
|
||||
created_at : datetime(3)
|
||||
updated_at : datetime(3)
|
||||
deleted_at : datetime(3)
|
||||
}
|
||||
|
||||
entity "devolucion" as devolucion {
|
||||
* id : bigint unsigned <<PK>>
|
||||
--
|
||||
facturaOrigenID : bigint unsigned <<FK>>
|
||||
usuarioID : bigint unsigned <<FK>>
|
||||
estado : varchar(20)
|
||||
total : decimal(15,2)
|
||||
motivo : varchar(200)
|
||||
empresa_id : bigint unsigned
|
||||
created_at : datetime(3)
|
||||
updated_at : datetime(3)
|
||||
deleted_at : datetime(3)
|
||||
}
|
||||
|
||||
entity "nota_credito" as nota_credito {
|
||||
* id : bigint unsigned <<PK>>
|
||||
--
|
||||
facturaID : bigint unsigned <<FK>>
|
||||
usuarioID : bigint unsigned <<FK>>
|
||||
estado : varchar(20)
|
||||
total : decimal(15,2)
|
||||
motivo : varchar(40)
|
||||
empresa_id : bigint unsigned
|
||||
created_at : datetime(3)
|
||||
updated_at : datetime(3)
|
||||
deleted_at : datetime(3)
|
||||
}
|
||||
|
||||
entity "nota_debito" as nota_debito {
|
||||
* id : bigint unsigned <<PK>>
|
||||
--
|
||||
facturaID : bigint unsigned <<FK>>
|
||||
usuarioID : bigint unsigned <<FK>>
|
||||
estado : varchar(20)
|
||||
total : decimal(15,2)
|
||||
motivo : varchar(40)
|
||||
empresa_id : bigint unsigned
|
||||
created_at : datetime(3)
|
||||
updated_at : datetime(3)
|
||||
deleted_at : datetime(3)
|
||||
}
|
||||
|
||||
entity "recibo" as recibo {
|
||||
* id : bigint unsigned <<PK>>
|
||||
--
|
||||
cliente_id : bigint unsigned <<FK>>
|
||||
usuarioID : bigint unsigned <<FK>>
|
||||
estado : varchar(20)
|
||||
total : decimal(15,2)
|
||||
empresa_id : bigint unsigned
|
||||
created_at : datetime(3)
|
||||
updated_at : datetime(3)
|
||||
deleted_at : datetime(3)
|
||||
}
|
||||
|
||||
entity "forma_de_pago" as forma_de_pago {
|
||||
* id : bigint unsigned <<PK>>
|
||||
--
|
||||
descripcion : varchar(20)
|
||||
empresa_id : bigint unsigned
|
||||
created_at : datetime(3)
|
||||
updated_at : datetime(3)
|
||||
deleted_at : datetime(3)
|
||||
}
|
||||
|
||||
entity "pago" as pago {
|
||||
* id : bigint unsigned <<PK>>
|
||||
--
|
||||
formaDePagoID : bigint unsigned <<FK>>
|
||||
recibo_id : bigint unsigned <<FK>>
|
||||
importe : decimal(10,2)
|
||||
empresa_id : bigint unsigned
|
||||
created_at : datetime(3)
|
||||
updated_at : datetime(3)
|
||||
deleted_at : datetime(3)
|
||||
}
|
||||
|
||||
entity "remitos" as remitos {
|
||||
* id : bigint unsigned <<PK>>
|
||||
--
|
||||
almacen_origen_id : bigint unsigned <<FK>>
|
||||
usuarioID : bigint unsigned <<FK>>
|
||||
estado : varchar(20)
|
||||
total : decimal(15,2)
|
||||
fecha_emision : datetime(3)
|
||||
tipo_operacion : varchar(20)
|
||||
emisor_id : bigint unsigned
|
||||
receptor_id : bigint unsigned
|
||||
detalles : json
|
||||
empresa_id : bigint unsigned
|
||||
created_at : datetime(3)
|
||||
updated_at : datetime(3)
|
||||
deleted_at : datetime(3)
|
||||
}
|
||||
}
|
||||
|
||||
package "Módulo Contabilidad y Auditoría" {
|
||||
entity "asiento_contables" as asiento_contables {
|
||||
* id : bigint unsigned <<PK>>
|
||||
--
|
||||
comprobante_tipo : varchar(20)
|
||||
comprobante_id : bigint unsigned
|
||||
empresa_id : bigint unsigned
|
||||
created_at : datetime(3)
|
||||
updated_at : datetime(3)
|
||||
deleted_at : datetime(3)
|
||||
}
|
||||
|
||||
entity "cuenta_contables" as cuenta_contables {
|
||||
* id : bigint unsigned <<PK>>
|
||||
--
|
||||
nombre : varchar(30)
|
||||
tipo : varchar(12)
|
||||
empresa_id : bigint unsigned
|
||||
created_at : datetime(3)
|
||||
updated_at : datetime(3)
|
||||
deleted_at : datetime(3)
|
||||
}
|
||||
|
||||
entity "movimiento_contables" as movimiento_contables {
|
||||
* id : bigint unsigned <<PK>>
|
||||
--
|
||||
asientoID : bigint unsigned <<FK>>
|
||||
cuentaID : bigint unsigned <<FK>>
|
||||
debe : decimal(10,2)
|
||||
haber : decimal(10,2)
|
||||
descripcion : varchar(50)
|
||||
empresa_id : bigint unsigned
|
||||
created_at : datetime(3)
|
||||
updated_at : datetime(3)
|
||||
deleted_at : datetime(3)
|
||||
}
|
||||
|
||||
entity "logs" as logs {
|
||||
* id : bigint unsigned <<PK>>
|
||||
--
|
||||
usuario_id : bigint unsigned <<FK>>
|
||||
accion : varchar(50)
|
||||
detalles : json
|
||||
empresa_id : bigint unsigned
|
||||
created_at : datetime(3)
|
||||
}
|
||||
}
|
||||
|
||||
' Relaciones - Módulo Usuarios / Empresas
|
||||
empresas ||--o{ empresa_usuarios : "posee"
|
||||
usuarios ||--o{ empresa_usuarios : "pertenece"
|
||||
usuarios ||--o| plataforma_admins : "es"
|
||||
empresas ||--o{ invitaciones_empresa : "emite"
|
||||
|
||||
' Relaciones - Módulo Permisos / Grupos
|
||||
groupos ||--o{ grupo_permisos : "contiene"
|
||||
permisos ||--o{ grupo_permisos : "asignado"
|
||||
groupos ||--o{ grupo_grupos : "padre_de"
|
||||
groupos ||--o{ grupo_grupos : "hijo_de"
|
||||
usuarios ||--o{ usuarios_grupos : "pertenece"
|
||||
groupos ||--o{ usuarios_grupos : "asigna"
|
||||
|
||||
' Relaciones - Módulo Inventario / Almacenes
|
||||
marca ||--o{ repuesto : "clasifica"
|
||||
repuesto ||--o{ stock : "registra"
|
||||
almacen ||--o{ stock : "almacena"
|
||||
repuesto ||--o{ reservas : "reservado_en"
|
||||
almacen ||--o{ reservas : "ubicado_en"
|
||||
clientes ||--o{ reservas : "solicita"
|
||||
|
||||
' Relaciones - Módulo Comercial / Ventas
|
||||
proveedors ||--o{ orden_compra : "destinado_a"
|
||||
usuarios ||--o{ orden_compra : "gestiona"
|
||||
|
||||
clientes ||--o{ factura : "facturado_a"
|
||||
proveedors ||--o{ factura : "facturado_por"
|
||||
usuarios ||--o{ factura : "registra"
|
||||
|
||||
factura ||--o{ devolucion : "origen_de"
|
||||
usuarios ||--o{ devolucion : "responde"
|
||||
|
||||
factura ||--o{ nota_credito : "aplica_a"
|
||||
usuarios ||--o{ nota_credito : "registra"
|
||||
|
||||
factura ||--o{ nota_debito : "aplica_a"
|
||||
usuarios ||--o{ nota_debito : "registra"
|
||||
|
||||
clientes ||--o{ recibo : "emitido_a"
|
||||
usuarios ||--o{ recibo : "genera"
|
||||
|
||||
recibo ||--o{ pago : "recibe"
|
||||
forma_de_pago ||--o{ pago : "utilizada_en"
|
||||
|
||||
almacen ||--o{ remitos : "sale_de"
|
||||
usuarios ||--o{ remitos : "emite"
|
||||
|
||||
' Relaciones - Módulo Contable y Auditoría
|
||||
asiento_contables ||--o{ movimiento_contables : "agrupa"
|
||||
cuenta_contables ||--o{ movimiento_contables : "imputa"
|
||||
usuarios ||--o{ logs : "ejecuta"
|
||||
|
||||
@enduml
|
||||
Binary file not shown.
Binary file not shown.
Reference in new issue
Block a user