123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- import 'basico_model.dart';
- class Usuario extends Basico {
- String? correo;
- String? clave;
- String? nombre;
- String? estatus;
- String? telefono;
- String? empresa;
- String? rol;
- Usuario({
- super.id,
- this.correo,
- this.clave,
- this.nombre,
- this.estatus,
- this.telefono,
- this.empresa,
- this.rol,
- });
- @override
- Map<String, dynamic> toJson() {
- return {
- 'id': id,
- 'correo': correo,
- 'clave': clave,
- 'nombre': nombre,
- 'estatus': estatus,
- 'telefono': telefono,
- 'empresa': empresa,
- 'rol': rol,
- }..addAll(super.toJson());
- }
- Usuario.fromJson(Map<String, dynamic> json) {
- super.parseJson(json);
- correo = Basico.parseString(json['correo']);
- clave = Basico.parseString(json['clave']);
- nombre = Basico.parseString(json['nombre']);
- estatus = Basico.parseString(json['estatus']);
- telefono = Basico.parseString(json['telefono']);
- empresa = Basico.parseString(json['empresa']);
- rol = Basico.parseString(json['rol']);
- }
- }
|