-
Notifications
You must be signed in to change notification settings - Fork 117
Expand file tree
/
Copy pathshopinbit_ticket.dart
More file actions
56 lines (47 loc) · 1.49 KB
/
Copy pathshopinbit_ticket.dart
File metadata and controls
56 lines (47 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import 'package:isar_community/isar.dart';
import '../../shopinbit/shopinbit_order_model.dart';
part 'shopinbit_ticket.g.dart';
@collection
class ShopInBitTicket {
Id id = Isar.autoIncrement;
@Index(unique: true, replace: true)
late String ticketId;
late String displayName;
@enumerated
late ShopInBitCategory category;
@enumerated
late ShopInBitOrderStatus status;
// Raw API state string (e.g. "OFFER AVAILABLE") preserved alongside the
// mapped enum. If ShopinBit renames a state or adds a new one, the enum
// will read as `pending` but `statusRaw` retains the canonical string so a
// future client update can re-derive the correct status via migration.
String? statusRaw;
late String requestDescription;
late String deliveryCountry;
late String? offerProductName;
late String? offerPrice;
late String shippingName;
late String shippingStreet;
late String shippingCity;
late String shippingPostalCode;
late String shippingCountry;
late String? paymentMethod;
late List<ShopInBitTicketMessage> messages;
late DateTime createdAt;
late int apiTicketId;
// Car research retry support
String? carResearchInvoiceId;
String? feeTicketNumber;
late bool needsCreateRequest;
// Car research resumable payment state
late bool isPendingPayment;
DateTime? carResearchExpiresAt;
String? carResearchPaymentLinks;
}
@embedded
class ShopInBitTicketMessage {
late String text;
late DateTime timestamp;
late bool isFromUser;
ShopInBitTicketMessage();
}