import 'package:equatable/equatable.dart';

class SamplingLocation extends Equatable {
  String mLocationID;
  String mLocationTSampleStationID;
  String mLocationName;
  String mLocationPriority;
  String mLocationIsActive;
  String mLocationCreated;
  String mLocationLastUpdated;
  String tSampleStationName;
  bool value;

  SamplingLocation(
      {required this.mLocationID,
      required this.mLocationTSampleStationID,
      required this.mLocationName,
      required this.mLocationPriority,
      required this.mLocationIsActive,
      required this.mLocationCreated,
      required this.mLocationLastUpdated,
      required this.tSampleStationName,
      this.value = false});

  SamplingLocation.fromJson(Map<String, dynamic> json)
      : mLocationID = json['M_LocationID'],
        mLocationTSampleStationID = json['M_LocationT_SampleStationID'],
        mLocationName = json['M_LocationName'],
        mLocationPriority = json['M_LocationPriority'],
        mLocationIsActive = json['M_LocationIsActive'],
        mLocationCreated = json['M_LocationCreated'],
        mLocationLastUpdated = json['M_LocationLastUpdated'],
        tSampleStationName = json['T_SampleStationName'],
        value = false;

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['M_LocationID'] = this.mLocationID;
    data['M_LocationT_SampleStationID'] = this.mLocationTSampleStationID;
    data['M_LocationName'] = this.mLocationName;
    data['M_LocationPriority'] = this.mLocationPriority;
    data['M_LocationIsActive'] = this.mLocationIsActive;
    data['M_LocationCreated'] = this.mLocationCreated;
    data['M_LocationLastUpdated'] = this.mLocationLastUpdated;
    return data;
  }

  @override
  List<Object?> get props => [mLocationID];
}
