import 'package:domain/entity/response/index_option_entity.dart';
import 'package:domain/generated/json/base/json_field.dart';
import 'package:domain/generated/json/job_template_edit_index_entity.g.dart';
import 'dart:convert';
export 'package:domain/generated/json/job_template_edit_index_entity.g.dart';

@JsonSerializable()
class JobTemplateEditIndexEntity {
	@JSONField(name: "template_id")
	int templateId = 0;
	String? name;  //新加坡用这个为标题
	@JSONField(name: "job_title")
	String? jobTitle;  //越南用这个为标题
	String? contact;
	@JSONField(name: "contact_no")
	String? contactNo;
	String? description;
	String? note;
	@JSONField(name: "with_food_cert")
	int withFoodCert = 0;
	@JSONField(name: "age_list")
	List<JobTemplateEditIndexAgeList> ageList = [];
	@JSONField(name: "sex_list")
	List<JobTemplateEditIndexSexList> sexList = [];
	@JSONField(name: "language_list")
	List<JobTemplateEditIndexLanguageList> languageList = [];
	@JSONField(name: "position_list")
	List<IndexOptionEntity> positionList = [];

	JobTemplateEditIndexEntity();

	factory JobTemplateEditIndexEntity.fromJson(Map<String, dynamic> json) => $JobTemplateEditIndexEntityFromJson(json);

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

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

@JsonSerializable()
class JobTemplateEditIndexAgeList {
	String? value = null;
	String? txt = null;
	String? checked = null;

	JobTemplateEditIndexAgeList();

	factory JobTemplateEditIndexAgeList.fromJson(Map<String, dynamic> json) => $JobTemplateEditIndexAgeListFromJson(json);

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

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

@JsonSerializable()
class JobTemplateEditIndexSexList {
	String? value = null;
	String? txt = null;
	String? checked = null;

	JobTemplateEditIndexSexList();

	factory JobTemplateEditIndexSexList.fromJson(Map<String, dynamic> json) => $JobTemplateEditIndexSexListFromJson(json);

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

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

@JsonSerializable()
class JobTemplateEditIndexLanguageList {
	String? value = null;
	String? txt = null;
	String? checked = null;

	JobTemplateEditIndexLanguageList();

	factory JobTemplateEditIndexLanguageList.fromJson(Map<String, dynamic> json) => $JobTemplateEditIndexLanguageListFromJson(json);

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

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