import 'package:domain/generated/json/base/json_field.dart';
import 'package:domain/generated/json/labour_request_list_entity.g.dart';
import 'dart:convert';
export 'package:domain/generated/json/labour_request_list_entity.g.dart';

@JsonSerializable()
class LabourRequestListEntity {
  int? total = 0;
  List<LabourRequestListRows>? rows = [];

  LabourRequestListEntity();

  factory LabourRequestListEntity.fromJson(Map<String, dynamic> json) => $LabourRequestListEntityFromJson(json);

  Map<String, dynamic> toJson() => $LabourRequestListEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class LabourRequestListRows {
  @JSONField(name: "request_id")
  int requestId = 0;
  @JSONField(name: "job_title")
  String? jobTitle;
  @JSONField(name: "department_name")
  String? departmentName;
  @JSONField(name: "job_time")
  String? jobTime;
  @JSONField(name: "need_num")
  int needNum = 0;
  @JSONField(name: "co_status")
  int? coStatus = 0;
  @JSONField(name: "co_status_show")
  String? coStatusShow;
  @JSONField(name: "publish_status")
  bool publishStatus = false;
  @JSONField(name: "created_at")
  String? createdAt;
  @JSONField(name: "action_list")
  List<String>? actionList = [];

  LabourRequestListRows();

  factory LabourRequestListRows.fromJson(Map<String, dynamic> json) => $LabourRequestListRowsFromJson(json);

  Map<String, dynamic> toJson() => $LabourRequestListRowsToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}
