28 lines
562 B
Dart
28 lines
562 B
Dart
class BookInstance {
|
|
BookInstance({
|
|
required this.balId,
|
|
required this.bookId,
|
|
required this.id,
|
|
required this.ownerId,
|
|
required this.price,
|
|
required this.status,
|
|
this.soldPrice,
|
|
});
|
|
|
|
int balId;
|
|
int bookId;
|
|
int id;
|
|
int ownerId;
|
|
double price;
|
|
double? soldPrice;
|
|
bool status;
|
|
|
|
factory BookInstance.fromJSON(Map<String, dynamic> json) => BookInstance(
|
|
balId: json["balId"],
|
|
bookId: json["bookId"],
|
|
id: json["id"],
|
|
ownerId: json["ownerId"],
|
|
price: json["price"],
|
|
status: json["status"],
|
|
);
|
|
}
|