refactor: save current workspace state including FinlyticAnalyzer fixes, FinlyticApp trade route alignment, and DTO audit documentation
This commit is contained in:
@@ -2,6 +2,7 @@ import 'package:equatable/equatable.dart';
|
||||
|
||||
class CorporateEventModel extends Equatable {
|
||||
final String id;
|
||||
final String isin;
|
||||
final String symbol;
|
||||
final String companyName;
|
||||
final String eventType;
|
||||
@@ -15,6 +16,7 @@ class CorporateEventModel extends Equatable {
|
||||
required this.eventType,
|
||||
required this.eventDate,
|
||||
required this.description,
|
||||
required this.isin,
|
||||
});
|
||||
|
||||
factory CorporateEventModel.fromJson(Map<String, dynamic> json) {
|
||||
@@ -25,7 +27,8 @@ class CorporateEventModel extends Equatable {
|
||||
if (str.contains('.')) {
|
||||
final parts = str.split('.');
|
||||
if (parts.length >= 3) {
|
||||
return DateTime(int.parse(parts[2]), int.parse(parts[1]), int.parse(parts[0]));
|
||||
return DateTime(
|
||||
int.parse(parts[2]), int.parse(parts[1]), int.parse(parts[0]));
|
||||
}
|
||||
}
|
||||
return DateTime.parse(str);
|
||||
@@ -36,17 +39,24 @@ class CorporateEventModel extends Equatable {
|
||||
|
||||
return CorporateEventModel(
|
||||
id: json['id']?.toString() ?? json['Id']?.toString() ?? '',
|
||||
isin: json['isin']?.toString() ?? json['Isin']?.toString() ?? '',
|
||||
symbol: json['symbol']?.toString() ?? json['Symbol']?.toString() ?? '',
|
||||
companyName: json['companyName']?.toString() ?? json['CompanyName']?.toString() ?? '',
|
||||
eventType: json['eventType']?.toString() ?? json['EventType']?.toString() ?? '',
|
||||
companyName: json['companyName']?.toString() ??
|
||||
json['CompanyName']?.toString() ??
|
||||
'',
|
||||
eventType:
|
||||
json['eventType']?.toString() ?? json['EventType']?.toString() ?? '',
|
||||
eventDate: parseDate(json['eventDate'] ?? json['EventDate']),
|
||||
description: json['description']?.toString() ?? json['Description']?.toString() ?? '',
|
||||
description: json['description']?.toString() ??
|
||||
json['Description']?.toString() ??
|
||||
'',
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
return {
|
||||
'id': id,
|
||||
'isin': isin,
|
||||
'symbol': symbol,
|
||||
'companyName': companyName,
|
||||
'eventType': eventType,
|
||||
@@ -56,5 +66,6 @@ class CorporateEventModel extends Equatable {
|
||||
}
|
||||
|
||||
@override
|
||||
List<Object?> get props => [id, symbol, companyName, eventType, eventDate, description];
|
||||
List<Object?> get props =>
|
||||
[id, symbol, companyName, eventType, eventDate, description];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user