refactor: update data source and repository structure by removing unused files, enhancing model integration, and adjusting import paths for better organization

This commit is contained in:
2025-12-07 12:33:39 +03:30
parent c28a4a3177
commit 02686115cb
129 changed files with 5269 additions and 545 deletions

View File

@@ -18,6 +18,7 @@ abstract class SegmentationModel with _$SegmentationModel {
DateTime? date,
ToGuild? toGuild,
String? productionDate,
String? distributionType,
}) = _SegmentationModel;
factory SegmentationModel.fromJson(Map<String, dynamic> json) =>

View File

@@ -15,7 +15,7 @@ T _$identity<T>(T value) => value;
/// @nodoc
mixin _$SegmentationModel {
String? get key; String? get productKey; String? get guildKey; String? get result; String? get quota; String? get saleType; int? get weight; Buyer? get buyer; DateTime? get date; ToGuild? get toGuild; String? get productionDate;
String? get key; String? get productKey; String? get guildKey; String? get result; String? get quota; String? get saleType; int? get weight; Buyer? get buyer; DateTime? get date; ToGuild? get toGuild; String? get productionDate; String? get distributionType;
/// Create a copy of SegmentationModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@@ -28,16 +28,16 @@ $SegmentationModelCopyWith<SegmentationModel> get copyWith => _$SegmentationMode
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is SegmentationModel&&(identical(other.key, key) || other.key == key)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.guildKey, guildKey) || other.guildKey == guildKey)&&(identical(other.result, result) || other.result == result)&&(identical(other.quota, quota) || other.quota == quota)&&(identical(other.saleType, saleType) || other.saleType == saleType)&&(identical(other.weight, weight) || other.weight == weight)&&(identical(other.buyer, buyer) || other.buyer == buyer)&&(identical(other.date, date) || other.date == date)&&(identical(other.toGuild, toGuild) || other.toGuild == toGuild)&&(identical(other.productionDate, productionDate) || other.productionDate == productionDate));
return identical(this, other) || (other.runtimeType == runtimeType&&other is SegmentationModel&&(identical(other.key, key) || other.key == key)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.guildKey, guildKey) || other.guildKey == guildKey)&&(identical(other.result, result) || other.result == result)&&(identical(other.quota, quota) || other.quota == quota)&&(identical(other.saleType, saleType) || other.saleType == saleType)&&(identical(other.weight, weight) || other.weight == weight)&&(identical(other.buyer, buyer) || other.buyer == buyer)&&(identical(other.date, date) || other.date == date)&&(identical(other.toGuild, toGuild) || other.toGuild == toGuild)&&(identical(other.productionDate, productionDate) || other.productionDate == productionDate)&&(identical(other.distributionType, distributionType) || other.distributionType == distributionType));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,key,productKey,guildKey,result,quota,saleType,weight,buyer,date,toGuild,productionDate);
int get hashCode => Object.hash(runtimeType,key,productKey,guildKey,result,quota,saleType,weight,buyer,date,toGuild,productionDate,distributionType);
@override
String toString() {
return 'SegmentationModel(key: $key, productKey: $productKey, guildKey: $guildKey, result: $result, quota: $quota, saleType: $saleType, weight: $weight, buyer: $buyer, date: $date, toGuild: $toGuild, productionDate: $productionDate)';
return 'SegmentationModel(key: $key, productKey: $productKey, guildKey: $guildKey, result: $result, quota: $quota, saleType: $saleType, weight: $weight, buyer: $buyer, date: $date, toGuild: $toGuild, productionDate: $productionDate, distributionType: $distributionType)';
}
@@ -48,7 +48,7 @@ abstract mixin class $SegmentationModelCopyWith<$Res> {
factory $SegmentationModelCopyWith(SegmentationModel value, $Res Function(SegmentationModel) _then) = _$SegmentationModelCopyWithImpl;
@useResult
$Res call({
String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild, String? productionDate
String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild, String? productionDate, String? distributionType
});
@@ -65,7 +65,7 @@ class _$SegmentationModelCopyWithImpl<$Res>
/// Create a copy of SegmentationModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? key = freezed,Object? productKey = freezed,Object? guildKey = freezed,Object? result = freezed,Object? quota = freezed,Object? saleType = freezed,Object? weight = freezed,Object? buyer = freezed,Object? date = freezed,Object? toGuild = freezed,Object? productionDate = freezed,}) {
@pragma('vm:prefer-inline') @override $Res call({Object? key = freezed,Object? productKey = freezed,Object? guildKey = freezed,Object? result = freezed,Object? quota = freezed,Object? saleType = freezed,Object? weight = freezed,Object? buyer = freezed,Object? date = freezed,Object? toGuild = freezed,Object? productionDate = freezed,Object? distributionType = freezed,}) {
return _then(_self.copyWith(
key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
as String?,productKey: freezed == productKey ? _self.productKey : productKey // ignore: cast_nullable_to_non_nullable
@@ -78,6 +78,7 @@ as int?,buyer: freezed == buyer ? _self.buyer : buyer // ignore: cast_nullable_t
as Buyer?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
as DateTime?,toGuild: freezed == toGuild ? _self.toGuild : toGuild // ignore: cast_nullable_to_non_nullable
as ToGuild?,productionDate: freezed == productionDate ? _self.productionDate : productionDate // ignore: cast_nullable_to_non_nullable
as String?,distributionType: freezed == distributionType ? _self.distributionType : distributionType // ignore: cast_nullable_to_non_nullable
as String?,
));
}
@@ -187,10 +188,10 @@ return $default(_that);case _:
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild, String? productionDate)? $default,{required TResult orElse(),}) {final _that = this;
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild, String? productionDate, String? distributionType)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _SegmentationModel() when $default != null:
return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.quota,_that.saleType,_that.weight,_that.buyer,_that.date,_that.toGuild,_that.productionDate);case _:
return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.quota,_that.saleType,_that.weight,_that.buyer,_that.date,_that.toGuild,_that.productionDate,_that.distributionType);case _:
return orElse();
}
@@ -208,10 +209,10 @@ return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.quo
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild, String? productionDate) $default,) {final _that = this;
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild, String? productionDate, String? distributionType) $default,) {final _that = this;
switch (_that) {
case _SegmentationModel():
return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.quota,_that.saleType,_that.weight,_that.buyer,_that.date,_that.toGuild,_that.productionDate);case _:
return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.quota,_that.saleType,_that.weight,_that.buyer,_that.date,_that.toGuild,_that.productionDate,_that.distributionType);case _:
throw StateError('Unexpected subclass');
}
@@ -228,10 +229,10 @@ return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.quo
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild, String? productionDate)? $default,) {final _that = this;
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild, String? productionDate, String? distributionType)? $default,) {final _that = this;
switch (_that) {
case _SegmentationModel() when $default != null:
return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.quota,_that.saleType,_that.weight,_that.buyer,_that.date,_that.toGuild,_that.productionDate);case _:
return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.quota,_that.saleType,_that.weight,_that.buyer,_that.date,_that.toGuild,_that.productionDate,_that.distributionType);case _:
return null;
}
@@ -243,7 +244,7 @@ return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.quo
@JsonSerializable()
class _SegmentationModel implements SegmentationModel {
const _SegmentationModel({this.key, this.productKey, this.guildKey, this.result, this.quota, this.saleType, this.weight, this.buyer, this.date, this.toGuild, this.productionDate});
const _SegmentationModel({this.key, this.productKey, this.guildKey, this.result, this.quota, this.saleType, this.weight, this.buyer, this.date, this.toGuild, this.productionDate, this.distributionType});
factory _SegmentationModel.fromJson(Map<String, dynamic> json) => _$SegmentationModelFromJson(json);
@override final String? key;
@@ -257,6 +258,7 @@ class _SegmentationModel implements SegmentationModel {
@override final DateTime? date;
@override final ToGuild? toGuild;
@override final String? productionDate;
@override final String? distributionType;
/// Create a copy of SegmentationModel
/// with the given fields replaced by the non-null parameter values.
@@ -271,16 +273,16 @@ Map<String, dynamic> toJson() {
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SegmentationModel&&(identical(other.key, key) || other.key == key)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.guildKey, guildKey) || other.guildKey == guildKey)&&(identical(other.result, result) || other.result == result)&&(identical(other.quota, quota) || other.quota == quota)&&(identical(other.saleType, saleType) || other.saleType == saleType)&&(identical(other.weight, weight) || other.weight == weight)&&(identical(other.buyer, buyer) || other.buyer == buyer)&&(identical(other.date, date) || other.date == date)&&(identical(other.toGuild, toGuild) || other.toGuild == toGuild)&&(identical(other.productionDate, productionDate) || other.productionDate == productionDate));
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SegmentationModel&&(identical(other.key, key) || other.key == key)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.guildKey, guildKey) || other.guildKey == guildKey)&&(identical(other.result, result) || other.result == result)&&(identical(other.quota, quota) || other.quota == quota)&&(identical(other.saleType, saleType) || other.saleType == saleType)&&(identical(other.weight, weight) || other.weight == weight)&&(identical(other.buyer, buyer) || other.buyer == buyer)&&(identical(other.date, date) || other.date == date)&&(identical(other.toGuild, toGuild) || other.toGuild == toGuild)&&(identical(other.productionDate, productionDate) || other.productionDate == productionDate)&&(identical(other.distributionType, distributionType) || other.distributionType == distributionType));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,key,productKey,guildKey,result,quota,saleType,weight,buyer,date,toGuild,productionDate);
int get hashCode => Object.hash(runtimeType,key,productKey,guildKey,result,quota,saleType,weight,buyer,date,toGuild,productionDate,distributionType);
@override
String toString() {
return 'SegmentationModel(key: $key, productKey: $productKey, guildKey: $guildKey, result: $result, quota: $quota, saleType: $saleType, weight: $weight, buyer: $buyer, date: $date, toGuild: $toGuild, productionDate: $productionDate)';
return 'SegmentationModel(key: $key, productKey: $productKey, guildKey: $guildKey, result: $result, quota: $quota, saleType: $saleType, weight: $weight, buyer: $buyer, date: $date, toGuild: $toGuild, productionDate: $productionDate, distributionType: $distributionType)';
}
@@ -291,7 +293,7 @@ abstract mixin class _$SegmentationModelCopyWith<$Res> implements $SegmentationM
factory _$SegmentationModelCopyWith(_SegmentationModel value, $Res Function(_SegmentationModel) _then) = __$SegmentationModelCopyWithImpl;
@override @useResult
$Res call({
String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild, String? productionDate
String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild, String? productionDate, String? distributionType
});
@@ -308,7 +310,7 @@ class __$SegmentationModelCopyWithImpl<$Res>
/// Create a copy of SegmentationModel
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? key = freezed,Object? productKey = freezed,Object? guildKey = freezed,Object? result = freezed,Object? quota = freezed,Object? saleType = freezed,Object? weight = freezed,Object? buyer = freezed,Object? date = freezed,Object? toGuild = freezed,Object? productionDate = freezed,}) {
@override @pragma('vm:prefer-inline') $Res call({Object? key = freezed,Object? productKey = freezed,Object? guildKey = freezed,Object? result = freezed,Object? quota = freezed,Object? saleType = freezed,Object? weight = freezed,Object? buyer = freezed,Object? date = freezed,Object? toGuild = freezed,Object? productionDate = freezed,Object? distributionType = freezed,}) {
return _then(_SegmentationModel(
key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
as String?,productKey: freezed == productKey ? _self.productKey : productKey // ignore: cast_nullable_to_non_nullable
@@ -321,6 +323,7 @@ as int?,buyer: freezed == buyer ? _self.buyer : buyer // ignore: cast_nullable_t
as Buyer?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
as DateTime?,toGuild: freezed == toGuild ? _self.toGuild : toGuild // ignore: cast_nullable_to_non_nullable
as ToGuild?,productionDate: freezed == productionDate ? _self.productionDate : productionDate // ignore: cast_nullable_to_non_nullable
as String?,distributionType: freezed == distributionType ? _self.distributionType : distributionType // ignore: cast_nullable_to_non_nullable
as String?,
));
}

View File

@@ -25,6 +25,7 @@ _SegmentationModel _$SegmentationModelFromJson(Map<String, dynamic> json) =>
? null
: ToGuild.fromJson(json['to_guild'] as Map<String, dynamic>),
productionDate: json['production_date'] as String?,
distributionType: json['distribution_type'] as String?,
);
Map<String, dynamic> _$SegmentationModelToJson(_SegmentationModel instance) =>
@@ -40,6 +41,7 @@ Map<String, dynamic> _$SegmentationModelToJson(_SegmentationModel instance) =>
'date': instance.date?.toIso8601String(),
'to_guild': instance.toGuild,
'production_date': instance.productionDate,
'distribution_type': instance.distributionType,
};
_Buyer _$BuyerFromJson(Map<String, dynamic> json) => _Buyer(