clean up
This commit is contained in:
31
lib/domain/entities/rate.dart
Normal file
31
lib/domain/entities/rate.dart
Normal file
@@ -0,0 +1,31 @@
|
||||
class Rate {
|
||||
String id;
|
||||
String name;
|
||||
String description;
|
||||
String fromTime;
|
||||
String toTime;
|
||||
int price;
|
||||
|
||||
Rate(
|
||||
{this.id,
|
||||
this.name,
|
||||
this.description,
|
||||
this.fromTime,
|
||||
this.toTime,
|
||||
this.price,});
|
||||
|
||||
factory Rate.fromMap(Map<String, dynamic> map, String id) {
|
||||
return Rate(
|
||||
id: id,
|
||||
name: map['name'],
|
||||
description: map['description'],
|
||||
fromTime: map['from_time'],
|
||||
toTime: map['to_time'],
|
||||
price: map['price'],);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'Rate{id:$id, name:$name,description:$description,fromTime:$fromTime,toTime:$toTime}';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user