aggiunta scelta business o privato
This commit is contained in:
@@ -48,6 +48,7 @@ class OperationModel extends Equatable {
|
||||
final String? customerId;
|
||||
final CustomerModel? customer;
|
||||
final String reference;
|
||||
final bool isBusiness;
|
||||
|
||||
// ALLEGATI (Aggiunto)
|
||||
final List<AttachmentModel> attachments;
|
||||
@@ -78,6 +79,7 @@ class OperationModel extends Equatable {
|
||||
this.customer,
|
||||
this.reference = '',
|
||||
this.attachments = const [],
|
||||
this.isBusiness = false,
|
||||
});
|
||||
|
||||
OperationModel copyWith({
|
||||
@@ -106,6 +108,7 @@ class OperationModel extends Equatable {
|
||||
CustomerModel? customer,
|
||||
String? reference,
|
||||
List<AttachmentModel>? attachments,
|
||||
bool? isBusiness,
|
||||
}) => OperationModel(
|
||||
id: id ?? this.id,
|
||||
createdAt: createdAt ?? this.createdAt,
|
||||
@@ -132,6 +135,7 @@ class OperationModel extends Equatable {
|
||||
customer: customer ?? this.customer,
|
||||
reference: reference ?? this.reference,
|
||||
attachments: attachments ?? this.attachments,
|
||||
isBusiness: isBusiness ?? this.isBusiness,
|
||||
);
|
||||
|
||||
@override
|
||||
@@ -161,6 +165,7 @@ class OperationModel extends Equatable {
|
||||
customer,
|
||||
reference,
|
||||
attachments,
|
||||
isBusiness,
|
||||
];
|
||||
|
||||
factory OperationModel.empty() {
|
||||
@@ -221,6 +226,7 @@ class OperationModel extends Equatable {
|
||||
const [],
|
||||
|
||||
reference: map['reference'] as String? ?? '',
|
||||
isBusiness: map['is_business'] as bool? ?? false,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -245,6 +251,7 @@ class OperationModel extends Equatable {
|
||||
'status': status.supabaseName,
|
||||
if (customerId != null) 'customer_id': customerId,
|
||||
'reference': reference,
|
||||
'is_business': isBusiness,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user