mirror of
https://github.com/Mercantec-GHC/h4-projekt-gruppe-0-sm.git
synced 2025-04-28 16:54:06 +02:00
28 lines
638 B
Dart
28 lines
638 B
Dart
import 'package:mobile/models/coordinate.dart';
|
|
|
|
class Product {
|
|
final int id;
|
|
final String name;
|
|
final String description;
|
|
final int priceInDkkCents;
|
|
final Coordinate? location;
|
|
final String? barcode;
|
|
|
|
Product({
|
|
required this.id,
|
|
required this.name,
|
|
required this.priceInDkkCents,
|
|
required this.description,
|
|
this.location,
|
|
this.barcode,
|
|
});
|
|
|
|
Product.fromJson(Map<String, dynamic> json)
|
|
: id = json["id"],
|
|
name = json["name"],
|
|
description = json["description"],
|
|
priceInDkkCents = json["price_dkk_cent"],
|
|
location = null,
|
|
barcode = json["barcode"];
|
|
}
|