Private
Public Access
feat: funcionalidad de logs, paginacion y ui para filtros
This commit is contained in:
1 parent
3af069e9e8
commit
461c381f12
9 files changed
+259
-79
No files matched your search
@@ -0,0 +1,36 @@
|
||||
package dto_builders
|
||||
|
||||
import (
|
||||
dto "repuestera_back/dto/Logs"
|
||||
"repuestera_back/models/logs"
|
||||
)
|
||||
|
||||
type LogTablaBuilder struct {
|
||||
logs []logs.Log
|
||||
}
|
||||
|
||||
func NewLogTablaBuilder() *LogTablaBuilder {
|
||||
return &LogTablaBuilder{}
|
||||
}
|
||||
|
||||
func (b *LogTablaBuilder) ConLogs(logs []logs.Log) *LogTablaBuilder {
|
||||
b.logs =logs;
|
||||
return b
|
||||
}
|
||||
|
||||
|
||||
func (b *LogTablaBuilder) Build() []dto.LogTablaDto {
|
||||
var dtos []dto.LogTablaDto
|
||||
|
||||
for i := 0; i < len(b.logs); i++ {
|
||||
var d = &dto.LogTablaDto{
|
||||
ID: b.logs[i].ID,
|
||||
UsuarioID: b.logs[i].UsuarioID,
|
||||
Accion: b.logs[i].Accion,
|
||||
Detalles: b.logs[i].Detalles,
|
||||
CreatedAt: b.logs[i].CreatedAt,
|
||||
}
|
||||
dtos = append(dtos, *d)
|
||||
}
|
||||
return dtos
|
||||
}
|
||||
Reference in new issue
Block a user