inventario, mapa, login etc..

This commit is contained in:
Abraham
2025-07-24 10:18:27 -07:00
parent 974a757220
commit fc3daf3b47
13 changed files with 3812 additions and 1030 deletions

View File

@@ -0,0 +1,42 @@
import 'dart:convert';
class Distribucion {
final String id;
final String negocioId;
final String tipo; // 'MDF' o 'IDF'
final String nombre;
final String? descripcion;
Distribucion({
required this.id,
required this.negocioId,
required this.tipo,
required this.nombre,
this.descripcion,
});
factory Distribucion.fromMap(Map<String, dynamic> map) {
return Distribucion(
id: map['id'],
negocioId: map['negocio_id'],
tipo: map['tipo'],
nombre: map['nombre'],
descripcion: map['descripcion'],
);
}
Map<String, dynamic> toMap() {
return {
'id': id,
'negocio_id': negocioId,
'tipo': tipo,
'nombre': nombre,
'descripcion': descripcion,
};
}
factory Distribucion.fromJson(String source) =>
Distribucion.fromMap(json.decode(source));
String toJson() => json.encode(toMap());
}