// To parse this JSON data, do
//
//     final userResponse = userResponseFromJson(jsonString);

import 'dart:convert';

UserResponse userResponseFromJson(String str) =>
    UserResponse.fromJson(json.decode(str));

String userResponseToJson(UserResponse data) => json.encode(data.toJson());

class UserResponse {
  UserResponse({
    required this.stores,
    required this.desigination,
    required this.empName,
    required this.level,
    required this.status,
  });

  List<Store> stores;
  String desigination;
  String empName;
  String level;
  String status;

  factory UserResponse.fromJson(Map<String, dynamic> json) => UserResponse(
        stores: List<Store>.from(json["STORES"].map((x) => Store.fromJson(x))),
        desigination: json["desigination"],
        empName: json["emp_name"],
        level: json["level"],
        status: json["status"],
      );

  Map<String, dynamic> toJson() => {
        "STORES": List<dynamic>.from(stores.map((x) => x.toJson())),
        "desigination": desigination,
        "emp_name": empName,
        "level": level,
        "status": status,
      };
}

class Store {
  Store({
    required this.storename,
  });

  String storename;

  factory Store.fromJson(Map<String, dynamic> json) => Store(
        storename: json["storename"],
      );

  Map<String, dynamic> toJson() => {
        "storename": storename,
      };
}
