Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-05-03 12:05:47 +02:00
parent 4559db620d
commit 6bb65e8296
13 changed files with 832 additions and 815 deletions

View File

@@ -3,30 +3,30 @@ import 'package:flux/features/master_data/store/models/store_model.dart';
class ProviderModel extends Equatable {
final String? id;
final String nome;
final bool telefoniaFissa;
final bool telefoniaMobile;
final bool energia;
final bool assicurazioni;
final bool intrattenimento;
final bool finanziamenti;
final String name;
final bool landline;
final bool mobile;
final bool energy;
final bool insurance;
final bool entertainment;
final bool financing;
final bool telepass;
final bool altro;
final bool other;
final bool isActive;
final String companyId;
final List<StoreModel> associatedStores;
const ProviderModel({
this.id,
required this.nome,
required this.telefoniaFissa,
required this.telefoniaMobile,
required this.energia,
required this.assicurazioni,
required this.intrattenimento,
required this.finanziamenti,
required this.name,
required this.landline,
required this.mobile,
required this.energy,
required this.insurance,
required this.entertainment,
required this.financing,
required this.telepass,
required this.altro,
required this.other,
required this.isActive,
required this.companyId,
this.associatedStores = const [],
@@ -46,15 +46,15 @@ class ProviderModel extends Equatable {
}
return ProviderModel(
id: map['id'],
nome: map['nome'],
telefoniaFissa: map['telefonia_fissa'] ?? false,
telefoniaMobile: map['telefonia_mobile'] ?? false,
energia: map['energia'] ?? false,
assicurazioni: map['assicurazioni'] ?? false,
intrattenimento: map['intrattenimento'] ?? false,
finanziamenti: map['finanziamenti'] ?? false,
name: map['name'],
landline: map['landline'] ?? false,
mobile: map['mobile'] ?? false,
energy: map['energy'] ?? false,
insurance: map['insurance'] ?? false,
entertainment: map['entertainment'] ?? false,
financing: map['financing'] ?? false,
telepass: map['telepass'] ?? false,
altro: map['altro'] ?? false,
other: map['other'] ?? false,
isActive: map['is_active'] ?? true,
companyId: map['company_id'],
associatedStores: stores,
@@ -63,15 +63,15 @@ class ProviderModel extends Equatable {
Map<String, dynamic> toMap() {
final map = {
'nome': nome,
'telefonia_fissa': telefoniaFissa,
'telefonia_mobile': telefoniaMobile,
'energia': energia,
'assicurazioni': assicurazioni,
'intrattenimento': intrattenimento,
'finanziamenti': finanziamenti,
'name': name,
'landline': landline,
'mobile': mobile,
'energy': energy,
'insurance': insurance,
'entertainment': entertainment,
'financing': financing,
'telepass': telepass,
'altro': altro,
'other': other,
'is_active': isActive,
'company_id': companyId,
};
@@ -86,15 +86,15 @@ class ProviderModel extends Equatable {
@override
List<Object?> get props => [
id,
nome,
telefoniaFissa,
telefoniaMobile,
energia,
assicurazioni,
intrattenimento,
finanziamenti,
name,
landline,
mobile,
energy,
insurance,
entertainment,
financing,
telepass,
altro,
other,
isActive,
companyId,
associatedStores,
@@ -102,30 +102,30 @@ class ProviderModel extends Equatable {
ProviderModel copyWith({
String? id,
String? nome,
bool? telefoniaFissa,
bool? telefoniaMobile,
bool? energia,
bool? assicurazioni,
bool? intrattenimento,
bool? finanziamenti,
String? name,
bool? landline,
bool? mobile,
bool? energy,
bool? insurance,
bool? entertainment,
bool? financing,
bool? telepass,
bool? altro,
bool? other,
bool? isActive,
String? companyId,
List<StoreModel>? associatedStores,
}) {
return ProviderModel(
id: id ?? this.id,
nome: nome ?? this.nome,
telefoniaFissa: telefoniaFissa ?? this.telefoniaFissa,
telefoniaMobile: telefoniaMobile ?? this.telefoniaMobile,
energia: energia ?? this.energia,
assicurazioni: assicurazioni ?? this.assicurazioni,
intrattenimento: intrattenimento ?? this.intrattenimento,
finanziamenti: finanziamenti ?? this.finanziamenti,
name: name ?? this.name,
landline: landline ?? this.landline,
mobile: mobile ?? this.mobile,
energy: energy ?? this.energy,
insurance: insurance ?? this.insurance,
entertainment: entertainment ?? this.entertainment,
financing: financing ?? this.financing,
telepass: telepass ?? this.telepass,
altro: altro ?? this.altro,
other: other ?? this.other,
isActive: isActive ?? this.isActive,
companyId: companyId ?? this.companyId,
associatedStores: associatedStores ?? this.associatedStores,