refactor pesantissimo dei Customer Files

This commit is contained in:
2026-04-23 11:20:34 +02:00
parent ba54267b77
commit 41f6d0dd43
25 changed files with 518 additions and 157 deletions

View File

@@ -7,7 +7,7 @@ class ServiceFileModel extends Equatable {
final DateTime? createdAt;
final String name;
final String extension;
final String url;
final String storagePath;
final String serviceId;
final int fileSize;
final Uint8List? localBytes;
@@ -17,7 +17,7 @@ class ServiceFileModel extends Equatable {
this.createdAt,
required this.name,
required this.extension,
required this.url,
required this.storagePath,
required this.serviceId,
required this.fileSize,
this.localBytes,
@@ -40,7 +40,7 @@ class ServiceFileModel extends Equatable {
DateTime? createdAt,
String? name,
String? extension,
String? url,
String? storagePath,
String? serviceId,
int? fileSize,
Uint8List? localBytes,
@@ -50,7 +50,7 @@ class ServiceFileModel extends Equatable {
createdAt: createdAt ?? this.createdAt,
name: name ?? this.name,
extension: extension ?? this.extension,
url: url ?? this.url,
storagePath: storagePath ?? this.storagePath,
serviceId: serviceId ?? this.serviceId,
fileSize: fileSize ?? this.fileSize,
localBytes: localBytes ?? this.localBytes,
@@ -65,7 +65,7 @@ class ServiceFileModel extends Equatable {
: null,
name: map['name'] ?? '',
extension: map['extension'] ?? '',
url: map['url'] ?? '',
storagePath: map['storage_path'] ?? '',
serviceId: map['service_id']?.toString() ?? '',
fileSize: map['file_size'] is int
? map['file_size']
@@ -78,7 +78,7 @@ class ServiceFileModel extends Equatable {
if (id != null) 'id': id,
'name': name,
'extension': extension,
'url': url,
'storage_path': storagePath,
'service_id': serviceId,
'file_size': fileSize,
};
@@ -90,7 +90,7 @@ class ServiceFileModel extends Equatable {
createdAt,
name,
extension,
url,
storagePath,
serviceId,
fileSize,
localBytes,