import 'package:test_sa/models/base.dart'; class Rooms extends Base { int id; int departmentId; int clientRoomId; String roomName; Rooms({this.id, this.departmentId, this.clientRoomId, this.roomName}); Rooms.fromJson(Map json) { id = json['id']; departmentId = json['departmentId']; clientRoomId = json['clientRoomId']; roomName = json['roomName']; } Map toJson() { final Map data = new Map(); data['id'] = this.id; data['departmentId'] = this.departmentId; data['clientRoomId'] = this.clientRoomId; data['roomName'] = this.roomName; return data; } }