

import '../core/constants/api_keys.dart';

class LoginRequestModel {
  final String username;
  final String password;
  final String channelCode;
  final String porOrgacode;

  LoginRequestModel({
    required this.username,
    required this.password,
    required this.channelCode,
    required this.porOrgacode,
  });

  factory LoginRequestModel.fromJson(Map<String, dynamic> json) {
    return LoginRequestModel(
      username: json[ApiKeys.cmpUserId],
      password: json[ApiKeys.cmpCustpassword],
      channelCode: json[ApiKeys.channelCode],
      porOrgacode: json[ApiKeys.porOrgacode],
    );
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data[ApiKeys.cmpUserId] = username;
    data[ApiKeys.cmpCustpassword] = password;
    data[ApiKeys.channelCode] = channelCode;
    data[ApiKeys.porOrgacode] = porOrgacode;
    return data;
  }
}
