Added first draft of login and tour select page
This commit is contained in:
15
lib/model/address.dart
Normal file
15
lib/model/address.dart
Normal file
@ -0,0 +1,15 @@
|
||||
class Address {
|
||||
String street;
|
||||
String housingNumber;
|
||||
String postalCode;
|
||||
String city;
|
||||
String country;
|
||||
|
||||
Address({
|
||||
required this.street,
|
||||
required this.housingNumber,
|
||||
required this.postalCode,
|
||||
required this.city,
|
||||
required this.country,
|
||||
});
|
||||
}
|
||||
31
lib/model/article.dart
Normal file
31
lib/model/article.dart
Normal file
@ -0,0 +1,31 @@
|
||||
class Article {
|
||||
String articleId;
|
||||
|
||||
/// The quantity of delivered gas cylinders.
|
||||
double quantity;
|
||||
|
||||
/// The price per cylinder in euros.
|
||||
double pricePerQuantity;
|
||||
|
||||
/// The price of the deposit in euros per cylinder.
|
||||
double depositPricePerQuantity;
|
||||
|
||||
/// The amount of cylinders delivered.
|
||||
double quantityDelivered;
|
||||
|
||||
/// The amount of cylinders returned by the customer.
|
||||
double quantityReturned;
|
||||
|
||||
/// The amount of cylinders left to be deposited.
|
||||
double quantityToDeposit;
|
||||
|
||||
Article({
|
||||
required this.articleId,
|
||||
required this.quantity,
|
||||
required this.pricePerQuantity,
|
||||
required this.depositPricePerQuantity,
|
||||
required this.quantityDelivered,
|
||||
required this.quantityReturned,
|
||||
required this.quantityToDeposit,
|
||||
});
|
||||
}
|
||||
7
lib/model/car.dart
Normal file
7
lib/model/car.dart
Normal file
@ -0,0 +1,7 @@
|
||||
class Car {
|
||||
String id;
|
||||
String carName;
|
||||
String? driverName;
|
||||
|
||||
Car({required this.id, required this.carName, this.driverName});
|
||||
}
|
||||
9
lib/model/customer.dart
Normal file
9
lib/model/customer.dart
Normal file
@ -0,0 +1,9 @@
|
||||
import 'address.dart';
|
||||
|
||||
class Customer {
|
||||
String name;
|
||||
String id;
|
||||
Address address;
|
||||
|
||||
Customer({required this.name, required this.address, required this.id});
|
||||
}
|
||||
19
lib/model/delivery.dart
Normal file
19
lib/model/delivery.dart
Normal file
@ -0,0 +1,19 @@
|
||||
import 'package:app_gaslieferung/model/receipt.dart';
|
||||
|
||||
enum PaymentMethod { creditCard, cash }
|
||||
|
||||
class Delivery {
|
||||
Receipt receipt;
|
||||
|
||||
DateTime? deliveredAt;
|
||||
DateTime? desiredDeliveryTime;
|
||||
String? driverInformation;
|
||||
|
||||
Delivery({
|
||||
required this.receipt,
|
||||
|
||||
this.desiredDeliveryTime,
|
||||
this.driverInformation,
|
||||
this.deliveredAt
|
||||
});
|
||||
}
|
||||
18
lib/model/receipt.dart
Normal file
18
lib/model/receipt.dart
Normal file
@ -0,0 +1,18 @@
|
||||
import 'package:app_gaslieferung/model/customer.dart';
|
||||
|
||||
import 'article.dart';
|
||||
|
||||
class Receipt {
|
||||
Customer customer;
|
||||
List<Article> articles;
|
||||
|
||||
double totalGrossPrice;
|
||||
double totalNetPrice;
|
||||
|
||||
Receipt({
|
||||
required this.articles,
|
||||
required this.customer,
|
||||
required this.totalGrossPrice,
|
||||
required this.totalNetPrice,
|
||||
});
|
||||
}
|
||||
18
lib/model/supplier.dart
Normal file
18
lib/model/supplier.dart
Normal file
@ -0,0 +1,18 @@
|
||||
import 'package:app_gaslieferung/model/address.dart';
|
||||
|
||||
import 'car.dart';
|
||||
|
||||
class Supplier {
|
||||
String id;
|
||||
String name;
|
||||
Address address;
|
||||
String? phoneNumber;
|
||||
List<Car> cars;
|
||||
|
||||
Supplier({
|
||||
required this.id,
|
||||
required this.name,
|
||||
required this.cars,
|
||||
required this.address,
|
||||
});
|
||||
}
|
||||
10
lib/model/tour.dart
Normal file
10
lib/model/tour.dart
Normal file
@ -0,0 +1,10 @@
|
||||
import 'supplier.dart';
|
||||
import 'delivery.dart';
|
||||
|
||||
class Tour {
|
||||
DateTime date;
|
||||
Supplier supplier;
|
||||
List<Delivery> deliveries;
|
||||
|
||||
Tour({required this.date, required this.deliveries, required this.supplier});
|
||||
}
|
||||
Reference in New Issue
Block a user