modelos y provider creados
This commit is contained in:
29
lib/models/nethive/categoria_componente_model.dart
Normal file
29
lib/models/nethive/categoria_componente_model.dart
Normal file
@@ -0,0 +1,29 @@
|
||||
import 'dart:convert';
|
||||
|
||||
class CategoriaComponente {
|
||||
final int id;
|
||||
final String nombre;
|
||||
|
||||
CategoriaComponente({
|
||||
required this.id,
|
||||
required this.nombre,
|
||||
});
|
||||
|
||||
factory CategoriaComponente.fromMap(Map<String, dynamic> map) {
|
||||
return CategoriaComponente(
|
||||
id: map['id'],
|
||||
nombre: map['nombre'],
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toMap() {
|
||||
return {
|
||||
'id': id,
|
||||
'nombre': nombre,
|
||||
};
|
||||
}
|
||||
|
||||
factory CategoriaComponente.fromJson(String source) =>
|
||||
CategoriaComponente.fromMap(json.decode(source));
|
||||
String toJson() => json.encode(toMap());
|
||||
}
|
||||
61
lib/models/nethive/componente_model.dart
Normal file
61
lib/models/nethive/componente_model.dart
Normal file
@@ -0,0 +1,61 @@
|
||||
import 'dart:convert';
|
||||
|
||||
class Componente {
|
||||
final String id;
|
||||
final String negocioId;
|
||||
final int categoriaId;
|
||||
final String nombre;
|
||||
final String? descripcion;
|
||||
final bool enUso;
|
||||
final bool activo;
|
||||
final String? ubicacion;
|
||||
final String? imagenUrl;
|
||||
final DateTime fechaRegistro;
|
||||
|
||||
Componente({
|
||||
required this.id,
|
||||
required this.negocioId,
|
||||
required this.categoriaId,
|
||||
required this.nombre,
|
||||
this.descripcion,
|
||||
required this.enUso,
|
||||
required this.activo,
|
||||
this.ubicacion,
|
||||
this.imagenUrl,
|
||||
required this.fechaRegistro,
|
||||
});
|
||||
|
||||
factory Componente.fromMap(Map<String, dynamic> map) {
|
||||
return Componente(
|
||||
id: map['id'],
|
||||
negocioId: map['negocio_id'],
|
||||
categoriaId: map['categoria_id'],
|
||||
nombre: map['nombre'],
|
||||
descripcion: map['descripcion'],
|
||||
enUso: map['en_uso'],
|
||||
activo: map['activo'],
|
||||
ubicacion: map['ubicacion'],
|
||||
imagenUrl: map['imagen_url'],
|
||||
fechaRegistro: DateTime.parse(map['fecha_registro']),
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toMap() {
|
||||
return {
|
||||
'id': id,
|
||||
'negocio_id': negocioId,
|
||||
'categoria_id': categoriaId,
|
||||
'nombre': nombre,
|
||||
'descripcion': descripcion,
|
||||
'en_uso': enUso,
|
||||
'activo': activo,
|
||||
'ubicacion': ubicacion,
|
||||
'imagen_url': imagenUrl,
|
||||
'fecha_registro': fechaRegistro.toIso8601String(),
|
||||
};
|
||||
}
|
||||
|
||||
factory Componente.fromJson(String source) =>
|
||||
Componente.fromMap(json.decode(source));
|
||||
String toJson() => json.encode(toMap());
|
||||
}
|
||||
41
lib/models/nethive/detalle_cable_model.dart
Normal file
41
lib/models/nethive/detalle_cable_model.dart
Normal file
@@ -0,0 +1,41 @@
|
||||
import 'dart:convert';
|
||||
|
||||
class DetalleCable {
|
||||
final String componenteId;
|
||||
final String? tipoCable;
|
||||
final String? color;
|
||||
final double? tamano;
|
||||
final String? tipoConector;
|
||||
|
||||
DetalleCable({
|
||||
required this.componenteId,
|
||||
this.tipoCable,
|
||||
this.color,
|
||||
this.tamano,
|
||||
this.tipoConector,
|
||||
});
|
||||
|
||||
factory DetalleCable.fromMap(Map<String, dynamic> map) {
|
||||
return DetalleCable(
|
||||
componenteId: map['componente_id'],
|
||||
tipoCable: map['tipo_cable'],
|
||||
color: map['color'],
|
||||
tamano: map['tamaño']?.toDouble(),
|
||||
tipoConector: map['tipo_conector'],
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toMap() {
|
||||
return {
|
||||
'componente_id': componenteId,
|
||||
'tipo_cable': tipoCable,
|
||||
'color': color,
|
||||
'tamaño': tamano,
|
||||
'tipo_conector': tipoConector,
|
||||
};
|
||||
}
|
||||
|
||||
factory DetalleCable.fromJson(String source) =>
|
||||
DetalleCable.fromMap(json.decode(source));
|
||||
String toJson() => json.encode(toMap());
|
||||
}
|
||||
53
lib/models/nethive/detalle_equipo_activo_model.dart
Normal file
53
lib/models/nethive/detalle_equipo_activo_model.dart
Normal file
@@ -0,0 +1,53 @@
|
||||
import 'dart:convert';
|
||||
|
||||
class DetalleEquipoActivo {
|
||||
final String componenteId;
|
||||
final String? tipo;
|
||||
final String? marca;
|
||||
final String? modelo;
|
||||
final String? numeroSerie;
|
||||
final String? especificaciones;
|
||||
final String? direccionIp;
|
||||
final String? firmware;
|
||||
|
||||
DetalleEquipoActivo({
|
||||
required this.componenteId,
|
||||
this.tipo,
|
||||
this.marca,
|
||||
this.modelo,
|
||||
this.numeroSerie,
|
||||
this.especificaciones,
|
||||
this.direccionIp,
|
||||
this.firmware,
|
||||
});
|
||||
|
||||
factory DetalleEquipoActivo.fromMap(Map<String, dynamic> map) {
|
||||
return DetalleEquipoActivo(
|
||||
componenteId: map['componente_id'],
|
||||
tipo: map['tipo'],
|
||||
marca: map['marca'],
|
||||
modelo: map['modelo'],
|
||||
numeroSerie: map['numero_serie'],
|
||||
especificaciones: map['especificaciones'],
|
||||
direccionIp: map['direccion_ip'],
|
||||
firmware: map['firmware'],
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toMap() {
|
||||
return {
|
||||
'componente_id': componenteId,
|
||||
'tipo': tipo,
|
||||
'marca': marca,
|
||||
'modelo': modelo,
|
||||
'numero_serie': numeroSerie,
|
||||
'especificaciones': especificaciones,
|
||||
'direccion_ip': direccionIp,
|
||||
'firmware': firmware,
|
||||
};
|
||||
}
|
||||
|
||||
factory DetalleEquipoActivo.fromJson(String source) =>
|
||||
DetalleEquipoActivo.fromMap(json.decode(source));
|
||||
String toJson() => json.encode(toMap());
|
||||
}
|
||||
41
lib/models/nethive/detalle_organizador_model.dart
Normal file
41
lib/models/nethive/detalle_organizador_model.dart
Normal file
@@ -0,0 +1,41 @@
|
||||
import 'dart:convert';
|
||||
|
||||
class DetalleOrganizador {
|
||||
final String componenteId;
|
||||
final String? tipo;
|
||||
final String? material;
|
||||
final String? tamano;
|
||||
final String? color;
|
||||
|
||||
DetalleOrganizador({
|
||||
required this.componenteId,
|
||||
this.tipo,
|
||||
this.material,
|
||||
this.tamano,
|
||||
this.color,
|
||||
});
|
||||
|
||||
factory DetalleOrganizador.fromMap(Map<String, dynamic> map) {
|
||||
return DetalleOrganizador(
|
||||
componenteId: map['componente_id'],
|
||||
tipo: map['tipo'],
|
||||
material: map['material'],
|
||||
tamano: map['tamaño'],
|
||||
color: map['color'],
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toMap() {
|
||||
return {
|
||||
'componente_id': componenteId,
|
||||
'tipo': tipo,
|
||||
'material': material,
|
||||
'tamaño': tamano,
|
||||
'color': color,
|
||||
};
|
||||
}
|
||||
|
||||
factory DetalleOrganizador.fromJson(String source) =>
|
||||
DetalleOrganizador.fromMap(json.decode(source));
|
||||
String toJson() => json.encode(toMap());
|
||||
}
|
||||
49
lib/models/nethive/detalle_patch_panel_model.dart
Normal file
49
lib/models/nethive/detalle_patch_panel_model.dart
Normal file
@@ -0,0 +1,49 @@
|
||||
import 'dart:convert';
|
||||
|
||||
class DetallePatchPanel {
|
||||
final String componenteId;
|
||||
final String? tipoConector;
|
||||
final int? numeroPuertos;
|
||||
final String? categoria;
|
||||
final String? tipoMontaje;
|
||||
final bool? numeracionFrontal;
|
||||
final bool? panelCiego;
|
||||
|
||||
DetallePatchPanel({
|
||||
required this.componenteId,
|
||||
this.tipoConector,
|
||||
this.numeroPuertos,
|
||||
this.categoria,
|
||||
this.tipoMontaje,
|
||||
this.numeracionFrontal,
|
||||
this.panelCiego,
|
||||
});
|
||||
|
||||
factory DetallePatchPanel.fromMap(Map<String, dynamic> map) {
|
||||
return DetallePatchPanel(
|
||||
componenteId: map['componente_id'],
|
||||
tipoConector: map['tipo_conector'],
|
||||
numeroPuertos: map['numero_puertos'],
|
||||
categoria: map['categoria'],
|
||||
tipoMontaje: map['tipo_montaje'],
|
||||
numeracionFrontal: map['numeracion_frontal'],
|
||||
panelCiego: map['panel_ciego'],
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toMap() {
|
||||
return {
|
||||
'componente_id': componenteId,
|
||||
'tipo_conector': tipoConector,
|
||||
'numero_puertos': numeroPuertos,
|
||||
'categoria': categoria,
|
||||
'tipo_montaje': tipoMontaje,
|
||||
'numeracion_frontal': numeracionFrontal,
|
||||
'panel_ciego': panelCiego,
|
||||
};
|
||||
}
|
||||
|
||||
factory DetallePatchPanel.fromJson(String source) =>
|
||||
DetallePatchPanel.fromMap(json.decode(source));
|
||||
String toJson() => json.encode(toMap());
|
||||
}
|
||||
57
lib/models/nethive/detalle_rack_model.dart
Normal file
57
lib/models/nethive/detalle_rack_model.dart
Normal file
@@ -0,0 +1,57 @@
|
||||
import 'dart:convert';
|
||||
|
||||
class DetalleRack {
|
||||
final String componenteId;
|
||||
final String? tipo;
|
||||
final int? alturaU;
|
||||
final int? profundidadCm;
|
||||
final int? anchoCm;
|
||||
final bool? ventilacionIntegrada;
|
||||
final bool? puertasConLlave;
|
||||
final bool? ruedas;
|
||||
final String? color;
|
||||
|
||||
DetalleRack({
|
||||
required this.componenteId,
|
||||
this.tipo,
|
||||
this.alturaU,
|
||||
this.profundidadCm,
|
||||
this.anchoCm,
|
||||
this.ventilacionIntegrada,
|
||||
this.puertasConLlave,
|
||||
this.ruedas,
|
||||
this.color,
|
||||
});
|
||||
|
||||
factory DetalleRack.fromMap(Map<String, dynamic> map) {
|
||||
return DetalleRack(
|
||||
componenteId: map['componente_id'],
|
||||
tipo: map['tipo'],
|
||||
alturaU: map['altura_u'],
|
||||
profundidadCm: map['profundidad_cm'],
|
||||
anchoCm: map['ancho_cm'],
|
||||
ventilacionIntegrada: map['ventilacion_integrada'],
|
||||
puertasConLlave: map['puertas_con_llave'],
|
||||
ruedas: map['ruedas'],
|
||||
color: map['color'],
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toMap() {
|
||||
return {
|
||||
'componente_id': componenteId,
|
||||
'tipo': tipo,
|
||||
'altura_u': alturaU,
|
||||
'profundidad_cm': profundidadCm,
|
||||
'ancho_cm': anchoCm,
|
||||
'ventilacion_integrada': ventilacionIntegrada,
|
||||
'puertas_con_llave': puertasConLlave,
|
||||
'ruedas': ruedas,
|
||||
'color': color,
|
||||
};
|
||||
}
|
||||
|
||||
factory DetalleRack.fromJson(String source) =>
|
||||
DetalleRack.fromMap(json.decode(source));
|
||||
String toJson() => json.encode(toMap());
|
||||
}
|
||||
61
lib/models/nethive/detalle_router_firewall_model.dart
Normal file
61
lib/models/nethive/detalle_router_firewall_model.dart
Normal file
@@ -0,0 +1,61 @@
|
||||
import 'dart:convert';
|
||||
|
||||
class DetalleRouterFirewall {
|
||||
final String componenteId;
|
||||
final String? tipo;
|
||||
final String? marca;
|
||||
final String? modelo;
|
||||
final String? numeroSerie;
|
||||
final String? interfaces;
|
||||
final double? capacidadRoutingGbps;
|
||||
final String? direccionIp;
|
||||
final String? firmware;
|
||||
final String? licencias;
|
||||
|
||||
DetalleRouterFirewall({
|
||||
required this.componenteId,
|
||||
this.tipo,
|
||||
this.marca,
|
||||
this.modelo,
|
||||
this.numeroSerie,
|
||||
this.interfaces,
|
||||
this.capacidadRoutingGbps,
|
||||
this.direccionIp,
|
||||
this.firmware,
|
||||
this.licencias,
|
||||
});
|
||||
|
||||
factory DetalleRouterFirewall.fromMap(Map<String, dynamic> map) {
|
||||
return DetalleRouterFirewall(
|
||||
componenteId: map['componente_id'],
|
||||
tipo: map['tipo'],
|
||||
marca: map['marca'],
|
||||
modelo: map['modelo'],
|
||||
numeroSerie: map['numero_serie'],
|
||||
interfaces: map['interfaces'],
|
||||
capacidadRoutingGbps: map['capacidad_routing_gbps']?.toDouble(),
|
||||
direccionIp: map['direccion_ip'],
|
||||
firmware: map['firmware'],
|
||||
licencias: map['licencias'],
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toMap() {
|
||||
return {
|
||||
'componente_id': componenteId,
|
||||
'tipo': tipo,
|
||||
'marca': marca,
|
||||
'modelo': modelo,
|
||||
'numero_serie': numeroSerie,
|
||||
'interfaces': interfaces,
|
||||
'capacidad_routing_gbps': capacidadRoutingGbps,
|
||||
'direccion_ip': direccionIp,
|
||||
'firmware': firmware,
|
||||
'licencias': licencias,
|
||||
};
|
||||
}
|
||||
|
||||
factory DetalleRouterFirewall.fromJson(String source) =>
|
||||
DetalleRouterFirewall.fromMap(json.decode(source));
|
||||
String toJson() => json.encode(toMap());
|
||||
}
|
||||
69
lib/models/nethive/detalle_switch_model.dart
Normal file
69
lib/models/nethive/detalle_switch_model.dart
Normal file
@@ -0,0 +1,69 @@
|
||||
import 'dart:convert';
|
||||
|
||||
class DetalleSwitch {
|
||||
final String componenteId;
|
||||
final String? marca;
|
||||
final String? modelo;
|
||||
final String? numeroSerie;
|
||||
final bool? administrable;
|
||||
final bool? poe;
|
||||
final int? cantidadPuertos;
|
||||
final String? velocidadPuertos;
|
||||
final String? tipoPuertos;
|
||||
final String? ubicacionEnRack;
|
||||
final String? direccionIp;
|
||||
final String? firmware;
|
||||
|
||||
DetalleSwitch({
|
||||
required this.componenteId,
|
||||
this.marca,
|
||||
this.modelo,
|
||||
this.numeroSerie,
|
||||
this.administrable,
|
||||
this.poe,
|
||||
this.cantidadPuertos,
|
||||
this.velocidadPuertos,
|
||||
this.tipoPuertos,
|
||||
this.ubicacionEnRack,
|
||||
this.direccionIp,
|
||||
this.firmware,
|
||||
});
|
||||
|
||||
factory DetalleSwitch.fromMap(Map<String, dynamic> map) {
|
||||
return DetalleSwitch(
|
||||
componenteId: map['componente_id'],
|
||||
marca: map['marca'],
|
||||
modelo: map['modelo'],
|
||||
numeroSerie: map['numero_serie'],
|
||||
administrable: map['administrable'],
|
||||
poe: map['poe'],
|
||||
cantidadPuertos: map['cantidad_puertos'],
|
||||
velocidadPuertos: map['velocidad_puertos'],
|
||||
tipoPuertos: map['tipo_puertos'],
|
||||
ubicacionEnRack: map['ubicacion_en_rack'],
|
||||
direccionIp: map['direccion_ip'],
|
||||
firmware: map['firmware'],
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toMap() {
|
||||
return {
|
||||
'componente_id': componenteId,
|
||||
'marca': marca,
|
||||
'modelo': modelo,
|
||||
'numero_serie': numeroSerie,
|
||||
'administrable': administrable,
|
||||
'poe': poe,
|
||||
'cantidad_puertos': cantidadPuertos,
|
||||
'velocidad_puertos': velocidadPuertos,
|
||||
'tipo_puertos': tipoPuertos,
|
||||
'ubicacion_en_rack': ubicacionEnRack,
|
||||
'direccion_ip': direccionIp,
|
||||
'firmware': firmware,
|
||||
};
|
||||
}
|
||||
|
||||
factory DetalleSwitch.fromJson(String source) =>
|
||||
DetalleSwitch.fromMap(json.decode(source));
|
||||
String toJson() => json.encode(toMap());
|
||||
}
|
||||
61
lib/models/nethive/detalle_ups_model.dart
Normal file
61
lib/models/nethive/detalle_ups_model.dart
Normal file
@@ -0,0 +1,61 @@
|
||||
import 'dart:convert';
|
||||
|
||||
class DetalleUps {
|
||||
final String componenteId;
|
||||
final String? tipo;
|
||||
final String? marca;
|
||||
final String? modelo;
|
||||
final String? voltajeEntrada;
|
||||
final String? voltajeSalida;
|
||||
final int? capacidadVa;
|
||||
final int? autonomiaMinutos;
|
||||
final int? cantidadTomas;
|
||||
final bool? rackeable;
|
||||
|
||||
DetalleUps({
|
||||
required this.componenteId,
|
||||
this.tipo,
|
||||
this.marca,
|
||||
this.modelo,
|
||||
this.voltajeEntrada,
|
||||
this.voltajeSalida,
|
||||
this.capacidadVa,
|
||||
this.autonomiaMinutos,
|
||||
this.cantidadTomas,
|
||||
this.rackeable,
|
||||
});
|
||||
|
||||
factory DetalleUps.fromMap(Map<String, dynamic> map) {
|
||||
return DetalleUps(
|
||||
componenteId: map['componente_id'],
|
||||
tipo: map['tipo'],
|
||||
marca: map['marca'],
|
||||
modelo: map['modelo'],
|
||||
voltajeEntrada: map['voltaje_entrada'],
|
||||
voltajeSalida: map['voltaje_salida'],
|
||||
capacidadVa: map['capacidad_va'],
|
||||
autonomiaMinutos: map['autonomia_minutos'],
|
||||
cantidadTomas: map['cantidad_tomas'],
|
||||
rackeable: map['rackeable'],
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toMap() {
|
||||
return {
|
||||
'componente_id': componenteId,
|
||||
'tipo': tipo,
|
||||
'marca': marca,
|
||||
'modelo': modelo,
|
||||
'voltaje_entrada': voltajeEntrada,
|
||||
'voltaje_salida': voltajeSalida,
|
||||
'capacidad_va': capacidadVa,
|
||||
'autonomia_minutos': autonomiaMinutos,
|
||||
'cantidad_tomas': cantidadTomas,
|
||||
'rackeable': rackeable,
|
||||
};
|
||||
}
|
||||
|
||||
factory DetalleUps.fromJson(String source) =>
|
||||
DetalleUps.fromMap(json.decode(source));
|
||||
String toJson() => json.encode(toMap());
|
||||
}
|
||||
57
lib/models/nethive/empresa_model.dart
Normal file
57
lib/models/nethive/empresa_model.dart
Normal file
@@ -0,0 +1,57 @@
|
||||
import 'dart:convert';
|
||||
|
||||
class Empresa {
|
||||
final String id;
|
||||
final String nombre;
|
||||
final String rfc;
|
||||
final String direccion;
|
||||
final String telefono;
|
||||
final String email;
|
||||
final DateTime fechaCreacion;
|
||||
final String? logoUrl;
|
||||
final String? imagenUrl;
|
||||
|
||||
Empresa({
|
||||
required this.id,
|
||||
required this.nombre,
|
||||
required this.rfc,
|
||||
required this.direccion,
|
||||
required this.telefono,
|
||||
required this.email,
|
||||
required this.fechaCreacion,
|
||||
this.logoUrl,
|
||||
this.imagenUrl,
|
||||
});
|
||||
|
||||
factory Empresa.fromMap(Map<String, dynamic> map) {
|
||||
return Empresa(
|
||||
id: map['id'],
|
||||
nombre: map['nombre'],
|
||||
rfc: map['rfc'],
|
||||
direccion: map['direccion'],
|
||||
telefono: map['telefono'],
|
||||
email: map['email'],
|
||||
fechaCreacion: DateTime.parse(map['fecha_creacion']),
|
||||
logoUrl: map['logo_url'],
|
||||
imagenUrl: map['imagen_url'],
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toMap() {
|
||||
return {
|
||||
'id': id,
|
||||
'nombre': nombre,
|
||||
'rfc': rfc,
|
||||
'direccion': direccion,
|
||||
'telefono': telefono,
|
||||
'email': email,
|
||||
'fecha_creacion': fechaCreacion.toIso8601String(),
|
||||
'logo_url': logoUrl,
|
||||
'imagen_url': imagenUrl,
|
||||
};
|
||||
}
|
||||
|
||||
factory Empresa.fromJson(String source) =>
|
||||
Empresa.fromMap(json.decode(source));
|
||||
String toJson() => json.encode(toMap());
|
||||
}
|
||||
61
lib/models/nethive/negocio_model.dart
Normal file
61
lib/models/nethive/negocio_model.dart
Normal file
@@ -0,0 +1,61 @@
|
||||
import 'dart:convert';
|
||||
|
||||
class Negocio {
|
||||
final String id;
|
||||
final String empresaId;
|
||||
final String nombre;
|
||||
final String direccion;
|
||||
final double latitud;
|
||||
final double longitud;
|
||||
final String tipoLocal;
|
||||
final DateTime fechaCreacion;
|
||||
final String? logoUrl;
|
||||
final String? imagenUrl;
|
||||
|
||||
Negocio({
|
||||
required this.id,
|
||||
required this.empresaId,
|
||||
required this.nombre,
|
||||
required this.direccion,
|
||||
required this.latitud,
|
||||
required this.longitud,
|
||||
required this.tipoLocal,
|
||||
required this.fechaCreacion,
|
||||
this.logoUrl,
|
||||
this.imagenUrl,
|
||||
});
|
||||
|
||||
factory Negocio.fromMap(Map<String, dynamic> map) {
|
||||
return Negocio(
|
||||
id: map['id'],
|
||||
empresaId: map['empresa_id'],
|
||||
nombre: map['nombre'],
|
||||
direccion: map['direccion'],
|
||||
latitud: map['latitud'].toDouble(),
|
||||
longitud: map['longitud'].toDouble(),
|
||||
tipoLocal: map['tipo_local'],
|
||||
fechaCreacion: DateTime.parse(map['fecha_creacion']),
|
||||
logoUrl: map['logo_url'],
|
||||
imagenUrl: map['imagen_url'],
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toMap() {
|
||||
return {
|
||||
'id': id,
|
||||
'empresa_id': empresaId,
|
||||
'nombre': nombre,
|
||||
'direccion': direccion,
|
||||
'latitud': latitud,
|
||||
'longitud': longitud,
|
||||
'tipo_local': tipoLocal,
|
||||
'fecha_creacion': fechaCreacion.toIso8601String(),
|
||||
'logo_url': logoUrl,
|
||||
'imagen_url': imagenUrl,
|
||||
};
|
||||
}
|
||||
|
||||
factory Negocio.fromJson(String source) =>
|
||||
Negocio.fromMap(json.decode(source));
|
||||
String toJson() => json.encode(toMap());
|
||||
}
|
||||
Reference in New Issue
Block a user