rinominati i campi in inglese per diminuire confusione

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-05-03 10:30:09 +02:00
parent 4580173edf
commit 4559db620d
13 changed files with 156 additions and 156 deletions

View File

@@ -4,30 +4,30 @@ import 'package:flux/features/master_data/staff/models/staff_member_model.dart';
class StoreModel extends Equatable {
final String? id;
final String nome;
final String name;
final String companyId;
final bool isActive;
final bool isPaid;
final DateTime? paymentExpiration;
final String indirizzo;
final String cap;
final String comune;
final String provincia;
final String address;
final String zipCode;
final String city;
final String province;
final List<ProviderModel> associatedProviders; // Provider associati
final List<StaffMemberModel>
associatedStaffMembers; // Membri dello staff associati
const StoreModel({
this.id,
required this.nome,
required this.name,
required this.companyId,
this.isActive = true,
this.isPaid = false,
this.paymentExpiration,
required this.indirizzo,
required this.cap,
required this.comune,
required this.provincia,
required this.address,
required this.zipCode,
required this.city,
required this.province,
this.associatedProviders = const [],
this.associatedStaffMembers = const [],
});
@@ -36,15 +36,15 @@ class StoreModel extends Equatable {
@override
List<Object?> get props => [
id,
nome,
name,
companyId,
isActive,
isPaid,
paymentExpiration,
indirizzo,
cap,
comune,
provincia,
address,
zipCode,
city,
province,
associatedProviders,
associatedStaffMembers,
];
@@ -52,29 +52,29 @@ class StoreModel extends Equatable {
// Il mitico copyWith per creare nuove istanze modificando solo ciò che serve
StoreModel copyWith({
String? id,
String? nome,
String? name,
String? companyId,
bool? isActive,
bool? isPaid,
DateTime? paymentExpiration,
String? indirizzo,
String? cap,
String? comune,
String? provincia,
String? address,
String? zipCode,
String? city,
String? province,
List<ProviderModel>? associatedProviders,
List<StaffMemberModel>? associatedStaffMembers,
}) {
return StoreModel(
id: id ?? this.id,
nome: nome ?? this.nome,
name: name ?? this.name,
companyId: companyId ?? this.companyId,
isActive: isActive ?? this.isActive,
isPaid: isPaid ?? this.isPaid,
paymentExpiration: paymentExpiration ?? this.paymentExpiration,
indirizzo: indirizzo ?? this.indirizzo,
cap: cap ?? this.cap,
comune: comune ?? this.comune,
provincia: provincia ?? this.provincia,
address: address ?? this.address,
zipCode: zipCode ?? this.zipCode,
city: city ?? this.city,
province: province ?? this.province,
associatedProviders: associatedProviders ?? this.associatedProviders,
associatedStaffMembers:
associatedStaffMembers ?? this.associatedStaffMembers,
@@ -83,12 +83,12 @@ class StoreModel extends Equatable {
factory StoreModel.empty() {
return const StoreModel(
nome: '',
name: '',
companyId: '',
indirizzo: '',
cap: '',
comune: '',
provincia: '',
address: '',
zipCode: '',
city: '',
province: '',
);
}
@@ -118,17 +118,17 @@ class StoreModel extends Equatable {
}
return StoreModel(
id: map['id'] as String,
nome: map['nome'],
name: map['name'],
companyId: map['company_id'] as String,
isActive: map['is_active'] ?? true,
isPaid: map['is_paid'] ?? false,
paymentExpiration: map['payment_expiration'] != null
? DateTime.parse(map['payment_expiration'])
: null,
indirizzo: map['indirizzo'],
cap: map['cap'],
comune: map['comune'],
provincia: map['provincia'],
address: map['address'],
zipCode: map['zip_code'],
city: map['city'],
province: map['province'],
associatedProviders: providers,
associatedStaffMembers: staffMembers,
);
@@ -137,16 +137,16 @@ class StoreModel extends Equatable {
Map<String, dynamic> toMap() {
return {
if (id != null) 'id': id,
'nome': nome,
'name': name,
'company_id': companyId,
'is_active': isActive,
'is_paid': isPaid,
if (paymentExpiration != null)
'payment_expiration': paymentExpiration!.toIso8601String(),
'indirizzo': indirizzo,
'cap': cap,
'comune': comune,
'provincia': provincia,
'address': address,
'zip_code': zipCode,
'city': city,
'province': province,
};
}
}