132 lines
3.0 KiB
Dart
132 lines
3.0 KiB
Dart
|
|
class User {
|
|
int? userid;
|
|
String? authname;
|
|
int? configid;
|
|
int? authmode;
|
|
int? roleid;
|
|
String? firstname;
|
|
String? lastname;
|
|
String? password;
|
|
String? email;
|
|
String? contactno;
|
|
String? address;
|
|
String? suburb;
|
|
String? city;
|
|
String? state;
|
|
String? postcode;
|
|
String? userfcmtoken;
|
|
int? pin;
|
|
int? partnerid;
|
|
int? tenantid;
|
|
String? fullname;
|
|
String? tenantname;
|
|
String? tenantaddress;
|
|
String? tenantcity;
|
|
String? tenantpostcode;
|
|
String? tenantlat;
|
|
String? tenantlong;
|
|
int? locationid;
|
|
String? locationname;
|
|
int? applocationid;
|
|
|
|
User({
|
|
this.userid,
|
|
this.authname,
|
|
this.configid,
|
|
this.authmode,
|
|
this.roleid,
|
|
this.firstname,
|
|
this.lastname,
|
|
this.password,
|
|
this.email,
|
|
this.contactno,
|
|
this.address,
|
|
this.suburb,
|
|
this.city,
|
|
this.state,
|
|
this.postcode,
|
|
this.userfcmtoken,
|
|
this.pin,
|
|
this.partnerid,
|
|
this.tenantid,
|
|
this.fullname,
|
|
this.tenantname,
|
|
this.tenantaddress,
|
|
this.tenantcity,
|
|
this.tenantpostcode,
|
|
this.tenantlat,
|
|
this.tenantlong,
|
|
this.locationid,
|
|
this.locationname,
|
|
this.applocationid,
|
|
});
|
|
|
|
factory User.fromJson(Map<String, dynamic> json) {
|
|
return User(
|
|
userid: json['userid'] as int?,
|
|
authname: json['authname'] as String?,
|
|
configid: json['configid'] as int?,
|
|
authmode: json['authmode'] as int?,
|
|
roleid: json['roleid'] as int?,
|
|
firstname: json['firstname'] as String?,
|
|
lastname: json['lastname'] as String?,
|
|
password: json['password'] as String?,
|
|
email: json['email'] as String?,
|
|
contactno: json['contactno'] as String?,
|
|
address: json['address'] as String?,
|
|
suburb: json['suburb'] as String?,
|
|
city: json['city'] as String?,
|
|
state: json['state'] as String?,
|
|
postcode: json['postcode'] as String?,
|
|
userfcmtoken: json['userfcmtoken'] as String?,
|
|
pin: json['pin'] as int?,
|
|
partnerid: json['partnerid'] as int?,
|
|
tenantid: json['tenantid'] as int?,
|
|
fullname: json['fullname'] as String?,
|
|
tenantname: json['tenantname'] as String?,
|
|
tenantaddress: json['tenantaddress'] as String?,
|
|
tenantcity: json['tenantcity'] as String?,
|
|
tenantpostcode: json['tenantpostcode'] as String?,
|
|
tenantlat: json['tenantlat'] as String?,
|
|
tenantlong: json['tenantlong'] as String?,
|
|
locationid: json['locationid'] as int?,
|
|
locationname: json['locationname'] as String?,
|
|
applocationid: json['applocationid'] as int?,
|
|
);
|
|
}
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
'userid': userid,
|
|
'authname': authname,
|
|
'configid': configid,
|
|
'authmode': authmode,
|
|
'roleid': roleid,
|
|
'firstname': firstname,
|
|
'lastname': lastname,
|
|
'password': password,
|
|
'email': email,
|
|
'contactno': contactno,
|
|
'address': address,
|
|
'suburb': suburb,
|
|
'city': city,
|
|
'state': state,
|
|
'postcode': postcode,
|
|
'userfcmtoken': userfcmtoken,
|
|
'pin': pin,
|
|
'partnerid': partnerid,
|
|
'tenantid': tenantid,
|
|
'fullname': fullname,
|
|
'tenantname': tenantname,
|
|
'tenantaddress': tenantaddress,
|
|
'tenantcity': tenantcity,
|
|
'tenantpostcode': tenantpostcode,
|
|
'tenantlat': tenantlat,
|
|
'tenantlong': tenantlong,
|
|
'locationid': locationid,
|
|
'locationname': locationname,
|
|
'applocationid': applocationid,
|
|
};
|
|
}
|
|
|