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

@JsonSerializable()
class ContractTableEntity {
	int total = 0;
	List<ContractTableRows> rows = [];

	ContractTableEntity();

	factory ContractTableEntity.fromJson(Map<String, dynamic> json) => $ContractTableEntityFromJson(json);

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

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

@JsonSerializable()
class ContractTableRows {
	String? id;
	@JSONField(name: "agency_name")
	String? agencyName;
	@JSONField(name: "uen_no")
	String? uenNo;
	@JSONField(name: "contact_person")
	String? contactPerson;
	@JSONField(name: "start_date")
	String? startDate;
	@JSONField(name: "end_date")
	String? endDate;
	String? file;
	@JSONField(name: "position_num")
	int positionNum = 0;
	int status = 0;
	@JSONField(name: "created_at")
	String? createdAt;

	ContractTableRows();

	factory ContractTableRows.fromJson(Map<String, dynamic> json) => $ContractTableRowsFromJson(json);

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

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