|
@@ -1,116 +0,0 @@
|
|
|
-import 'package:domain/generated/json/base/json_convert_content.dart';
|
|
|
-import 'package:domain/entity/response/uk_labour_request_preselect_addstatff_list_entity.dart';
|
|
|
-
|
|
|
-UkLabourRequestPreselectAddstatffListEntity $UkLabourRequestPreselectAddstatffListEntityFromJson(
|
|
|
- Map<String, dynamic> json) {
|
|
|
- final UkLabourRequestPreselectAddstatffListEntity ukLabourRequestPreselectAddstatffListEntity = UkLabourRequestPreselectAddstatffListEntity();
|
|
|
- final int? total = jsonConvert.convert<int>(json['total']);
|
|
|
- if (total != null) {
|
|
|
- ukLabourRequestPreselectAddstatffListEntity.total = total;
|
|
|
- }
|
|
|
- final List<
|
|
|
- UkLabourRequestPreselectAddstatffListRows>? rows = (json['rows'] as List<
|
|
|
- dynamic>?)?.map(
|
|
|
- (e) =>
|
|
|
- jsonConvert.convert<UkLabourRequestPreselectAddstatffListRows>(
|
|
|
- e) as UkLabourRequestPreselectAddstatffListRows).toList();
|
|
|
- if (rows != null) {
|
|
|
- ukLabourRequestPreselectAddstatffListEntity.rows = rows;
|
|
|
- }
|
|
|
- return ukLabourRequestPreselectAddstatffListEntity;
|
|
|
-}
|
|
|
-
|
|
|
-Map<String, dynamic> $UkLabourRequestPreselectAddstatffListEntityToJson(
|
|
|
- UkLabourRequestPreselectAddstatffListEntity entity) {
|
|
|
- final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
- data['total'] = entity.total;
|
|
|
- data['rows'] = entity.rows?.map((v) => v.toJson()).toList();
|
|
|
- return data;
|
|
|
-}
|
|
|
-
|
|
|
-extension UkLabourRequestPreselectAddstatffListEntityExtension on UkLabourRequestPreselectAddstatffListEntity {
|
|
|
- UkLabourRequestPreselectAddstatffListEntity copyWith({
|
|
|
- int? total,
|
|
|
- List<UkLabourRequestPreselectAddstatffListRows>? rows,
|
|
|
- }) {
|
|
|
- return UkLabourRequestPreselectAddstatffListEntity()
|
|
|
- ..total = total ?? this.total
|
|
|
- ..rows = rows ?? this.rows;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-UkLabourRequestPreselectAddstatffListRows $UkLabourRequestPreselectAddstatffListRowsFromJson(
|
|
|
- Map<String, dynamic> json) {
|
|
|
- final UkLabourRequestPreselectAddstatffListRows ukLabourRequestPreselectAddstatffListRows = UkLabourRequestPreselectAddstatffListRows();
|
|
|
- final int? id = jsonConvert.convert<int>(json['id']);
|
|
|
- if (id != null) {
|
|
|
- ukLabourRequestPreselectAddstatffListRows.id = id;
|
|
|
- }
|
|
|
- final String? name = jsonConvert.convert<String>(json['name']);
|
|
|
- if (name != null) {
|
|
|
- ukLabourRequestPreselectAddstatffListRows.name = name;
|
|
|
- }
|
|
|
- final String? gender = jsonConvert.convert<String>(json['gender']);
|
|
|
- if (gender != null) {
|
|
|
- ukLabourRequestPreselectAddstatffListRows.gender = gender;
|
|
|
- }
|
|
|
- final String? nric = jsonConvert.convert<String>(json['nric']);
|
|
|
- if (nric != null) {
|
|
|
- ukLabourRequestPreselectAddstatffListRows.nric = nric;
|
|
|
- }
|
|
|
- final String? profilePicture = jsonConvert.convert<String>(
|
|
|
- json['profile_picture']);
|
|
|
- if (profilePicture != null) {
|
|
|
- ukLabourRequestPreselectAddstatffListRows.profilePicture = profilePicture;
|
|
|
- }
|
|
|
- final int? status = jsonConvert.convert<int>(json['status']);
|
|
|
- if (status != null) {
|
|
|
- ukLabourRequestPreselectAddstatffListRows.status = status;
|
|
|
- }
|
|
|
- final int? applyState = jsonConvert.convert<int>(json['apply_state']);
|
|
|
- if (applyState != null) {
|
|
|
- ukLabourRequestPreselectAddstatffListRows.applyState = applyState;
|
|
|
- }
|
|
|
- final bool? isSelected = jsonConvert.convert<bool>(json['isSelected']);
|
|
|
- if (isSelected != null) {
|
|
|
- ukLabourRequestPreselectAddstatffListRows.isSelected = isSelected;
|
|
|
- }
|
|
|
- return ukLabourRequestPreselectAddstatffListRows;
|
|
|
-}
|
|
|
-
|
|
|
-Map<String, dynamic> $UkLabourRequestPreselectAddstatffListRowsToJson(
|
|
|
- UkLabourRequestPreselectAddstatffListRows entity) {
|
|
|
- final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
- data['id'] = entity.id;
|
|
|
- data['name'] = entity.name;
|
|
|
- data['gender'] = entity.gender;
|
|
|
- data['nric'] = entity.nric;
|
|
|
- data['profile_picture'] = entity.profilePicture;
|
|
|
- data['status'] = entity.status;
|
|
|
- data['apply_state'] = entity.applyState;
|
|
|
- data['isSelected'] = entity.isSelected;
|
|
|
- return data;
|
|
|
-}
|
|
|
-
|
|
|
-extension UkLabourRequestPreselectAddstatffListRowsExtension on UkLabourRequestPreselectAddstatffListRows {
|
|
|
- UkLabourRequestPreselectAddstatffListRows copyWith({
|
|
|
- int? id,
|
|
|
- String? name,
|
|
|
- String? gender,
|
|
|
- String? nric,
|
|
|
- String? profilePicture,
|
|
|
- int? status,
|
|
|
- int? applyState,
|
|
|
- bool? isSelected,
|
|
|
- }) {
|
|
|
- return UkLabourRequestPreselectAddstatffListRows()
|
|
|
- ..id = id ?? this.id
|
|
|
- ..name = name ?? this.name
|
|
|
- ..gender = gender ?? this.gender
|
|
|
- ..nric = nric ?? this.nric
|
|
|
- ..profilePicture = profilePicture ?? this.profilePicture
|
|
|
- ..status = status ?? this.status
|
|
|
- ..applyState = applyState ?? this.applyState
|
|
|
- ..isSelected = isSelected ?? this.isSelected;
|
|
|
- }
|
|
|
-}
|