toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  return {
    'ApplicationUserId': applicationUserId,
    'FullName': fullName,
    'Name': name,
    'Email': email,
    'Password': password,
    'ActivatedCode': activatedCode == true ? 1 : 0,
    'IsActive': isActive == true ? 1 : 0,
    'CreatedAt': createdAt?.toIso8601String(),
    'UpdatedAt': updatedAt?.toIso8601String(),
    'Permissions': permissions,
    'AccessLevel': accessLevel,
    'Notes': notes,
    'group_access_right': groupAccessRight,
    'token': token,
    'access_rights': accessRights,
    'role_access_rights': roleAccessRights,

    'Settings': settings == true ? 1 : 0,
    'General_Ledger': generalLedger == true ? 1 : 0,
    'Account_receivable': accountReceivable == true ? 1 : 0,
    'Bank': bank == true ? 1 : 0,
    'Department': department == true ? 1 : 0,
    'Account_Payable': accountPayable == true ? 1 : 0,
    'Stock': stock == true ? 1 : 0,
    'SaleOrder': saleOrder == true ? 1 : 0,
    'PurchaseOrder': purchaseOrder == true ? 1 : 0,
    'POS': pos == true ? 1 : 0,
    'HRD': hrd == true ? 1 : 0,
    'Warehousing': warehousing == true ? 1 : 0,
    'Service': service == true ? 1 : 0,
    'Logistic': logistic == true ? 1 : 0,
    'task': task == true ? 1 : 0,
    'asset': asset == true ? 1 : 0,
  };
}