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

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

	DeviceListEntity();

	factory DeviceListEntity.fromJson(Map<String, dynamic> json) => $DeviceListEntityFromJson(json);

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

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

@JsonSerializable()
class DeviceListRows {
	int id = 0;
	@JSONField(name: "device_key")
	String? deviceKey = null;
	@JSONField(name: "device_mac")
	String? deviceMac = null;
	@JSONField(name: "device_alias")
	String? deviceAlias;
	@JSONField(name: "site_type")
	int siteType = 0;
	@JSONField(name: "origin_type")
	int originType = 0;
	@JSONField(name: "alive_state")
	int aliveState = 0;
	@JSONField(name: "last_online")
	String? lastOnline = null;
	@JSONField(name: "site_type_show")
	String? siteTypeShow = null;
	@JSONField(name: "created_at")
	String? createdAt = null;
	@JSONField(name: "device_name")
	String? deviceName = null;
	@JSONField(name: "device_no")
	String? deviceNo = null;
	@JSONField(name: "is_online")
	String? isOnline = null;
	@JSONField(name: "site_show")
	String? siteShow = null;

	DeviceListRows();

	factory DeviceListRows.fromJson(Map<String, dynamic> json) => $DeviceListRowsFromJson(json);

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

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