Compare commits
1 Commits
57704399b9
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 6644909827 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -17,6 +17,7 @@ migrate_working_dir/
|
||||
*.ipr
|
||||
*.iws
|
||||
*.lock
|
||||
.lock
|
||||
.idea/
|
||||
|
||||
# The .vscode folder contains launch configuration and tasks you configure in
|
||||
|
||||
@@ -1,193 +0,0 @@
|
||||
# راهنمای کاهش حجم اپلیکیشن Flutter
|
||||
|
||||
## چرا حجم اپ زیاد میشه؟
|
||||
|
||||
### 1. **Assets (تصاویر و آیکونها)**
|
||||
- هر فایل تصویر/آیکون که از Figma اضافه میکنید، مستقیماً به حجم اپ اضافه میشه
|
||||
- در حال حاضر شما **119 SVG** و **119 VEC** دارید (احتمالاً تکراری!)
|
||||
- همه assets در `pubspec.yaml` به صورت کلی اضافه شدن (`assets/icons/`)
|
||||
|
||||
### 2. **کد Dart**
|
||||
- خود کد Dart حجم کمی داره
|
||||
- اما dependencies و packages حجم زیادی اضافه میکنن
|
||||
- کدهای generate شده (freezed, json_serializable) هم حجم دارن
|
||||
|
||||
### 3. **مشکلات فعلی پروژه:**
|
||||
- ✅ **تکرار assets**: هم SVG و هم VEC دارید
|
||||
- ❌ **عدم بهینهسازی تصاویر**: PNG به جای WebP
|
||||
- ❌ **شامل شدن همه assets**: حتی اونایی که استفاده نمیشن
|
||||
|
||||
---
|
||||
|
||||
## راهحلها
|
||||
|
||||
### ✅ 1. حذف Assets تکراری
|
||||
|
||||
**مشکل**: شما هم `assets/icons/*.svg` و هم `assets/vec/*.svg.vec` دارید
|
||||
|
||||
**راهحل**:
|
||||
- اگر از VEC استفاده میکنید، SVG ها رو حذف کنید
|
||||
- یا برعکس، اگر SVG استفاده میکنید، VEC ها رو حذف کنید
|
||||
|
||||
### ✅ 2. بهینهسازی تصاویر
|
||||
|
||||
**قبل از اضافه کردن از Figma:**
|
||||
1. تصاویر رو به **WebP** تبدیل کنید (حجم 30-50% کمتر)
|
||||
2. از ابزارهای فشردهسازی استفاده کنید:
|
||||
- [TinyPNG](https://tinypng.com/) برای PNG
|
||||
- [Squoosh](https://squoosh.app/) برای همه فرمتها
|
||||
|
||||
**تبدیل PNG به WebP:**
|
||||
```bash
|
||||
# نصب cwebp (Google WebP tools)
|
||||
# سپس:
|
||||
cwebp -q 80 input.png -o output.webp
|
||||
```
|
||||
|
||||
### ✅ 3. حذف Assets استفاده نشده
|
||||
|
||||
**استفاده از ابزار:**
|
||||
```bash
|
||||
# نصب flutter_unused_assets
|
||||
dart pub global activate flutter_unused_assets
|
||||
|
||||
# بررسی assets استفاده نشده
|
||||
flutter_unused_assets
|
||||
```
|
||||
|
||||
### ✅ 4. بهینهسازی pubspec.yaml
|
||||
|
||||
**به جای:**
|
||||
```yaml
|
||||
assets:
|
||||
- assets/icons/ # همه فایلها
|
||||
- assets/images/
|
||||
```
|
||||
|
||||
**استفاده کنید:**
|
||||
```yaml
|
||||
assets:
|
||||
- assets/icons/add.svg # فقط فایلهای استفاده شده
|
||||
- assets/icons/home.svg
|
||||
- assets/images/inner_splash.webp
|
||||
```
|
||||
|
||||
### ✅ 5. استفاده از Asset Variants
|
||||
|
||||
برای تصاویر بزرگ، از variants استفاده کنید:
|
||||
```
|
||||
assets/images/
|
||||
splash.png # برای density 1.0
|
||||
2.0x/splash.png # برای density 2.0
|
||||
3.0x/splash.png # برای density 3.0
|
||||
```
|
||||
|
||||
### ✅ 6. Lazy Loading برای Assets بزرگ
|
||||
|
||||
برای تصاویر بزرگ که همیشه استفاده نمیشن:
|
||||
```dart
|
||||
// به جای Image.asset
|
||||
FutureBuilder(
|
||||
future: rootBundle.load('assets/images/large_image.webp'),
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.hasData) {
|
||||
return Image.memory(snapshot.data!);
|
||||
}
|
||||
return CircularProgressIndicator();
|
||||
},
|
||||
)
|
||||
```
|
||||
|
||||
### ✅ 7. بهینهسازی Build
|
||||
|
||||
در `android/app/build.gradle.kts` شما این تنظیمات رو دارید (خوبه!):
|
||||
```kotlin
|
||||
isMinifyEnabled = true
|
||||
isShrinkResources = true
|
||||
```
|
||||
|
||||
اما میتونید اضافه کنید:
|
||||
```kotlin
|
||||
buildTypes {
|
||||
release {
|
||||
// ...
|
||||
// اضافه کردن این خط:
|
||||
isDebuggable = false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## چکلیست قبل از اضافه کردن Asset از Figma
|
||||
|
||||
- [ ] آیا این asset قبلاً وجود داره؟
|
||||
- [ ] آیا واقعاً نیاز به این asset دارم؟
|
||||
- [ ] آیا میتونم از asset موجود استفاده کنم؟
|
||||
- [ ] آیا تصویر رو به WebP تبدیل کردم؟
|
||||
- [ ] آیا تصویر رو فشرده کردم؟
|
||||
- [ ] آیا فقط فایلهای لازم رو به pubspec.yaml اضافه کردم؟
|
||||
|
||||
---
|
||||
|
||||
## ابزارهای مفید
|
||||
|
||||
1. **بررسی حجم اپ:**
|
||||
```bash
|
||||
flutter build apk --analyze-size
|
||||
```
|
||||
|
||||
2. **بررسی Assets استفاده نشده:**
|
||||
```bash
|
||||
flutter_unused_assets
|
||||
```
|
||||
|
||||
3. **فشردهسازی تصاویر:**
|
||||
- [TinyPNG](https://tinypng.com/)
|
||||
- [Squoosh](https://squoosh.app/)
|
||||
- [ImageOptim](https://imageoptim.com/)
|
||||
|
||||
4. **تبدیل فرمت:**
|
||||
- PNG → WebP: [CloudConvert](https://cloudconvert.com/)
|
||||
- SVG → Optimized SVG: [SVGOMG](https://jakearchibald.github.io/svgomg/)
|
||||
|
||||
---
|
||||
|
||||
## نکات مهم
|
||||
|
||||
1. **همیشه از WebP استفاده کنید** به جای PNG/JPG (حجم 30-50% کمتر)
|
||||
2. **SVG ها رو optimize کنید** قبل از اضافه کردن
|
||||
3. **Assets استفاده نشده رو حذف کنید** به صورت منظم
|
||||
4. **از Asset Variants استفاده کنید** برای تصاویر با resolution بالا
|
||||
5. **Build Release رو بررسی کنید** نه Debug (Debug حجم بیشتری داره)
|
||||
|
||||
---
|
||||
|
||||
## مثال: کاهش حجم
|
||||
|
||||
**قبل:**
|
||||
- 119 SVG × 10KB = ~1.2 MB
|
||||
- 119 VEC × 8KB = ~950 KB
|
||||
- **جمع: ~2.15 MB فقط برای آیکونها!**
|
||||
|
||||
**بعد از بهینهسازی:**
|
||||
- حذف تکرار: فقط 119 فایل = ~1 MB
|
||||
- بهینهسازی SVG: ~500 KB
|
||||
- **صرفهجویی: ~1.65 MB!**
|
||||
|
||||
---
|
||||
|
||||
## سوالات متداول
|
||||
|
||||
**Q: چرا با اضافه کردن 50 صفحه Dart حجم زیاد میشه؟**
|
||||
A: خود کد Dart حجم کمی داره، اما:
|
||||
- Dependencies جدید اضافه میشن
|
||||
- Assets جدید برای صفحات اضافه میشن
|
||||
- Build artifacts بیشتر میشن
|
||||
|
||||
**Q: آیا باید همه assets رو حذف کنم؟**
|
||||
A: نه! فقط اونایی که استفاده نمیشن رو حذف کنید.
|
||||
|
||||
**Q: چطور بفهمم کدوم assets استفاده نمیشن؟**
|
||||
A: از `flutter_unused_assets` استفاده کنید یا به صورت دستی جستجو کنید.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
sdk.dir=C:\\Users\\Housh11\\AppData\\Local\\Android\\sdk
|
||||
flutter.sdk=C:\\src\\flutter
|
||||
flutter.buildMode=debug
|
||||
flutter.versionName=1.3.41
|
||||
flutter.versionCode=37
|
||||
flutter.buildMode=release
|
||||
flutter.versionName=1.3.34
|
||||
flutter.versionCode=31
|
||||
@@ -1,6 +1,4 @@
|
||||
description: This file stores settings for Dart & Flutter DevTools.
|
||||
documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states
|
||||
extensions:
|
||||
- hive_ce: true
|
||||
- provider: true
|
||||
- shared_preferences: true
|
||||
- hive_ce: true
|
||||
@@ -1,6 +1,6 @@
|
||||
import 'package:rasadyar_app/presentation/routes/app_pages.dart';
|
||||
import 'package:rasadyar_chicken/data/di/chicken_di.dart';
|
||||
import 'package:rasadyar_chicken/features/steward/presentation/routes/routes.dart';
|
||||
import 'package:rasadyar_chicken/presentation/routes/routes.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
import 'package:rasadyar_inspection/injection/inspection_di.dart';
|
||||
import 'package:rasadyar_inspection/inspection.dart';
|
||||
@@ -22,7 +22,7 @@ Future<void> seedTargetPage() async {
|
||||
functions: ["setupLiveStockDI"],
|
||||
),
|
||||
TargetPage(
|
||||
route: StewardRoutes.initSteward,
|
||||
route: ChickenRoutes.initSteward,
|
||||
module: Module.chicken,
|
||||
functions: ["setupChickenDI"],
|
||||
),
|
||||
|
||||
@@ -94,15 +94,15 @@ class ModulesLogic extends GetxController {
|
||||
|
||||
void _goToModule(Module module, int index) async {
|
||||
selectedIndex.value = index;
|
||||
await Future.delayed(Duration(milliseconds: 100));
|
||||
await Future.delayed(Duration(milliseconds: 300));
|
||||
selectedIndex.value = null;
|
||||
|
||||
// saveModule(module);
|
||||
await navigateToModule(module);
|
||||
}
|
||||
|
||||
Future<void> navigateToModule(Module module) async {
|
||||
var target = getAuthTargetPage(module).entries.first;
|
||||
|
||||
|
||||
if (target.value?[0] != null) {
|
||||
isLoading.value = !isLoading.value;
|
||||
await target.value?[0]?.call();
|
||||
|
||||
@@ -35,15 +35,9 @@ class SplashLogic extends GetxController with GetTickerProviderStateMixin {
|
||||
duration: const Duration(milliseconds: 8000),
|
||||
);
|
||||
|
||||
scaleAnimation.value = Tween<double>(
|
||||
begin: 0.8,
|
||||
end: 1.2,
|
||||
).animate(scaleController);
|
||||
scaleAnimation.value = Tween<double>(begin: 0.8, end: 1.2).animate(scaleController);
|
||||
|
||||
rotationAnimation.value = Tween<double>(
|
||||
begin: 0.0,
|
||||
end: 1,
|
||||
).animate(rotateController);
|
||||
rotationAnimation.value = Tween<double>(begin: 0.0, end: 1).animate(rotateController);
|
||||
|
||||
rotateController.forward();
|
||||
rotateController.addStatusListener((status) {
|
||||
@@ -191,9 +185,7 @@ class SplashLogic extends GetxController with GetTickerProviderStateMixin {
|
||||
try {
|
||||
final info = await PackageInfo.fromPlatform();
|
||||
int version = info.version.versionNumber;
|
||||
var res = await _dio.get(
|
||||
"https://rsibackend.rasadyar.com/app/rasadyar-app-info/",
|
||||
);
|
||||
var res = await _dio.get("https://rsibackend.rasadyar.com/app/rasadyar-app-info/");
|
||||
|
||||
appInfoModel = AppInfoModel.fromJson(res.data);
|
||||
|
||||
@@ -252,9 +244,7 @@ class SplashLogic extends GetxController with GetTickerProviderStateMixin {
|
||||
Future<void> installApk() async {
|
||||
try {
|
||||
eLog(_updateFilePath.value);
|
||||
await platform.invokeMethod('apk_installer', {
|
||||
'appPath': _updateFilePath.value,
|
||||
});
|
||||
await platform.invokeMethod('apk_installer', {'appPath': _updateFilePath.value});
|
||||
} catch (e) {
|
||||
eLog(e);
|
||||
}
|
||||
|
||||
74
output.json
74
output.json
@@ -1,74 +0,0 @@
|
||||
{
|
||||
"lat": 35.8245784,
|
||||
"log": 50.9479516,
|
||||
"hatching_id": 4560,
|
||||
"role": "SuperAdmin",
|
||||
"report_information": {
|
||||
"general_condition_hall": {
|
||||
"images": [
|
||||
"https://s3.rasadyar.com/rasadyar/202512141551550.jpg",
|
||||
"https://s3.rasadyar.com/rasadyar/202512141551560.jpg"
|
||||
],
|
||||
"health_status": "عالی",
|
||||
"ventilation_status": "عالی",
|
||||
"bed_condition": "خشک",
|
||||
"temperature": 25,
|
||||
"drinking_water_source": null,
|
||||
"drinking_water_quality": null
|
||||
},
|
||||
"casualties": {
|
||||
"normal_losses": null,
|
||||
"abnormal_losses": null,
|
||||
"source_of_hatching": null,
|
||||
"cause_abnormal_losses": null,
|
||||
"type_disease": null,
|
||||
"sampling_done": null,
|
||||
"type_sampling": null,
|
||||
"images": null
|
||||
},
|
||||
"technical_officer": {
|
||||
"technical_health_officer": "",
|
||||
"technical_engineering_officer": ""
|
||||
},
|
||||
"input_status": {
|
||||
"input_status": null,
|
||||
"company_name": null,
|
||||
"tracking_code": "",
|
||||
"type_of_grain": null,
|
||||
"inventory_in_warehouse": "",
|
||||
"inventory_until_visit": "",
|
||||
"grade_grain": null,
|
||||
"images": null
|
||||
},
|
||||
"infrastructure_energy": {
|
||||
"generator_type": "",
|
||||
"generator_model": "",
|
||||
"generator_count": "",
|
||||
"generator_capacity": "",
|
||||
"fuel_type": null,
|
||||
"generator_performance": null,
|
||||
"emergency_fuel_inventory": "",
|
||||
"has_power_cut_history": null,
|
||||
"power_cut_duration": "",
|
||||
"power_cut_hour": "",
|
||||
"additional_notes": ""
|
||||
},
|
||||
"hr": {
|
||||
"number_employed": null,
|
||||
"number_indigenous": null,
|
||||
"number_non_indigenous": null,
|
||||
"contract_status": null,
|
||||
"trained": null
|
||||
},
|
||||
"facilities": {
|
||||
"has_facilities": null,
|
||||
"type_of_facility": null,
|
||||
"amount": null,
|
||||
"date": null,
|
||||
"repayment_status": null,
|
||||
"request_facilities": null
|
||||
},
|
||||
"inspection_status": "تایید شده",
|
||||
"inspection_notes": "تست"
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,4 @@
|
||||
description: This file stores settings for Dart & Flutter DevTools.
|
||||
documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states
|
||||
extensions:
|
||||
- hive_ce: true
|
||||
- provider: true
|
||||
- shared_preferences: true
|
||||
- hive_ce: true
|
||||
@@ -1,12 +1,3 @@
|
||||
import 'package:rasadyar_chicken/features/city_jahad/presentation/routes/routes.dart';
|
||||
import 'package:rasadyar_chicken/features/poultry_science/presentation/routes/routes.dart';
|
||||
import 'package:rasadyar_chicken/features/province_inspector/presentation/routes/routes.dart';
|
||||
import 'package:rasadyar_chicken/features/province_operator/presentation/routes/routes.dart';
|
||||
import 'package:rasadyar_chicken/features/province_supervisor/presentation/routes/routes.dart';
|
||||
import 'package:rasadyar_chicken/features/steward/presentation/routes/routes.dart';
|
||||
import 'package:rasadyar_chicken/features/super_admin/presentation/routes/routes.dart';
|
||||
import 'package:rasadyar_chicken/features/jahad/presentation/routes/routes.dart';
|
||||
import 'package:rasadyar_chicken/features/vet_farm/presentation/routes/routes.dart';
|
||||
import 'package:rasadyar_chicken/presentation/routes/routes.dart';
|
||||
|
||||
String getFaUserRole(String? role) {
|
||||
@@ -97,7 +88,7 @@ Map<String, String?> getFaUserRoleWithOnTap(String? role) {
|
||||
case "Poultry":
|
||||
return {"مرغدار": null};
|
||||
case "ProvinceOperator":
|
||||
return {"مدیر اجرایی": ProvinceOperatorRoutes.initProvinceOperator};
|
||||
return {"مدیر اجرایی": null};
|
||||
case "ProvinceFinancial":
|
||||
return {"مالی اتحادیه": null};
|
||||
case "KillHouse":
|
||||
@@ -105,17 +96,17 @@ Map<String, String?> getFaUserRoleWithOnTap(String? role) {
|
||||
case "KillHouseVet":
|
||||
return {"دامپزشک کشتارگاه": null};
|
||||
case "VetFarm":
|
||||
return {"دامپزشک فارم": VetFarmRoutes.initVetFarm};
|
||||
return {"دامپزشک فارم": null};
|
||||
case "Driver":
|
||||
return {"راننده": null};
|
||||
case "ProvinceInspector":
|
||||
return {"بازرس اتحادیه": ProvinceInspectorRoutes.initProvinceInspector};
|
||||
return {"بازرس اتحادیه": null};
|
||||
case "VetSupervisor":
|
||||
return {"دامپزشک کل": null};
|
||||
case "Jahad":
|
||||
return {"جهاد کشاورزی استان": JahadRoutes.initJahad};
|
||||
return {"جهاد کشاورزی استان": null};
|
||||
case "CityJahad":
|
||||
return {"جهاد کشاورزی شهرستان": CityJahadRoutes.initCityJahad};
|
||||
return {"جهاد کشاورزی شهرستان": null};
|
||||
case "ProvincialGovernment":
|
||||
return {"استانداری": null};
|
||||
case "Guilds":
|
||||
@@ -131,7 +122,7 @@ Map<String, String?> getFaUserRoleWithOnTap(String? role) {
|
||||
case "Observatory":
|
||||
return {"رصدخانه": null};
|
||||
case "ProvinceSupervisor":
|
||||
return {"ناظر استان": ProvinceSupervisorRoutes.initProvinceSupervisor};
|
||||
return {"ناظر استان": null};
|
||||
case "GuildRoom":
|
||||
return {"اتاق اصناف": null};
|
||||
case "PosCompany":
|
||||
@@ -139,7 +130,7 @@ Map<String, String?> getFaUserRoleWithOnTap(String? role) {
|
||||
case "LiveStockSupport":
|
||||
return {"پشتیبانی امور دام": null};
|
||||
case "SuperAdmin":
|
||||
return {"ادمین کل": SuperAdminRoutes.initSuperAdmin};
|
||||
return {"ادمین کل": null};
|
||||
case "ChainCompany":
|
||||
return {"شرکت زنجیره": null};
|
||||
case "AdminX":
|
||||
@@ -159,9 +150,9 @@ Map<String, String?> getFaUserRoleWithOnTap(String? role) {
|
||||
case "LiveStockProvinceJahad":
|
||||
return {"جهاد استان": null};
|
||||
case "Steward":
|
||||
return {"مباشر": StewardRoutes.initSteward};
|
||||
return {"مباشر": ChickenRoutes.initSteward};
|
||||
case "PoultryScience":
|
||||
return {"کارشناس طیور": PoultryScienceRoutes.initPoultryScience};
|
||||
return {"کارشناس طیور": ChickenRoutes.initPoultryScience};
|
||||
default:
|
||||
return {"نامشخص": null};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import 'package:rasadyar_chicken/features/common/data/model/local/widely_used_local_model.dart';
|
||||
import 'package:rasadyar_chicken/data/models/local/widely_used_local_model.dart';
|
||||
|
||||
abstract class ChickenLocalDataSource {
|
||||
Future<void> openBox();
|
||||
@@ -1,5 +1,4 @@
|
||||
import 'package:rasadyar_chicken/features/common/data/model/local/widely_used_local_model.dart';
|
||||
import 'package:rasadyar_chicken/features/steward/presentation/routes/routes.dart';
|
||||
import 'package:rasadyar_chicken/data/models/local/widely_used_local_model.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
import 'chicken_local.dart';
|
||||
@@ -23,7 +22,7 @@ class ChickenLocalDataSourceImp implements ChickenLocalDataSource {
|
||||
color: AppColor.greenLightActive.toARGB32(),
|
||||
iconColor: AppColor.greenNormal.toARGB32(),
|
||||
iconPath: Assets.vec.cubeSearchSvg.path,
|
||||
path: StewardRoutes.buysInProvinceSteward,
|
||||
path: ChickenRoutes.buysInProvinceSteward,
|
||||
),
|
||||
WidelyUsedLocalItem(
|
||||
index: 1,
|
||||
@@ -32,7 +31,7 @@ class ChickenLocalDataSourceImp implements ChickenLocalDataSource {
|
||||
color: AppColor.blueLightActive.toARGB32(),
|
||||
iconColor: AppColor.blueNormal.toARGB32(),
|
||||
iconPath: Assets.vec.cubeSvg.path,
|
||||
path: StewardRoutes.salesInProvinceSteward,
|
||||
path: ChickenRoutes.salesInProvinceSteward,
|
||||
),
|
||||
|
||||
WidelyUsedLocalItem(
|
||||
@@ -41,7 +40,7 @@ class ChickenLocalDataSourceImp implements ChickenLocalDataSource {
|
||||
color: AppColor.blueLightActive.toARGB32(),
|
||||
iconColor: AppColor.blueNormal.toARGB32(),
|
||||
iconPath: Assets.vec.cubeRotateSvg.path,
|
||||
path: StewardRoutes.buysInProvinceSteward,
|
||||
path: ChickenRoutes.buysInProvinceSteward,
|
||||
),
|
||||
]; */
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
import 'package:rasadyar_chicken/features/common/data/model/response/user_info/user_info_model.dart';
|
||||
import 'package:rasadyar_chicken/features/common/data/model/response/user_profile_model/user_profile_model.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/user_info/user_info_model.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/user_profile_model/user_profile_model.dart';
|
||||
|
||||
abstract class AuthRemoteDataSource {
|
||||
Future<UserProfileModel?> login({required Map<String, dynamic> authRequest});
|
||||
@@ -11,6 +11,6 @@ abstract class AuthRemoteDataSource {
|
||||
|
||||
Future<UserInfoModel?> getUserInfo(String phoneNumber);
|
||||
|
||||
|
||||
/// Calls `/steward-app-login/` endpoint with required token and `server` as query param, plus optional extra query parameters.
|
||||
Future<void> stewardAppLogin({required String token, Map<String, dynamic>? queryParameters});
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:rasadyar_chicken/features/common/data/model/response/user_info/user_info_model.dart';
|
||||
import 'package:rasadyar_chicken/features/common/data/model/response/user_profile_model/user_profile_model.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/user_info/user_info_model.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/user_profile_model/user_profile_model.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
import 'auth_remote.dart';
|
||||
@@ -0,0 +1,180 @@
|
||||
import 'package:rasadyar_chicken/data/models/request/change_password/change_password_request_model.dart';
|
||||
import 'package:rasadyar_chicken/data/models/request/conform_allocation/conform_allocation.dart';
|
||||
import 'package:rasadyar_chicken/data/models/request/create_steward_free_bar/create_steward_free_bar.dart';
|
||||
import 'package:rasadyar_chicken/data/models/request/steward_free_sale_bar/steward_free_sale_bar_request.dart';
|
||||
import 'package:rasadyar_chicken/data/models/request/submit_steward_allocation/submit_steward_allocation.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/allocated_made/allocated_made.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/bar_information/bar_information.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/broadcast_price/broadcast_price.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/dashboard_kill_house_free_bar/dashboard_kill_house_free_bar.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/guild/guild_model.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/guild_profile/guild_profile.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/imported_loads_model/imported_loads_model.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/inventory/inventory_model.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/iran_province_city/iran_province_city_model.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/kill_house_distribution_info/kill_house_distribution_info.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/out_province_carcasses_buyer/out_province_carcasses_buyer.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/segmentation_model/segmentation_model.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/steward_free_bar/steward_free_bar.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/steward_free_bar_dashboard/steward_free_bar_dashboard.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/steward_free_sale_bar/steward_free_sale_bar.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/steward_remain_weight/steward_remain_weight.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/steward_sales_info_dashboard/steward_sales_info_dashboard.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/user_profile/user_profile.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/waiting_arrival/waiting_arrival.dart'
|
||||
hide ProductModel;
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
abstract class ChickenRemoteDatasource {
|
||||
Future<List<InventoryModel>?> getInventory({required String token, CancelToken? cancelToken});
|
||||
|
||||
Future<KillHouseDistributionInfo?> getKillHouseDistributionInfo({required String token});
|
||||
|
||||
Future<BarInformation?> getGeneralBarInformation({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
Future<PaginationModel<WaitingArrivalModel>?> getWaitingArrivals({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
Future<void> setSateForArrivals({required String token, required Map<String, dynamic> request});
|
||||
|
||||
Future<PaginationModel<ImportedLoadsModel>?> getImportedLoadsModel({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
Future<PaginationModel<AllocatedMadeModel>?> getAllocatedMade({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
Future<void> confirmAllocation({required String token, required Map<String, dynamic> allocation});
|
||||
|
||||
Future<void> denyAllocation({required String token, required String allocationToken});
|
||||
|
||||
Future<void> confirmAllAllocation({
|
||||
required String token,
|
||||
required List<String> allocationTokens,
|
||||
});
|
||||
|
||||
Future<List<ProductModel>?> getRolesProducts({required String token});
|
||||
|
||||
Future<List<GuildModel>?> getGuilds({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
Future<GuildProfile?> getProfile({required String token});
|
||||
|
||||
Future<void> postSubmitStewardAllocation({
|
||||
required String token,
|
||||
required SubmitStewardAllocation request,
|
||||
});
|
||||
|
||||
Future<void> deleteStewardAllocation({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
Future<void> updateStewardAllocation({required String token, required ConformAllocation request});
|
||||
|
||||
Future<StewardFreeBarDashboard?> getStewardDashboard({
|
||||
required String token,
|
||||
required String stratDate,
|
||||
required String endDate,
|
||||
});
|
||||
|
||||
Future<DashboardKillHouseFreeBar?> getDashboardKillHouseFreeBar({
|
||||
required String token,
|
||||
required String stratDate,
|
||||
required String endDate,
|
||||
});
|
||||
|
||||
Future<PaginationModel<StewardFreeBar>?> getStewardPurchasesOutSideOfTheProvince({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
Future<void> createStewardPurchasesOutSideOfTheProvince({
|
||||
required String token,
|
||||
required CreateStewardFreeBar body,
|
||||
});
|
||||
|
||||
Future<void> deleteStewardPurchasesOutSideOfTheProvince({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
Future<CreateStewardFreeBar?> editStewardPurchasesOutSideOfTheProvince({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
|
||||
Future<PaginationModel<OutProvinceCarcassesBuyer>?> getOutProvinceCarcassesBuyer({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
Future<void> createOutProvinceCarcassesBuyer({
|
||||
required String token,
|
||||
required OutProvinceCarcassesBuyer body,
|
||||
});
|
||||
|
||||
Future<List<IranProvinceCityModel>?> getProvince({CancelToken? cancelToken});
|
||||
|
||||
Future<List<IranProvinceCityModel>?> getCity({required String provinceName});
|
||||
|
||||
Future<PaginationModel<StewardFreeSaleBar>?> getStewardFreeSaleBar({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
Future<void> createOutProvinceStewardFreeBar({
|
||||
required String token,
|
||||
required StewardFreeSaleBarRequest body,
|
||||
});
|
||||
|
||||
Future<void> updateOutProvinceStewardFreeBar({
|
||||
required String token,
|
||||
required StewardFreeSaleBarRequest body,
|
||||
});
|
||||
|
||||
|
||||
Future<void> deleteOutProvinceStewardFreeBar({
|
||||
required String token,
|
||||
required String key
|
||||
});
|
||||
|
||||
|
||||
Future<UserProfile?> getUserProfile({required String token});
|
||||
|
||||
Future<void> updateUserProfile({required String token, required UserProfile userProfile});
|
||||
|
||||
Future<void> updatePassword({required String token, required ChangePasswordRequestModel model});
|
||||
|
||||
Future<PaginationModel<SegmentationModel>?> getSegmentation({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
Future<void> createSegmentation({required String token, required SegmentationModel model});
|
||||
|
||||
Future<void> editSegmentation({required String token, required SegmentationModel model});
|
||||
|
||||
Future<SegmentationModel?> deleteSegmentation({required String token, required String key});
|
||||
|
||||
Future<BroadcastPrice?> getBroadcastPrice({required String token});
|
||||
|
||||
Future<StewardSalesInfoDashboard?> getStewardSalesInfoDashboard({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
Future<StewardRemainWeight?> getStewardRemainWeight({required String token});
|
||||
}
|
||||
@@ -0,0 +1,548 @@
|
||||
import 'package:rasadyar_chicken/data/models/request/change_password/change_password_request_model.dart';
|
||||
import 'package:rasadyar_chicken/data/models/request/conform_allocation/conform_allocation.dart';
|
||||
import 'package:rasadyar_chicken/data/models/request/create_steward_free_bar/create_steward_free_bar.dart';
|
||||
import 'package:rasadyar_chicken/data/models/request/steward_free_sale_bar/steward_free_sale_bar_request.dart';
|
||||
import 'package:rasadyar_chicken/data/models/request/submit_steward_allocation/submit_steward_allocation.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/allocated_made/allocated_made.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/bar_information/bar_information.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/broadcast_price/broadcast_price.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/dashboard_kill_house_free_bar/dashboard_kill_house_free_bar.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/guild/guild_model.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/guild_profile/guild_profile.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/imported_loads_model/imported_loads_model.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/inventory/inventory_model.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/iran_province_city/iran_province_city_model.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/kill_house_distribution_info/kill_house_distribution_info.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/out_province_carcasses_buyer/out_province_carcasses_buyer.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/segmentation_model/segmentation_model.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/steward_free_bar/steward_free_bar.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/steward_free_bar_dashboard/steward_free_bar_dashboard.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/steward_free_sale_bar/steward_free_sale_bar.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/steward_remain_weight/steward_remain_weight.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/steward_sales_info_dashboard/steward_sales_info_dashboard.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/user_profile/user_profile.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/waiting_arrival/waiting_arrival.dart'
|
||||
hide ProductModel;
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
import 'chicken_remote.dart';
|
||||
|
||||
class ChickenRemoteDatasourceImp implements ChickenRemoteDatasource {
|
||||
final DioRemote _httpClient;
|
||||
|
||||
ChickenRemoteDatasourceImp(this._httpClient);
|
||||
|
||||
@override
|
||||
Future<List<InventoryModel>?> getInventory({
|
||||
required String token,
|
||||
CancelToken? cancelToken,
|
||||
}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/roles-products/?role=Steward',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
|
||||
fromJsonList: (json) =>
|
||||
(json).map((item) => InventoryModel.fromJson(item as Map<String, dynamic>)).toList(),
|
||||
);
|
||||
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<KillHouseDistributionInfo?> getKillHouseDistributionInfo({required String token}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/kill-house-distribution-info/?role=Steward',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
fromJson: KillHouseDistributionInfo.fromJson,
|
||||
);
|
||||
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<BarInformation?> getGeneralBarInformation({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/bars_for_kill_house_dashboard/',
|
||||
queryParameters: queryParameters,
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
fromJson: BarInformation.fromJson,
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<PaginationModel<WaitingArrivalModel>?> getWaitingArrivals({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/steward-allocation/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
queryParameters: queryParameters,
|
||||
fromJson: (json) => PaginationModel<WaitingArrivalModel>.fromJson(
|
||||
json,
|
||||
(json) => WaitingArrivalModel.fromJson(json as Map<String, dynamic>),
|
||||
),
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> setSateForArrivals({
|
||||
required String token,
|
||||
required Map<String, dynamic> request,
|
||||
}) async {
|
||||
await _httpClient.put(
|
||||
'/steward-allocation/0/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
data: request,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<PaginationModel<ImportedLoadsModel>?> getImportedLoadsModel({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/steward-allocation/',
|
||||
queryParameters: queryParameters,
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
fromJson: (json) => PaginationModel.fromJson(
|
||||
json,
|
||||
(data) => ImportedLoadsModel.fromJson(data as Map<String, dynamic>),
|
||||
),
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<PaginationModel<AllocatedMadeModel>?> getAllocatedMade({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/steward-allocation/',
|
||||
queryParameters: queryParameters,
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
fromJson: (json) => PaginationModel<AllocatedMadeModel>.fromJson(
|
||||
json,
|
||||
(json) => AllocatedMadeModel.fromJson(json as Map<String, dynamic>),
|
||||
),
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> confirmAllocation({
|
||||
required String token,
|
||||
required Map<String, dynamic> allocation,
|
||||
}) async {
|
||||
await _httpClient.put(
|
||||
'/steward-allocation/0/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
data: allocation,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> denyAllocation({required String token, required String allocationToken}) async {
|
||||
await _httpClient.delete(
|
||||
'/steward-allocation/0/?steward_allocation_key=$allocationToken',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> confirmAllAllocation({
|
||||
required String token,
|
||||
required List<String> allocationTokens,
|
||||
}) async {
|
||||
await _httpClient.put(
|
||||
'/steward-allocation/0/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
data: {'steward_allocation_list': allocationTokens},
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<List<ProductModel>?> getRolesProducts({required String token}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/roles-products/?role=Steward',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
fromJsonList: (json) =>
|
||||
json.map((item) => ProductModel.fromJson(item as Map<String, dynamic>)).toList(),
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<List<GuildModel>?> getGuilds({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/guilds/',
|
||||
queryParameters: queryParameters,
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
fromJsonList: (json) =>
|
||||
json.map((item) => GuildModel.fromJson(item as Map<String, dynamic>)).toList(),
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<GuildProfile?> getProfile({required String token}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/guilds/0/?profile',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
fromJson: GuildProfile.fromJson,
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> postSubmitStewardAllocation({
|
||||
required String token,
|
||||
required SubmitStewardAllocation request,
|
||||
}) async {
|
||||
await _httpClient.post(
|
||||
'/steward-allocation/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
data: request.toJson(),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> deleteStewardAllocation({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
await _httpClient.delete(
|
||||
'/steward-allocation/0/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
queryParameters: queryParameters,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> updateStewardAllocation({
|
||||
required String token,
|
||||
required ConformAllocation request,
|
||||
}) async {
|
||||
await _httpClient.put(
|
||||
'/steward-allocation/0/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
data: request.toJson(),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<StewardFreeBarDashboard?> getStewardDashboard({
|
||||
required String token,
|
||||
required String stratDate,
|
||||
required String endDate,
|
||||
}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/steward_free_bar_dashboard/?date1=$stratDate&date2=$endDate&search=filter',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
fromJson: StewardFreeBarDashboard.fromJson,
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<DashboardKillHouseFreeBar?> getDashboardKillHouseFreeBar({
|
||||
required String token,
|
||||
required String stratDate,
|
||||
required String endDate,
|
||||
}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/dashboard_kill_house_free_bar/?date1=$stratDate&date2=$endDate&search=filter',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
fromJson: DashboardKillHouseFreeBar.fromJson,
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<PaginationModel<StewardFreeBar>?> getStewardPurchasesOutSideOfTheProvince({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/steward_free_bar/',
|
||||
queryParameters: queryParameters,
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
fromJson: (json) => PaginationModel<StewardFreeBar>.fromJson(
|
||||
json,
|
||||
(json) => StewardFreeBar.fromJson(json as Map<String, dynamic>),
|
||||
),
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<List<IranProvinceCityModel>?> getCity({required String provinceName}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/iran_city/',
|
||||
queryParameters: {'name': provinceName},
|
||||
fromJsonList: (json) =>
|
||||
json.map((item) => IranProvinceCityModel.fromJson(item as Map<String, dynamic>)).toList(),
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<List<IranProvinceCityModel>?> getProvince({CancelToken? cancelToken}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/iran_province/',
|
||||
fromJsonList: (json) =>
|
||||
json.map((item) => IranProvinceCityModel.fromJson(item as Map<String, dynamic>)).toList(),
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> createStewardPurchasesOutSideOfTheProvince({
|
||||
required String token,
|
||||
required CreateStewardFreeBar body,
|
||||
}) async {
|
||||
await _httpClient.post(
|
||||
'/steward_free_bar/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
data: body.toJson()..removeWhere((key, value) => value==null,),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<CreateStewardFreeBar?> editStewardPurchasesOutSideOfTheProvince({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
var data = await _httpClient.put(
|
||||
'/steward_free_bar/0/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
data: queryParameters,
|
||||
fromJson: CreateStewardFreeBar.fromJson,
|
||||
);
|
||||
return data.data;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> deleteStewardPurchasesOutSideOfTheProvince({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
await _httpClient.delete(
|
||||
'/steward_free_bar/0/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
queryParameters: queryParameters,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<PaginationModel<OutProvinceCarcassesBuyer>?> getOutProvinceCarcassesBuyer({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/out-province-carcasses-buyer/',
|
||||
queryParameters: queryParameters,
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
fromJson: (json) => PaginationModel<OutProvinceCarcassesBuyer>.fromJson(
|
||||
json,
|
||||
(json) => OutProvinceCarcassesBuyer.fromJson(json as Map<String, dynamic>),
|
||||
),
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> createOutProvinceCarcassesBuyer({
|
||||
required String token,
|
||||
required OutProvinceCarcassesBuyer body,
|
||||
}) async {
|
||||
await _httpClient.post(
|
||||
'/out-province-carcasses-buyer/',
|
||||
data: body.toJson()..removeWhere((key, value) => value == null),
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<PaginationModel<StewardFreeSaleBar>?> getStewardFreeSaleBar({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/steward_free_sale_bar/',
|
||||
queryParameters: queryParameters,
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
fromJson: (json) => PaginationModel<StewardFreeSaleBar>.fromJson(
|
||||
json,
|
||||
(json) => StewardFreeSaleBar.fromJson(json as Map<String, dynamic>),
|
||||
),
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> createOutProvinceStewardFreeBar({
|
||||
required String token,
|
||||
required StewardFreeSaleBarRequest body,
|
||||
}) async {
|
||||
await _httpClient.post(
|
||||
'/steward_free_sale_bar/',
|
||||
data: body.toJson()..removeWhere((key, value) => value == null),
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> updateOutProvinceStewardFreeBar({
|
||||
required String token,
|
||||
required StewardFreeSaleBarRequest body,
|
||||
}) async {
|
||||
await _httpClient.put(
|
||||
'/steward_free_sale_bar/0/',
|
||||
data: body.toJson()
|
||||
..removeWhere((key, value) => value == null)
|
||||
..addAll({'carcassWeight': body.weightOfCarcasses, 'carcassCount': body.numberOfCarcasses}),
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> deleteOutProvinceStewardFreeBar({required String token, required String key}) async {
|
||||
await _httpClient.delete(
|
||||
'/steward_free_sale_bar/0/',
|
||||
queryParameters: {'key': key},
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<UserProfile?> getUserProfile({required String token}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/system_user_profile/?self-profile',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
fromJson: (json) => UserProfile.fromJson(json),
|
||||
);
|
||||
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> updateUserProfile({required String token, required UserProfile userProfile}) async {
|
||||
await _httpClient.put(
|
||||
'/system_user_profile/0/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
data: userProfile.toJson()..removeWhere((key, value) => value == null),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> updatePassword({
|
||||
required String token,
|
||||
required ChangePasswordRequestModel model,
|
||||
}) async {
|
||||
await _httpClient.post(
|
||||
'/api/change_password/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
data: model.toJson()..removeWhere((key, value) => value == null),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<PaginationModel<SegmentationModel>?> getSegmentation({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/app-segmentation/',
|
||||
queryParameters: queryParameters,
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
fromJson: (json) => PaginationModel<SegmentationModel>.fromJson(
|
||||
json,
|
||||
(json) => SegmentationModel.fromJson(json as Map<String, dynamic>),
|
||||
),
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> createSegmentation({required String token, required SegmentationModel model}) async {
|
||||
await _httpClient.post(
|
||||
'/app-segmentation/',
|
||||
data: model.toJson()..removeWhere((key, value) => value == null),
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> editSegmentation({required String token, required SegmentationModel model}) async {
|
||||
await _httpClient.put(
|
||||
'/app-segmentation/0/',
|
||||
data: model.toJson()..removeWhere((key, value) => value == null),
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<SegmentationModel?> deleteSegmentation({
|
||||
required String token,
|
||||
required String key,
|
||||
}) async {
|
||||
var res = await _httpClient.delete<SegmentationModel?>(
|
||||
'/app-segmentation/0/',
|
||||
queryParameters: {'key': key},
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
fromJson: (json) => SegmentationModel.fromJson(json),
|
||||
);
|
||||
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<BroadcastPrice?> getBroadcastPrice({required String token}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/broadcast-price/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
|
||||
fromJson: (json) => BroadcastPrice.fromJson(json),
|
||||
);
|
||||
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<StewardSalesInfoDashboard?> getStewardSalesInfoDashboard({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/steward-sales-info-dashboard/',
|
||||
queryParameters: queryParameters,
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
fromJson: (json) => StewardSalesInfoDashboard.fromJson(json),
|
||||
);
|
||||
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<StewardRemainWeight?> getStewardRemainWeight({required String token}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/steward-remain-weight/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
fromJson: StewardRemainWeight.fromJson,
|
||||
);
|
||||
|
||||
return res.data;
|
||||
}
|
||||
}
|
||||
@@ -2,12 +2,8 @@ import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/response/kill_house/kill_house_response.dart';
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/response/kill_request_list/kill_request_list.dart'
|
||||
as listModel;
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/warehouse_and_distribution/response/kill_house_bars/kill_house_bars_response.dart';
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/warehouse_and_distribution/response/kill_house_sales_info_dashboard/kill_house_sales_info_dashboard.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
abstract class KillHouseRemoteDataSource {
|
||||
//region requestKill
|
||||
Future<List<KillHouseResponse>?> getKillHouseList({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
@@ -18,34 +14,12 @@ abstract class KillHouseRemoteDataSource {
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
Future<void> submitKillHouseRequest({
|
||||
required String token,
|
||||
required Map<String, dynamic> data,
|
||||
});
|
||||
Future<void> submitKillHouseRequest({required String token, required Map<String, dynamic> data});
|
||||
|
||||
Future<List<listModel.KillRequestList>?> getListKillRequest({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
Future<void> deleteKillRequest({
|
||||
required String token,
|
||||
required int requestId,
|
||||
});
|
||||
//endregion
|
||||
|
||||
//region warehouseAndDistribution
|
||||
|
||||
Future<KillHouseSalesInfoDashboard?> getInfoDashboard({
|
||||
required String token,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
Future<PaginationModel<KillHouseBarsResponse>?> getBarsForKillHouse({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
//endregion
|
||||
Future<void> deleteKillRequest({required String token, required int requestId});
|
||||
}
|
||||
|
||||
@@ -3,8 +3,6 @@ import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/response/kill_house/kill_house_response.dart';
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/response/kill_request_list/kill_request_list.dart'
|
||||
as listModel;
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/warehouse_and_distribution/response/kill_house_bars/kill_house_bars_response.dart';
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/warehouse_and_distribution/response/kill_house_sales_info_dashboard/kill_house_sales_info_dashboard.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
class KillHouseRemoteDataSourceImpl extends KillHouseRemoteDataSource {
|
||||
@@ -22,9 +20,7 @@ class KillHouseRemoteDataSourceImpl extends KillHouseRemoteDataSource {
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
fromJson: (json) {
|
||||
var data = json['results'] as List<dynamic>;
|
||||
return ChickenCommissionPrices.fromJson(
|
||||
data.first as Map<String, dynamic>,
|
||||
);
|
||||
return ChickenCommissionPrices.fromJson(data.first as Map<String, dynamic>);
|
||||
},
|
||||
);
|
||||
|
||||
@@ -39,9 +35,8 @@ class KillHouseRemoteDataSourceImpl extends KillHouseRemoteDataSource {
|
||||
var res = await _httpClient.get(
|
||||
'/kill_house/?kill_house',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
fromJsonList: (json) => json
|
||||
.map((e) => KillHouseResponse.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
fromJsonList: (json) =>
|
||||
json.map((e) => KillHouseResponse.fromJson(e as Map<String, dynamic>)).toList(),
|
||||
);
|
||||
|
||||
return res.data;
|
||||
@@ -68,66 +63,18 @@ class KillHouseRemoteDataSourceImpl extends KillHouseRemoteDataSource {
|
||||
'/kill_request/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
queryParameters: queryParameters,
|
||||
fromJsonList: (json) => json
|
||||
.map(
|
||||
(e) =>
|
||||
listModel.KillRequestList.fromJson(e as Map<String, dynamic>),
|
||||
)
|
||||
.toList(),
|
||||
fromJsonList: (json) =>
|
||||
json.map((e) => listModel.KillRequestList.fromJson(e as Map<String, dynamic>)).toList(),
|
||||
);
|
||||
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> deleteKillRequest({
|
||||
required String token,
|
||||
required int requestId,
|
||||
}) async {
|
||||
Future<void> deleteKillRequest({required String token, required int requestId}) async {
|
||||
await _httpClient.delete(
|
||||
'/kill_request/$requestId/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
);
|
||||
}
|
||||
|
||||
//endregion
|
||||
//region warehouseAndDistribution
|
||||
@override
|
||||
Future<KillHouseSalesInfoDashboard?> getInfoDashboard({
|
||||
required String token,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/kill-house-sales-info-dashboard/?role=KillHouse',
|
||||
|
||||
cancelToken: cancelToken,
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
queryParameters: queryParameters,
|
||||
fromJson: KillHouseSalesInfoDashboard.fromJson,
|
||||
);
|
||||
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<PaginationModel<KillHouseBarsResponse>?> getBarsForKillHouse({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/bars_for_kill_house/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
queryParameters: queryParameters,
|
||||
|
||||
fromJson: (json) => PaginationModel<KillHouseBarsResponse>.fromJson(
|
||||
json,
|
||||
(json) => KillHouseBarsResponse.fromJson(json as Map<String, dynamic>),
|
||||
),
|
||||
);
|
||||
|
||||
return res.data;
|
||||
}
|
||||
|
||||
//endregion
|
||||
}
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
import 'package:rasadyar_chicken/data/models/poultry_export/poultry_export.dart';
|
||||
import 'package:rasadyar_chicken/data/models/request/kill_registration/kill_registration.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/all_poultry/all_poultry.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/approved_price/approved_price.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/hatching/hatching_models.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/hatching_report/hatching_report.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/kill_house_poultry/kill_house_poultry.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/kill_request_poultry/kill_request_poultry.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/poultry_farm/poultry_farm.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/poultry_hatching/poultry_hatching.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/poultry_order/poultry_order.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/poultry_science/home_poultry_science/home_poultry_science_model.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/sell_for_freezing/sell_for_freezing.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
abstract class PoultryScienceRemoteDatasource {
|
||||
Future<HomePoultryScienceModel?> getHomePoultryScience({
|
||||
required String token,
|
||||
required String type,
|
||||
});
|
||||
|
||||
Future<PaginationModel<HatchingModel>?> getHatchingPoultry({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
Future<void> submitPoultryScienceReport({
|
||||
required String token,
|
||||
required FormData data,
|
||||
ProgressCallback? onSendProgress,
|
||||
});
|
||||
|
||||
Future<PaginationModel<HatchingReport>?> getPoultryScienceReport({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
Future<PaginationModel<PoultryFarm>?> getPoultryScienceFarmList({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
Future<ApprovedPrice?> getApprovedPrice({ required String token,
|
||||
Map<String, dynamic>? queryParameters,});
|
||||
|
||||
Future<List<AllPoultry>?> getAllPoultry({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
|
||||
Future<SellForFreezing?> getSellForFreezing({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
|
||||
Future<PoultryExport?> getPoultryExport({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
|
||||
Future<List<KillRequestPoultry>?> getUserPoultry({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
Future<List<PoultryHatching>?> getPoultryHatching({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
Future<List<KillHousePoultry>?> getKillHouseList({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
Future<void> submitKillRegistration({
|
||||
required String token,
|
||||
required KillRegistrationRequest request,
|
||||
});
|
||||
|
||||
|
||||
Future<PaginationModel<PoultryOrder>?> getPoultryOderList({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
Future<void> deletePoultryOder({
|
||||
required String token,
|
||||
required String orderId,
|
||||
});
|
||||
}
|
||||
@@ -1,26 +1,24 @@
|
||||
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/hatching/hatching_models.dart';
|
||||
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/hatching_report/hatching_report.dart';
|
||||
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/home_poultry_science/home_poultry_science_model.dart';
|
||||
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/poultry_farm/poultry_farm.dart';
|
||||
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/approved_price/approved_price.dart';
|
||||
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/all_poultry/all_poultry.dart';
|
||||
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/poultry_science_report/poultry_science_report.dart';
|
||||
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/sell_for_freezing/sell_for_freezing.dart';
|
||||
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/poultry_export/poultry_export.dart';
|
||||
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/kill_request_poultry/kill_request_poultry.dart';
|
||||
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/poultry_hatching/poultry_hatching.dart';
|
||||
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/kill_house_poultry/kill_house_poultry.dart';
|
||||
import 'package:rasadyar_chicken/features/poultry_science/data/model/request/kill_registration/kill_registration.dart';
|
||||
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/poultry_order/poultry_order.dart';
|
||||
import 'package:rasadyar_chicken/features/poultry_science/data/model/request/submit_inspection/submit_inspection_response.dart';
|
||||
import 'package:rasadyar_chicken/features/poultry_science/data/datasources/remote/poultry_science_remote_data_source.dart';
|
||||
import 'package:rasadyar_chicken/data/models/poultry_export/poultry_export.dart';
|
||||
import 'package:rasadyar_chicken/data/models/request/kill_registration/kill_registration.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/all_poultry/all_poultry.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/approved_price/approved_price.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/hatching/hatching_models.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/hatching_report/hatching_report.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/kill_house_poultry/kill_house_poultry.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/kill_request_poultry/kill_request_poultry.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/poultry_farm/poultry_farm.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/poultry_hatching/poultry_hatching.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/poultry_order/poultry_order.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/poultry_science/home_poultry_science/home_poultry_science_model.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/sell_for_freezing/sell_for_freezing.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
class PoultryScienceRemoteDataSourceImpl
|
||||
implements PoultryScienceRemoteDataSource {
|
||||
import 'poultry_science_remote.dart';
|
||||
|
||||
class PoultryScienceRemoteDatasourceImp implements PoultryScienceRemoteDatasource {
|
||||
final DioRemote _httpClient;
|
||||
|
||||
PoultryScienceRemoteDataSourceImpl(this._httpClient);
|
||||
PoultryScienceRemoteDatasourceImp(this._httpClient);
|
||||
|
||||
@override
|
||||
Future<HomePoultryScienceModel?> getHomePoultryScience({
|
||||
@@ -126,9 +124,8 @@ class PoultryScienceRemoteDataSourceImpl
|
||||
'/get-all-poultry/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
queryParameters: queryParameters,
|
||||
fromJsonList: (json) => json
|
||||
.map((e) => AllPoultry.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
fromJsonList: (json) =>
|
||||
json.map((e) => AllPoultry.fromJson(e as Map<String, dynamic>)).toList(),
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
@@ -170,8 +167,7 @@ class PoultryScienceRemoteDataSourceImpl
|
||||
'/Poultry/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
queryParameters: queryParameters,
|
||||
fromJsonList: (json) =>
|
||||
json.map((e) => KillRequestPoultry.fromJson(e)).toList(),
|
||||
fromJsonList: (json) => json.map((e) => KillRequestPoultry.fromJson(e)).toList(),
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
@@ -185,8 +181,7 @@ class PoultryScienceRemoteDataSourceImpl
|
||||
'/poultry_hatching/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
queryParameters: queryParameters,
|
||||
fromJsonList: (json) =>
|
||||
json.map((e) => PoultryHatching.fromJson(e)).toList(),
|
||||
fromJsonList: (json) => json.map((e) => PoultryHatching.fromJson(e)).toList(),
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
@@ -200,8 +195,7 @@ class PoultryScienceRemoteDataSourceImpl
|
||||
'/kill_house_list/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
queryParameters: queryParameters,
|
||||
fromJsonList: (json) =>
|
||||
json.map((e) => KillHousePoultry.fromJson(e)).toList(),
|
||||
fromJsonList: (json) => json.map((e) => KillHousePoultry.fromJson(e)).toList(),
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
@@ -237,60 +231,12 @@ class PoultryScienceRemoteDataSourceImpl
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> deletePoultryOder({
|
||||
required String token,
|
||||
required String orderId,
|
||||
}) async {
|
||||
Future<void> deletePoultryOder({required String token, required String orderId}) async {
|
||||
await _httpClient.delete(
|
||||
'/Poultry_Request/$orderId/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<List<String>?> uploadImages({
|
||||
required String token,
|
||||
required List<XFile> images,
|
||||
}) async {
|
||||
var res = await _httpClient.post<List<String>?>(
|
||||
'/upload_image_to_server_for_poultry_science/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
data: FormData.fromMap({
|
||||
'file': images.map((e) => MultipartFile.fromFileSync(e.path)).toList(),
|
||||
}),
|
||||
fromJson: (json) => List<String>.from(json['urls'] as List),
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<PaginationModel<PoultryScienceReport>?> getSubmitInspectionList({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/poultry_science_report/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
queryParameters: queryParameters,
|
||||
fromJson: (json) => PaginationModel<PoultryScienceReport>.fromJson(
|
||||
json,
|
||||
(json) => PoultryScienceReport.fromJson(json as Map<String, dynamic>),
|
||||
),
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> submitInspection({
|
||||
required String token,
|
||||
required SubmitInspectionResponse request,
|
||||
}) async {
|
||||
await _httpClient.post(
|
||||
'/poultry_science_report/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
data: request.toJson(),
|
||||
);
|
||||
}
|
||||
|
||||
//endregion
|
||||
}
|
||||
@@ -1,19 +1,23 @@
|
||||
import 'package:rasadyar_chicken/chicken.dart';
|
||||
import 'package:rasadyar_chicken/data/common/dio_error_handler.dart';
|
||||
import 'package:rasadyar_chicken/features/common/presentation/routes/routes.dart';
|
||||
import 'package:rasadyar_chicken/features/common/data/di/common_di.dart';
|
||||
import 'package:rasadyar_chicken/data/data_source/local/chicken_local.dart';
|
||||
import 'package:rasadyar_chicken/data/data_source/local/chicken_local_imp.dart';
|
||||
import 'package:rasadyar_chicken/data/data_source/remote/auth/auth_remote.dart';
|
||||
import 'package:rasadyar_chicken/data/data_source/remote/auth/auth_remote_imp.dart';
|
||||
import 'package:rasadyar_chicken/data/data_source/remote/chicken/chicken_remote.dart';
|
||||
import 'package:rasadyar_chicken/data/data_source/remote/chicken/chicken_remote_imp.dart';
|
||||
import 'package:rasadyar_chicken/data/data_source/remote/kill_house/kill_house_remote.dart';
|
||||
import 'package:rasadyar_chicken/data/data_source/remote/kill_house/kill_house_remote_impl.dart';
|
||||
import 'package:rasadyar_chicken/data/data_source/remote/poultry_science/poultry_science_remote.dart';
|
||||
import 'package:rasadyar_chicken/data/data_source/remote/poultry_science/poultry_science_remote_imp.dart';
|
||||
import 'package:rasadyar_chicken/data/repositories/auth/auth_repository.dart';
|
||||
import 'package:rasadyar_chicken/data/repositories/auth/auth_repository_imp.dart';
|
||||
import 'package:rasadyar_chicken/data/repositories/chicken/chicken_repository.dart';
|
||||
import 'package:rasadyar_chicken/data/repositories/chicken/chicken_repository_imp.dart';
|
||||
import 'package:rasadyar_chicken/data/repositories/kill_house/kill_house_repository.dart';
|
||||
import 'package:rasadyar_chicken/data/repositories/kill_house/kill_house_repository_impl.dart';
|
||||
import 'package:rasadyar_chicken/features/poultry_science/data/di/poultry_science_di.dart';
|
||||
import 'package:rasadyar_chicken/features/steward/data/di/steward_di.dart';
|
||||
import 'package:rasadyar_chicken/features/province_operator/data/di/province_operator_di.dart';
|
||||
import 'package:rasadyar_chicken/features/province_inspector/data/di/province_inspector_di.dart';
|
||||
import 'package:rasadyar_chicken/features/city_jahad/data/di/city_jahad_di.dart';
|
||||
import 'package:rasadyar_chicken/features/vet_farm/data/di/vet_farm_di.dart';
|
||||
import 'package:rasadyar_chicken/features/super_admin/data/di/super_admin_di.dart';
|
||||
import 'package:rasadyar_chicken/features/province_supervisor/data/di/province_supervisor_di.dart';
|
||||
import 'package:rasadyar_chicken/features/jahad/data/di/jahad_di.dart';
|
||||
import 'package:rasadyar_chicken/data/repositories/poultry_science/poultry_science_repository.dart';
|
||||
import 'package:rasadyar_chicken/data/repositories/poultry_science/poultry_science_repository_imp.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
GetIt diChicken = GetIt.asNewInstance();
|
||||
@@ -36,7 +40,7 @@ Future<void> setupChickenDI() async {
|
||||
},
|
||||
clearTokenCallback: () async {
|
||||
await tokenService.deleteModuleTokens(Module.chicken);
|
||||
Get.offAllNamed(CommonRoutes.auth, arguments: Module.chicken);
|
||||
Get.offAllNamed(ChickenRoutes.auth, arguments: Module.chicken);
|
||||
},
|
||||
),
|
||||
instanceName: 'chickenInterceptor',
|
||||
@@ -47,44 +51,39 @@ Future<void> setupChickenDI() async {
|
||||
diChicken.registerLazySingleton<DioRemote>(
|
||||
() => DioRemote(
|
||||
baseUrl: baseUrl,
|
||||
interceptors: diChicken.get<AppInterceptor>(
|
||||
instanceName: 'chickenInterceptor',
|
||||
),
|
||||
interceptors: diChicken.get<AppInterceptor>(instanceName: 'chickenInterceptor'),
|
||||
),
|
||||
);
|
||||
|
||||
final dioRemote = diChicken.get<DioRemote>();
|
||||
await dioRemote.init();
|
||||
|
||||
// Setup common feature DI
|
||||
await setupCommonDI(diChicken, dioRemote);
|
||||
diChicken.registerLazySingleton<AuthRemoteDataSource>(() => AuthRemoteDataSourceImp(dioRemote));
|
||||
|
||||
// Setup poultry_science feature DI
|
||||
await setupPoultryScienceDI(diChicken, dioRemote);
|
||||
diChicken.registerLazySingleton<AuthRepository>(
|
||||
() => AuthRepositoryImpl(diChicken.get<AuthRemoteDataSource>()),
|
||||
);
|
||||
|
||||
// Setup steward feature DI
|
||||
await setupStewardDI(diChicken, dioRemote);
|
||||
diChicken.registerLazySingleton<ChickenRemoteDatasource>(
|
||||
() => ChickenRemoteDatasourceImp(diChicken.get<DioRemote>()),
|
||||
);
|
||||
|
||||
// Setup province_operator feature DI
|
||||
await setupProvinceOperatorDI(diChicken, dioRemote);
|
||||
diChicken.registerLazySingleton<ChickenLocalDataSource>(() => ChickenLocalDataSourceImp());
|
||||
|
||||
// Setup province_inspector feature DI
|
||||
await setupProvinceInspectorDI(diChicken, dioRemote);
|
||||
diChicken.registerLazySingleton<ChickenRepository>(
|
||||
() => ChickenRepositoryImp(
|
||||
remote: diChicken.get<ChickenRemoteDatasource>(),
|
||||
local: diChicken.get<ChickenLocalDataSource>(),
|
||||
),
|
||||
);
|
||||
|
||||
// Setup city_jahad feature DI
|
||||
await setupCityJahadDI(diChicken, dioRemote);
|
||||
diChicken.registerLazySingleton<PoultryScienceRemoteDatasource>(
|
||||
() => PoultryScienceRemoteDatasourceImp(diChicken.get<DioRemote>()),
|
||||
);
|
||||
|
||||
// Setup vet_farm feature DI
|
||||
await setupVetFarmDI(diChicken, dioRemote);
|
||||
|
||||
// Setup super_admin feature DI
|
||||
await setupSuperAdminDI(diChicken, dioRemote);
|
||||
|
||||
// Setup province_supervisor feature DI
|
||||
await setupProvinceSupervisorDI(diChicken, dioRemote);
|
||||
|
||||
// Setup jahad feature DI
|
||||
await setupJahadDI(diChicken, dioRemote);
|
||||
diChicken.registerLazySingleton<PoultryScienceRepository>(
|
||||
() => PoultryScienceRepositoryImp(diChicken.get<PoultryScienceRemoteDatasource>()),
|
||||
);
|
||||
|
||||
//region kill house module DI
|
||||
diChicken.registerLazySingleton<KillHouseRemoteDataSource>(
|
||||
@@ -99,49 +98,58 @@ Future<void> setupChickenDI() async {
|
||||
Future<void> newSetupAuthDI(String newUrl) async {
|
||||
var tokenService = Get.find<TokenStorageService>();
|
||||
|
||||
// همیشه baseUrl جدید رو ذخیره کن
|
||||
await tokenService.saveBaseUrl(Module.chicken, newUrl);
|
||||
|
||||
// پاکسازی DI مخصوص ماژول مرغ
|
||||
await diChicken.resetScope();
|
||||
diChicken.pushNewScope();
|
||||
|
||||
// --- Re-register AppInterceptor
|
||||
// Re-register AppInterceptor
|
||||
if (diChicken.isRegistered<AppInterceptor>(instanceName: 'chickenInterceptor')) {
|
||||
await diChicken.unregister<AppInterceptor>(instanceName: 'chickenInterceptor');
|
||||
}
|
||||
diChicken.registerLazySingleton<AppInterceptor>(
|
||||
() => AppInterceptor(
|
||||
refreshTokenCallback: () async => null,
|
||||
saveTokenCallback: (newToken) async {},
|
||||
saveTokenCallback: (String newToken) async {
|
||||
// await tokenService.saveAccessToken(newToken);
|
||||
},
|
||||
clearTokenCallback: () async {
|
||||
await tokenService.deleteModuleTokens(Module.chicken);
|
||||
Get.offAllNamed(CommonRoutes.auth, arguments: Module.chicken);
|
||||
Get.offAllNamed(ChickenRoutes.auth, arguments: Module.chicken);
|
||||
},
|
||||
),
|
||||
instanceName: 'chickenInterceptor',
|
||||
);
|
||||
|
||||
// --- Re-register DioRemote
|
||||
// Re-register DioRemote
|
||||
if (diChicken.isRegistered<DioRemote>()) {
|
||||
await diChicken.unregister<DioRemote>();
|
||||
}
|
||||
diChicken.registerLazySingleton<DioRemote>(
|
||||
() => DioRemote(
|
||||
baseUrl: newUrl,
|
||||
interceptors: diChicken.get<AppInterceptor>(
|
||||
instanceName: 'chickenInterceptor',
|
||||
),
|
||||
interceptors: diChicken.get<AppInterceptor>(instanceName: 'chickenInterceptor'),
|
||||
),
|
||||
);
|
||||
|
||||
final dioRemote = diChicken.get<DioRemote>();
|
||||
await dioRemote.init();
|
||||
|
||||
// --- common, poultry_science, steward, and other features
|
||||
await setupCommonDI(diChicken, dioRemote);
|
||||
await setupPoultryScienceDI(diChicken, dioRemote);
|
||||
await setupStewardDI(diChicken, dioRemote);
|
||||
await setupProvinceOperatorDI(diChicken, dioRemote);
|
||||
await setupProvinceInspectorDI(diChicken, dioRemote);
|
||||
await setupCityJahadDI(diChicken, dioRemote);
|
||||
await setupVetFarmDI(diChicken, dioRemote);
|
||||
await setupSuperAdminDI(diChicken, dioRemote);
|
||||
await setupProvinceSupervisorDI(diChicken, dioRemote);
|
||||
await setupJahadDI(diChicken, dioRemote);
|
||||
// Re-register dependent layers
|
||||
await reRegister<AuthRemoteDataSource>(() => AuthRemoteDataSourceImp(dioRemote));
|
||||
await reRegister<AuthRepository>(() => AuthRepositoryImpl(diChicken.get<AuthRemoteDataSource>()));
|
||||
await reRegister<ChickenRemoteDatasource>(() => ChickenRemoteDatasourceImp(dioRemote));
|
||||
await reRegister<ChickenLocalDataSource>(() => ChickenLocalDataSourceImp());
|
||||
await reRegister<ChickenRepository>(
|
||||
() => ChickenRepositoryImp(
|
||||
remote: diChicken.get<ChickenRemoteDatasource>(),
|
||||
local: diChicken.get<ChickenLocalDataSource>(),
|
||||
),
|
||||
);
|
||||
|
||||
await reRegister<PoultryScienceRemoteDatasource>(
|
||||
() => PoultryScienceRemoteDatasourceImp(dioRemote),
|
||||
);
|
||||
await reRegister<PoultryScienceRepository>(
|
||||
() => PoultryScienceRepositoryImp(diChicken.get<PoultryScienceRemoteDatasource>()),
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> reRegister<T extends Object>(T Function() factory) async {
|
||||
|
||||
@@ -1,272 +0,0 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'kill_house_bars_response.freezed.dart';
|
||||
part 'kill_house_bars_response.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class KillHouseBarsResponse with _$KillHouseBarsResponse {
|
||||
const factory KillHouseBarsResponse({
|
||||
KillHouseUserModel? killhouseUser,
|
||||
KillHouseUserModel? killer,
|
||||
AddCarModel? addCar,
|
||||
PoultryRequestModel? poultryRequest,
|
||||
WeightInfoModel? weightInfo,
|
||||
String? key,
|
||||
String? createDate,
|
||||
bool? trash,
|
||||
int? quantity,
|
||||
int? barCode,
|
||||
int? quarantineQuantity,
|
||||
String? quarantineCodeState,
|
||||
double? fee,
|
||||
String? time,
|
||||
String? state,
|
||||
String? vetState,
|
||||
String? activeState,
|
||||
String? assignmentStateArchive,
|
||||
String? showKillHouse,
|
||||
CarModel? car,
|
||||
String? killHouseMessage,
|
||||
String? allocationState,
|
||||
bool? auction,
|
||||
String? role,
|
||||
String? clearanceCode,
|
||||
String? trafficCode,
|
||||
RegistrarClearanceCode? registrarClearanceCode,
|
||||
String? editorTrafficCode,
|
||||
String? barRemover,
|
||||
int? extraKilledQuantity,
|
||||
int? acceptedRealQuantity,
|
||||
double? acceptedRealWeight,
|
||||
double? extraKilledWeight,
|
||||
int? vetAcceptedRealQuantity,
|
||||
double? vetAcceptedRealWeight,
|
||||
int? acceptedAssignmentRealQuantity,
|
||||
double? acceptedAssignmentRealWeight,
|
||||
String? message,
|
||||
bool? wareHouseConfirmation,
|
||||
int? wareHouseAcceptedRealQuantity,
|
||||
double? wareHouseAcceptedRealWeight,
|
||||
String? dateOfWareHouse,
|
||||
bool? freezing,
|
||||
bool? archiveWage,
|
||||
double? weightLoss,
|
||||
String? wareHouseInputType,
|
||||
String? documentStatus,
|
||||
String? aggregateCode,
|
||||
bool? aggregateStatus,
|
||||
bool? calculateStatus,
|
||||
bool? temporaryTrash,
|
||||
bool? temporaryDeleted,
|
||||
String? enteredMessage,
|
||||
String? inquiryDate,
|
||||
String? inquiryOrigin,
|
||||
String? inquiryDestination,
|
||||
String? inquiryDriver,
|
||||
String? inquiryPelak,
|
||||
String? settlementType,
|
||||
double? price,
|
||||
String? description,
|
||||
String? barDocumentDescription,
|
||||
String? image,
|
||||
String? priceRegisterar,
|
||||
String? priceRegisterarRole,
|
||||
String? priceRegisterDate,
|
||||
String? priceEditor,
|
||||
String? priceEditorRole,
|
||||
String? priceEditorDate,
|
||||
bool? nonReceipt,
|
||||
bool? nonReceiptReturn,
|
||||
String? nonReceiptReturnMessage,
|
||||
String? nonReceiptMessage,
|
||||
bool? mainNonReceipt,
|
||||
String? nonReceiptState,
|
||||
String? nonReceiptChecker,
|
||||
String? nonReceiptCheckerMessage,
|
||||
String? nonReceiptCheckerMobile,
|
||||
String? nonReceiptCheckDate,
|
||||
String? nonReceiptReturner,
|
||||
String? nonReceiptReturnerMobile,
|
||||
String? nonReceiptReturnDate,
|
||||
bool? fine,
|
||||
double? fineAmount,
|
||||
double? fineCoefficient,
|
||||
String? documentNumber,
|
||||
bool? companyDocument,
|
||||
bool? warehouse,
|
||||
double? warehouseCommitmentWeight,
|
||||
bool? returnTrash,
|
||||
double? amount,
|
||||
int? killRequest,
|
||||
String? realAddCar,
|
||||
String? barDocumentStatus,
|
||||
int? inputWarehouse,
|
||||
}) = _KillHouseBars;
|
||||
|
||||
factory KillHouseBarsResponse.fromJson(Map<String, dynamic> json) =>
|
||||
_$KillHouseBarsFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class KillHouseUserModel with _$KillHouseUserModel {
|
||||
const factory KillHouseUserModel({
|
||||
KillHouseOperatorModel? killHouseOperator,
|
||||
String? name,
|
||||
bool? killer,
|
||||
String? key,
|
||||
double? maximumLoadVolumeIncrease,
|
||||
double? maximumLoadVolumeReduction,
|
||||
}) = _KillHouseUserModel;
|
||||
|
||||
factory KillHouseUserModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$KillHouseUserModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class KillHouseOperatorModel with _$KillHouseOperatorModel {
|
||||
const factory KillHouseOperatorModel({UserDetailModel? user}) =
|
||||
_KillHouseOperatorModel;
|
||||
|
||||
factory KillHouseOperatorModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$KillHouseOperatorModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class UserDetailModel with _$UserDetailModel {
|
||||
const factory UserDetailModel({
|
||||
String? fullname,
|
||||
String? firstName,
|
||||
String? lastName,
|
||||
int? baseOrder,
|
||||
String? mobile,
|
||||
String? nationalId,
|
||||
String? nationalCode,
|
||||
String? key,
|
||||
CityDetailModel? city,
|
||||
String? unitName,
|
||||
String? unitNationalId,
|
||||
String? unitRegistrationNumber,
|
||||
String? unitEconomicalNumber,
|
||||
String? unitProvince,
|
||||
String? unitCity,
|
||||
String? unitPostalCode,
|
||||
String? unitAddress,
|
||||
}) = _UserDetailModel;
|
||||
|
||||
factory UserDetailModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$UserDetailModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class CityDetailModel with _$CityDetailModel {
|
||||
const factory CityDetailModel({
|
||||
int? id,
|
||||
String? key,
|
||||
String? createDate,
|
||||
String? modifyDate,
|
||||
bool? trash,
|
||||
int? provinceIdForeignKey,
|
||||
int? cityIdKey,
|
||||
String? name,
|
||||
double? productPrice,
|
||||
bool? provinceCenter,
|
||||
int? cityNumber,
|
||||
String? cityName,
|
||||
int? provinceNumber,
|
||||
String? provinceName,
|
||||
String? createdBy,
|
||||
String? modifiedBy,
|
||||
int? province,
|
||||
}) = _CityDetailModel;
|
||||
|
||||
factory CityDetailModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$CityDetailModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class AddCarModel with _$AddCarModel {
|
||||
const factory AddCarModel({DriverModel? driver}) = _AddCarModel;
|
||||
|
||||
factory AddCarModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$AddCarModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class DriverModel with _$DriverModel {
|
||||
const factory DriverModel({
|
||||
String? driverName,
|
||||
String? driverMobile,
|
||||
String? typeCar,
|
||||
String? pelak,
|
||||
String? healthCode,
|
||||
}) = _DriverModel;
|
||||
|
||||
factory DriverModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$DriverModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class PoultryRequestModel with _$PoultryRequestModel {
|
||||
const factory PoultryRequestModel({
|
||||
int? poultryReqOrderCode,
|
||||
String? poultryName,
|
||||
String? poultryUserName,
|
||||
String? poultryMobile,
|
||||
String? poultryCity,
|
||||
String? chickenBreed,
|
||||
String? date,
|
||||
bool? freezing,
|
||||
bool? export,
|
||||
bool? freeSaleInProvince,
|
||||
bool? directBuying,
|
||||
}) = _PoultryRequestModel;
|
||||
|
||||
factory PoultryRequestModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$PoultryRequestModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class WeightInfoModel with _$WeightInfoModel {
|
||||
const factory WeightInfoModel({
|
||||
double? indexWeight,
|
||||
double? weight,
|
||||
double? finalIndexWeight,
|
||||
double? killHousePrice,
|
||||
int? weightLoss,
|
||||
double? inputLoss,
|
||||
String? state,
|
||||
}) = _WeightInfoModel;
|
||||
|
||||
factory WeightInfoModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$WeightInfoModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class CarModel with _$CarModel {
|
||||
const factory CarModel({
|
||||
int? id,
|
||||
String? key,
|
||||
String? pelak,
|
||||
//Object? capocity,
|
||||
String? typeCar,
|
||||
String? driverName,
|
||||
String? driverMobile,
|
||||
String? weightWithoutLoad,
|
||||
}) = _CarModel;
|
||||
|
||||
factory CarModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$CarModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class RegistrarClearanceCode with _$RegistrarClearanceCode {
|
||||
const factory RegistrarClearanceCode({
|
||||
String? date,
|
||||
String? name,
|
||||
String? role,
|
||||
String? mobile,
|
||||
}) = _RegistrarClearanceCode;
|
||||
|
||||
factory RegistrarClearanceCode.fromJson(Map<String, dynamic> json) =>
|
||||
_$RegistrarClearanceCodeFromJson(json);
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -1,474 +0,0 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'kill_house_bars_response.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_KillHouseBars _$KillHouseBarsFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _KillHouseBars(
|
||||
killhouseUser: json['killhouse_user'] == null
|
||||
? null
|
||||
: KillHouseUserModel.fromJson(
|
||||
json['killhouse_user'] as Map<String, dynamic>,
|
||||
),
|
||||
killer: json['killer'] == null
|
||||
? null
|
||||
: KillHouseUserModel.fromJson(json['killer'] as Map<String, dynamic>),
|
||||
addCar: json['add_car'] == null
|
||||
? null
|
||||
: AddCarModel.fromJson(json['add_car'] as Map<String, dynamic>),
|
||||
poultryRequest: json['poultry_request'] == null
|
||||
? null
|
||||
: PoultryRequestModel.fromJson(
|
||||
json['poultry_request'] as Map<String, dynamic>,
|
||||
),
|
||||
weightInfo: json['weight_info'] == null
|
||||
? null
|
||||
: WeightInfoModel.fromJson(json['weight_info'] as Map<String, dynamic>),
|
||||
key: json['key'] as String?,
|
||||
createDate: json['create_date'] as String?,
|
||||
trash: json['trash'] as bool?,
|
||||
quantity: (json['quantity'] as num?)?.toInt(),
|
||||
barCode: (json['bar_code'] as num?)?.toInt(),
|
||||
quarantineQuantity: (json['quarantine_quantity'] as num?)?.toInt(),
|
||||
quarantineCodeState: json['quarantine_code_state'] as String?,
|
||||
fee: (json['fee'] as num?)?.toDouble(),
|
||||
time: json['time'] as String?,
|
||||
state: json['state'] as String?,
|
||||
vetState: json['vet_state'] as String?,
|
||||
activeState: json['active_state'] as String?,
|
||||
assignmentStateArchive: json['assignment_state_archive'] as String?,
|
||||
showKillHouse: json['show_kill_house'] as String?,
|
||||
car: json['car'] == null
|
||||
? null
|
||||
: CarModel.fromJson(json['car'] as Map<String, dynamic>),
|
||||
killHouseMessage: json['kill_house_message'] as String?,
|
||||
allocationState: json['allocation_state'] as String?,
|
||||
auction: json['auction'] as bool?,
|
||||
role: json['role'] as String?,
|
||||
clearanceCode: json['clearance_code'] as String?,
|
||||
trafficCode: json['traffic_code'] as String?,
|
||||
registrarClearanceCode: json['registrar_clearance_code'] == null
|
||||
? null
|
||||
: RegistrarClearanceCode.fromJson(
|
||||
json['registrar_clearance_code'] as Map<String, dynamic>,
|
||||
),
|
||||
editorTrafficCode: json['editor_traffic_code'] as String?,
|
||||
barRemover: json['bar_remover'] as String?,
|
||||
extraKilledQuantity: (json['extra_killed_quantity'] as num?)?.toInt(),
|
||||
acceptedRealQuantity: (json['accepted_real_quantity'] as num?)?.toInt(),
|
||||
acceptedRealWeight: (json['accepted_real_weight'] as num?)?.toDouble(),
|
||||
extraKilledWeight: (json['extra_killed_weight'] as num?)?.toDouble(),
|
||||
vetAcceptedRealQuantity: (json['vet_accepted_real_quantity'] as num?)
|
||||
?.toInt(),
|
||||
vetAcceptedRealWeight: (json['vet_accepted_real_weight'] as num?)?.toDouble(),
|
||||
acceptedAssignmentRealQuantity:
|
||||
(json['accepted_assignment_real_quantity'] as num?)?.toInt(),
|
||||
acceptedAssignmentRealWeight:
|
||||
(json['accepted_assignment_real_weight'] as num?)?.toDouble(),
|
||||
message: json['message'] as String?,
|
||||
wareHouseConfirmation: json['ware_house_confirmation'] as bool?,
|
||||
wareHouseAcceptedRealQuantity:
|
||||
(json['ware_house_accepted_real_quantity'] as num?)?.toInt(),
|
||||
wareHouseAcceptedRealWeight: (json['ware_house_accepted_real_weight'] as num?)
|
||||
?.toDouble(),
|
||||
dateOfWareHouse: json['date_of_ware_house'] as String?,
|
||||
freezing: json['freezing'] as bool?,
|
||||
archiveWage: json['archive_wage'] as bool?,
|
||||
weightLoss: (json['weight_loss'] as num?)?.toDouble(),
|
||||
wareHouseInputType: json['ware_house_input_type'] as String?,
|
||||
documentStatus: json['document_status'] as String?,
|
||||
aggregateCode: json['aggregate_code'] as String?,
|
||||
aggregateStatus: json['aggregate_status'] as bool?,
|
||||
calculateStatus: json['calculate_status'] as bool?,
|
||||
temporaryTrash: json['temporary_trash'] as bool?,
|
||||
temporaryDeleted: json['temporary_deleted'] as bool?,
|
||||
enteredMessage: json['entered_message'] as String?,
|
||||
inquiryDate: json['inquiry_date'] as String?,
|
||||
inquiryOrigin: json['inquiry_origin'] as String?,
|
||||
inquiryDestination: json['inquiry_destination'] as String?,
|
||||
inquiryDriver: json['inquiry_driver'] as String?,
|
||||
inquiryPelak: json['inquiry_pelak'] as String?,
|
||||
settlementType: json['settlement_type'] as String?,
|
||||
price: (json['price'] as num?)?.toDouble(),
|
||||
description: json['description'] as String?,
|
||||
barDocumentDescription: json['bar_document_description'] as String?,
|
||||
image: json['image'] as String?,
|
||||
priceRegisterar: json['price_registerar'] as String?,
|
||||
priceRegisterarRole: json['price_registerar_role'] as String?,
|
||||
priceRegisterDate: json['price_register_date'] as String?,
|
||||
priceEditor: json['price_editor'] as String?,
|
||||
priceEditorRole: json['price_editor_role'] as String?,
|
||||
priceEditorDate: json['price_editor_date'] as String?,
|
||||
nonReceipt: json['non_receipt'] as bool?,
|
||||
nonReceiptReturn: json['non_receipt_return'] as bool?,
|
||||
nonReceiptReturnMessage: json['non_receipt_return_message'] as String?,
|
||||
nonReceiptMessage: json['non_receipt_message'] as String?,
|
||||
mainNonReceipt: json['main_non_receipt'] as bool?,
|
||||
nonReceiptState: json['non_receipt_state'] as String?,
|
||||
nonReceiptChecker: json['non_receipt_checker'] as String?,
|
||||
nonReceiptCheckerMessage: json['non_receipt_checker_message'] as String?,
|
||||
nonReceiptCheckerMobile: json['non_receipt_checker_mobile'] as String?,
|
||||
nonReceiptCheckDate: json['non_receipt_check_date'] as String?,
|
||||
nonReceiptReturner: json['non_receipt_returner'] as String?,
|
||||
nonReceiptReturnerMobile: json['non_receipt_returner_mobile'] as String?,
|
||||
nonReceiptReturnDate: json['non_receipt_return_date'] as String?,
|
||||
fine: json['fine'] as bool?,
|
||||
fineAmount: (json['fine_amount'] as num?)?.toDouble(),
|
||||
fineCoefficient: (json['fine_coefficient'] as num?)?.toDouble(),
|
||||
documentNumber: json['document_number'] as String?,
|
||||
companyDocument: json['company_document'] as bool?,
|
||||
warehouse: json['warehouse'] as bool?,
|
||||
warehouseCommitmentWeight: (json['warehouse_commitment_weight'] as num?)
|
||||
?.toDouble(),
|
||||
returnTrash: json['return_trash'] as bool?,
|
||||
amount: (json['amount'] as num?)?.toDouble(),
|
||||
killRequest: (json['kill_request'] as num?)?.toInt(),
|
||||
realAddCar: json['real_add_car'] as String?,
|
||||
barDocumentStatus: json['bar_document_status'] as String?,
|
||||
inputWarehouse: (json['input_warehouse'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$KillHouseBarsToJson(
|
||||
_KillHouseBars instance,
|
||||
) => <String, dynamic>{
|
||||
'killhouse_user': instance.killhouseUser,
|
||||
'killer': instance.killer,
|
||||
'add_car': instance.addCar,
|
||||
'poultry_request': instance.poultryRequest,
|
||||
'weight_info': instance.weightInfo,
|
||||
'key': instance.key,
|
||||
'create_date': instance.createDate,
|
||||
'trash': instance.trash,
|
||||
'quantity': instance.quantity,
|
||||
'bar_code': instance.barCode,
|
||||
'quarantine_quantity': instance.quarantineQuantity,
|
||||
'quarantine_code_state': instance.quarantineCodeState,
|
||||
'fee': instance.fee,
|
||||
'time': instance.time,
|
||||
'state': instance.state,
|
||||
'vet_state': instance.vetState,
|
||||
'active_state': instance.activeState,
|
||||
'assignment_state_archive': instance.assignmentStateArchive,
|
||||
'show_kill_house': instance.showKillHouse,
|
||||
'car': instance.car,
|
||||
'kill_house_message': instance.killHouseMessage,
|
||||
'allocation_state': instance.allocationState,
|
||||
'auction': instance.auction,
|
||||
'role': instance.role,
|
||||
'clearance_code': instance.clearanceCode,
|
||||
'traffic_code': instance.trafficCode,
|
||||
'registrar_clearance_code': instance.registrarClearanceCode,
|
||||
'editor_traffic_code': instance.editorTrafficCode,
|
||||
'bar_remover': instance.barRemover,
|
||||
'extra_killed_quantity': instance.extraKilledQuantity,
|
||||
'accepted_real_quantity': instance.acceptedRealQuantity,
|
||||
'accepted_real_weight': instance.acceptedRealWeight,
|
||||
'extra_killed_weight': instance.extraKilledWeight,
|
||||
'vet_accepted_real_quantity': instance.vetAcceptedRealQuantity,
|
||||
'vet_accepted_real_weight': instance.vetAcceptedRealWeight,
|
||||
'accepted_assignment_real_quantity': instance.acceptedAssignmentRealQuantity,
|
||||
'accepted_assignment_real_weight': instance.acceptedAssignmentRealWeight,
|
||||
'message': instance.message,
|
||||
'ware_house_confirmation': instance.wareHouseConfirmation,
|
||||
'ware_house_accepted_real_quantity': instance.wareHouseAcceptedRealQuantity,
|
||||
'ware_house_accepted_real_weight': instance.wareHouseAcceptedRealWeight,
|
||||
'date_of_ware_house': instance.dateOfWareHouse,
|
||||
'freezing': instance.freezing,
|
||||
'archive_wage': instance.archiveWage,
|
||||
'weight_loss': instance.weightLoss,
|
||||
'ware_house_input_type': instance.wareHouseInputType,
|
||||
'document_status': instance.documentStatus,
|
||||
'aggregate_code': instance.aggregateCode,
|
||||
'aggregate_status': instance.aggregateStatus,
|
||||
'calculate_status': instance.calculateStatus,
|
||||
'temporary_trash': instance.temporaryTrash,
|
||||
'temporary_deleted': instance.temporaryDeleted,
|
||||
'entered_message': instance.enteredMessage,
|
||||
'inquiry_date': instance.inquiryDate,
|
||||
'inquiry_origin': instance.inquiryOrigin,
|
||||
'inquiry_destination': instance.inquiryDestination,
|
||||
'inquiry_driver': instance.inquiryDriver,
|
||||
'inquiry_pelak': instance.inquiryPelak,
|
||||
'settlement_type': instance.settlementType,
|
||||
'price': instance.price,
|
||||
'description': instance.description,
|
||||
'bar_document_description': instance.barDocumentDescription,
|
||||
'image': instance.image,
|
||||
'price_registerar': instance.priceRegisterar,
|
||||
'price_registerar_role': instance.priceRegisterarRole,
|
||||
'price_register_date': instance.priceRegisterDate,
|
||||
'price_editor': instance.priceEditor,
|
||||
'price_editor_role': instance.priceEditorRole,
|
||||
'price_editor_date': instance.priceEditorDate,
|
||||
'non_receipt': instance.nonReceipt,
|
||||
'non_receipt_return': instance.nonReceiptReturn,
|
||||
'non_receipt_return_message': instance.nonReceiptReturnMessage,
|
||||
'non_receipt_message': instance.nonReceiptMessage,
|
||||
'main_non_receipt': instance.mainNonReceipt,
|
||||
'non_receipt_state': instance.nonReceiptState,
|
||||
'non_receipt_checker': instance.nonReceiptChecker,
|
||||
'non_receipt_checker_message': instance.nonReceiptCheckerMessage,
|
||||
'non_receipt_checker_mobile': instance.nonReceiptCheckerMobile,
|
||||
'non_receipt_check_date': instance.nonReceiptCheckDate,
|
||||
'non_receipt_returner': instance.nonReceiptReturner,
|
||||
'non_receipt_returner_mobile': instance.nonReceiptReturnerMobile,
|
||||
'non_receipt_return_date': instance.nonReceiptReturnDate,
|
||||
'fine': instance.fine,
|
||||
'fine_amount': instance.fineAmount,
|
||||
'fine_coefficient': instance.fineCoefficient,
|
||||
'document_number': instance.documentNumber,
|
||||
'company_document': instance.companyDocument,
|
||||
'warehouse': instance.warehouse,
|
||||
'warehouse_commitment_weight': instance.warehouseCommitmentWeight,
|
||||
'return_trash': instance.returnTrash,
|
||||
'amount': instance.amount,
|
||||
'kill_request': instance.killRequest,
|
||||
'real_add_car': instance.realAddCar,
|
||||
'bar_document_status': instance.barDocumentStatus,
|
||||
'input_warehouse': instance.inputWarehouse,
|
||||
};
|
||||
|
||||
_KillHouseUserModel _$KillHouseUserModelFromJson(Map<String, dynamic> json) =>
|
||||
_KillHouseUserModel(
|
||||
killHouseOperator: json['kill_house_operator'] == null
|
||||
? null
|
||||
: KillHouseOperatorModel.fromJson(
|
||||
json['kill_house_operator'] as Map<String, dynamic>,
|
||||
),
|
||||
name: json['name'] as String?,
|
||||
killer: json['killer'] as bool?,
|
||||
key: json['key'] as String?,
|
||||
maximumLoadVolumeIncrease: (json['maximum_load_volume_increase'] as num?)
|
||||
?.toDouble(),
|
||||
maximumLoadVolumeReduction:
|
||||
(json['maximum_load_volume_reduction'] as num?)?.toDouble(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$KillHouseUserModelToJson(_KillHouseUserModel instance) =>
|
||||
<String, dynamic>{
|
||||
'kill_house_operator': instance.killHouseOperator,
|
||||
'name': instance.name,
|
||||
'killer': instance.killer,
|
||||
'key': instance.key,
|
||||
'maximum_load_volume_increase': instance.maximumLoadVolumeIncrease,
|
||||
'maximum_load_volume_reduction': instance.maximumLoadVolumeReduction,
|
||||
};
|
||||
|
||||
_KillHouseOperatorModel _$KillHouseOperatorModelFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _KillHouseOperatorModel(
|
||||
user: json['user'] == null
|
||||
? null
|
||||
: UserDetailModel.fromJson(json['user'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$KillHouseOperatorModelToJson(
|
||||
_KillHouseOperatorModel instance,
|
||||
) => <String, dynamic>{'user': instance.user};
|
||||
|
||||
_UserDetailModel _$UserDetailModelFromJson(Map<String, dynamic> json) =>
|
||||
_UserDetailModel(
|
||||
fullname: json['fullname'] as String?,
|
||||
firstName: json['first_name'] as String?,
|
||||
lastName: json['last_name'] as String?,
|
||||
baseOrder: (json['base_order'] as num?)?.toInt(),
|
||||
mobile: json['mobile'] as String?,
|
||||
nationalId: json['national_id'] as String?,
|
||||
nationalCode: json['national_code'] as String?,
|
||||
key: json['key'] as String?,
|
||||
city: json['city'] == null
|
||||
? null
|
||||
: CityDetailModel.fromJson(json['city'] as Map<String, dynamic>),
|
||||
unitName: json['unit_name'] as String?,
|
||||
unitNationalId: json['unit_national_id'] as String?,
|
||||
unitRegistrationNumber: json['unit_registration_number'] as String?,
|
||||
unitEconomicalNumber: json['unit_economical_number'] as String?,
|
||||
unitProvince: json['unit_province'] as String?,
|
||||
unitCity: json['unit_city'] as String?,
|
||||
unitPostalCode: json['unit_postal_code'] as String?,
|
||||
unitAddress: json['unit_address'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$UserDetailModelToJson(_UserDetailModel instance) =>
|
||||
<String, dynamic>{
|
||||
'fullname': instance.fullname,
|
||||
'first_name': instance.firstName,
|
||||
'last_name': instance.lastName,
|
||||
'base_order': instance.baseOrder,
|
||||
'mobile': instance.mobile,
|
||||
'national_id': instance.nationalId,
|
||||
'national_code': instance.nationalCode,
|
||||
'key': instance.key,
|
||||
'city': instance.city,
|
||||
'unit_name': instance.unitName,
|
||||
'unit_national_id': instance.unitNationalId,
|
||||
'unit_registration_number': instance.unitRegistrationNumber,
|
||||
'unit_economical_number': instance.unitEconomicalNumber,
|
||||
'unit_province': instance.unitProvince,
|
||||
'unit_city': instance.unitCity,
|
||||
'unit_postal_code': instance.unitPostalCode,
|
||||
'unit_address': instance.unitAddress,
|
||||
};
|
||||
|
||||
_CityDetailModel _$CityDetailModelFromJson(Map<String, dynamic> json) =>
|
||||
_CityDetailModel(
|
||||
id: (json['id'] as num?)?.toInt(),
|
||||
key: json['key'] as String?,
|
||||
createDate: json['create_date'] as String?,
|
||||
modifyDate: json['modify_date'] as String?,
|
||||
trash: json['trash'] as bool?,
|
||||
provinceIdForeignKey: (json['province_id_foreign_key'] as num?)?.toInt(),
|
||||
cityIdKey: (json['city_id_key'] as num?)?.toInt(),
|
||||
name: json['name'] as String?,
|
||||
productPrice: (json['product_price'] as num?)?.toDouble(),
|
||||
provinceCenter: json['province_center'] as bool?,
|
||||
cityNumber: (json['city_number'] as num?)?.toInt(),
|
||||
cityName: json['city_name'] as String?,
|
||||
provinceNumber: (json['province_number'] as num?)?.toInt(),
|
||||
provinceName: json['province_name'] as String?,
|
||||
createdBy: json['created_by'] as String?,
|
||||
modifiedBy: json['modified_by'] as String?,
|
||||
province: (json['province'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$CityDetailModelToJson(_CityDetailModel instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'key': instance.key,
|
||||
'create_date': instance.createDate,
|
||||
'modify_date': instance.modifyDate,
|
||||
'trash': instance.trash,
|
||||
'province_id_foreign_key': instance.provinceIdForeignKey,
|
||||
'city_id_key': instance.cityIdKey,
|
||||
'name': instance.name,
|
||||
'product_price': instance.productPrice,
|
||||
'province_center': instance.provinceCenter,
|
||||
'city_number': instance.cityNumber,
|
||||
'city_name': instance.cityName,
|
||||
'province_number': instance.provinceNumber,
|
||||
'province_name': instance.provinceName,
|
||||
'created_by': instance.createdBy,
|
||||
'modified_by': instance.modifiedBy,
|
||||
'province': instance.province,
|
||||
};
|
||||
|
||||
_AddCarModel _$AddCarModelFromJson(Map<String, dynamic> json) => _AddCarModel(
|
||||
driver: json['driver'] == null
|
||||
? null
|
||||
: DriverModel.fromJson(json['driver'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$AddCarModelToJson(_AddCarModel instance) =>
|
||||
<String, dynamic>{'driver': instance.driver};
|
||||
|
||||
_DriverModel _$DriverModelFromJson(Map<String, dynamic> json) => _DriverModel(
|
||||
driverName: json['driver_name'] as String?,
|
||||
driverMobile: json['driver_mobile'] as String?,
|
||||
typeCar: json['type_car'] as String?,
|
||||
pelak: json['pelak'] as String?,
|
||||
healthCode: json['health_code'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$DriverModelToJson(_DriverModel instance) =>
|
||||
<String, dynamic>{
|
||||
'driver_name': instance.driverName,
|
||||
'driver_mobile': instance.driverMobile,
|
||||
'type_car': instance.typeCar,
|
||||
'pelak': instance.pelak,
|
||||
'health_code': instance.healthCode,
|
||||
};
|
||||
|
||||
_PoultryRequestModel _$PoultryRequestModelFromJson(Map<String, dynamic> json) =>
|
||||
_PoultryRequestModel(
|
||||
poultryReqOrderCode: (json['poultry_req_order_code'] as num?)?.toInt(),
|
||||
poultryName: json['poultry_name'] as String?,
|
||||
poultryUserName: json['poultry_user_name'] as String?,
|
||||
poultryMobile: json['poultry_mobile'] as String?,
|
||||
poultryCity: json['poultry_city'] as String?,
|
||||
chickenBreed: json['chicken_breed'] as String?,
|
||||
date: json['date'] as String?,
|
||||
freezing: json['freezing'] as bool?,
|
||||
export: json['export'] as bool?,
|
||||
freeSaleInProvince: json['free_sale_in_province'] as bool?,
|
||||
directBuying: json['direct_buying'] as bool?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$PoultryRequestModelToJson(
|
||||
_PoultryRequestModel instance,
|
||||
) => <String, dynamic>{
|
||||
'poultry_req_order_code': instance.poultryReqOrderCode,
|
||||
'poultry_name': instance.poultryName,
|
||||
'poultry_user_name': instance.poultryUserName,
|
||||
'poultry_mobile': instance.poultryMobile,
|
||||
'poultry_city': instance.poultryCity,
|
||||
'chicken_breed': instance.chickenBreed,
|
||||
'date': instance.date,
|
||||
'freezing': instance.freezing,
|
||||
'export': instance.export,
|
||||
'free_sale_in_province': instance.freeSaleInProvince,
|
||||
'direct_buying': instance.directBuying,
|
||||
};
|
||||
|
||||
_WeightInfoModel _$WeightInfoModelFromJson(Map<String, dynamic> json) =>
|
||||
_WeightInfoModel(
|
||||
indexWeight: (json['index_weight'] as num?)?.toDouble(),
|
||||
weight: (json['weight'] as num?)?.toDouble(),
|
||||
finalIndexWeight: (json['final_index_weight'] as num?)?.toDouble(),
|
||||
killHousePrice: (json['kill_house_price'] as num?)?.toDouble(),
|
||||
weightLoss: (json['weight_loss'] as num?)?.toInt(),
|
||||
inputLoss: (json['input_loss'] as num?)?.toDouble(),
|
||||
state: json['state'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$WeightInfoModelToJson(_WeightInfoModel instance) =>
|
||||
<String, dynamic>{
|
||||
'index_weight': instance.indexWeight,
|
||||
'weight': instance.weight,
|
||||
'final_index_weight': instance.finalIndexWeight,
|
||||
'kill_house_price': instance.killHousePrice,
|
||||
'weight_loss': instance.weightLoss,
|
||||
'input_loss': instance.inputLoss,
|
||||
'state': instance.state,
|
||||
};
|
||||
|
||||
_CarModel _$CarModelFromJson(Map<String, dynamic> json) => _CarModel(
|
||||
id: (json['id'] as num?)?.toInt(),
|
||||
key: json['key'] as String?,
|
||||
pelak: json['pelak'] as String?,
|
||||
typeCar: json['type_car'] as String?,
|
||||
driverName: json['driver_name'] as String?,
|
||||
driverMobile: json['driver_mobile'] as String?,
|
||||
weightWithoutLoad: json['weight_without_load'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$CarModelToJson(_CarModel instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'key': instance.key,
|
||||
'pelak': instance.pelak,
|
||||
'type_car': instance.typeCar,
|
||||
'driver_name': instance.driverName,
|
||||
'driver_mobile': instance.driverMobile,
|
||||
'weight_without_load': instance.weightWithoutLoad,
|
||||
};
|
||||
|
||||
_RegistrarClearanceCode _$RegistrarClearanceCodeFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _RegistrarClearanceCode(
|
||||
date: json['date'] as String?,
|
||||
name: json['name'] as String?,
|
||||
role: json['role'] as String?,
|
||||
mobile: json['mobile'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$RegistrarClearanceCodeToJson(
|
||||
_RegistrarClearanceCode instance,
|
||||
) => <String, dynamic>{
|
||||
'date': instance.date,
|
||||
'name': instance.name,
|
||||
'role': instance.role,
|
||||
'mobile': instance.mobile,
|
||||
};
|
||||
@@ -1,35 +0,0 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'kill_house_sales_info_dashboard.freezed.dart';
|
||||
part 'kill_house_sales_info_dashboard.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class KillHouseSalesInfoDashboard with _$KillHouseSalesInfoDashboard {
|
||||
const factory KillHouseSalesInfoDashboard({
|
||||
double? totalGovernmentalInputWeight,
|
||||
double? totalFreeInputWeight,
|
||||
double? totalGovernmentalOutputWeight,
|
||||
double? totalFreeOutputWeight,
|
||||
double? totalGovernmentalRemainWeight,
|
||||
double? totalFreeRemainWeight,
|
||||
@JsonKey(name: 'total_kill_house_free_sale__bar_carcasses_weight')
|
||||
double? totalKillHouseFreeSaleBarCarcassesWeight,
|
||||
double? totalKillHouseAllocationsWeight,
|
||||
double? segmentationsWeight,
|
||||
double? coldHouseAllocationsWeight,
|
||||
double? totalSellingInProvinceGovernmentalWeight,
|
||||
double? totalSellingInProvinceFreeWeight,
|
||||
double? totalCommitmentSellingInProvinceGovernmentalWeight,
|
||||
double? totalCommitmentSellingInProvinceGovernmentalRemainWeight,
|
||||
double? totalCommitmentSellingInProvinceFreeWeight,
|
||||
double? totalCommitmentSellingInProvinceFreeRemainWeight,
|
||||
double? posAllocatedWeight,
|
||||
double? posGovernmentalAllocatedWeight,
|
||||
double? posFreeAllocatedWeight,
|
||||
double? wareHouseArchiveGovernmentalWeight,
|
||||
double? wareHouseArchiveFreeWeight,
|
||||
}) = _KillHouseSalesInfoDashboard;
|
||||
|
||||
factory KillHouseSalesInfoDashboard.fromJson(Map<String, dynamic> json) =>
|
||||
_$KillHouseSalesInfoDashboardFromJson(json);
|
||||
}
|
||||
@@ -1,337 +0,0 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'kill_house_sales_info_dashboard.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$KillHouseSalesInfoDashboard {
|
||||
|
||||
double? get totalGovernmentalInputWeight; double? get totalFreeInputWeight; double? get totalGovernmentalOutputWeight; double? get totalFreeOutputWeight; double? get totalGovernmentalRemainWeight; double? get totalFreeRemainWeight;@JsonKey(name: 'total_kill_house_free_sale__bar_carcasses_weight') double? get totalKillHouseFreeSaleBarCarcassesWeight; double? get totalKillHouseAllocationsWeight; double? get segmentationsWeight; double? get coldHouseAllocationsWeight; double? get totalSellingInProvinceGovernmentalWeight; double? get totalSellingInProvinceFreeWeight; double? get totalCommitmentSellingInProvinceGovernmentalWeight; double? get totalCommitmentSellingInProvinceGovernmentalRemainWeight; double? get totalCommitmentSellingInProvinceFreeWeight; double? get totalCommitmentSellingInProvinceFreeRemainWeight; double? get posAllocatedWeight; double? get posGovernmentalAllocatedWeight; double? get posFreeAllocatedWeight; double? get wareHouseArchiveGovernmentalWeight; double? get wareHouseArchiveFreeWeight;
|
||||
/// Create a copy of KillHouseSalesInfoDashboard
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$KillHouseSalesInfoDashboardCopyWith<KillHouseSalesInfoDashboard> get copyWith => _$KillHouseSalesInfoDashboardCopyWithImpl<KillHouseSalesInfoDashboard>(this as KillHouseSalesInfoDashboard, _$identity);
|
||||
|
||||
/// Serializes this KillHouseSalesInfoDashboard to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is KillHouseSalesInfoDashboard&&(identical(other.totalGovernmentalInputWeight, totalGovernmentalInputWeight) || other.totalGovernmentalInputWeight == totalGovernmentalInputWeight)&&(identical(other.totalFreeInputWeight, totalFreeInputWeight) || other.totalFreeInputWeight == totalFreeInputWeight)&&(identical(other.totalGovernmentalOutputWeight, totalGovernmentalOutputWeight) || other.totalGovernmentalOutputWeight == totalGovernmentalOutputWeight)&&(identical(other.totalFreeOutputWeight, totalFreeOutputWeight) || other.totalFreeOutputWeight == totalFreeOutputWeight)&&(identical(other.totalGovernmentalRemainWeight, totalGovernmentalRemainWeight) || other.totalGovernmentalRemainWeight == totalGovernmentalRemainWeight)&&(identical(other.totalFreeRemainWeight, totalFreeRemainWeight) || other.totalFreeRemainWeight == totalFreeRemainWeight)&&(identical(other.totalKillHouseFreeSaleBarCarcassesWeight, totalKillHouseFreeSaleBarCarcassesWeight) || other.totalKillHouseFreeSaleBarCarcassesWeight == totalKillHouseFreeSaleBarCarcassesWeight)&&(identical(other.totalKillHouseAllocationsWeight, totalKillHouseAllocationsWeight) || other.totalKillHouseAllocationsWeight == totalKillHouseAllocationsWeight)&&(identical(other.segmentationsWeight, segmentationsWeight) || other.segmentationsWeight == segmentationsWeight)&&(identical(other.coldHouseAllocationsWeight, coldHouseAllocationsWeight) || other.coldHouseAllocationsWeight == coldHouseAllocationsWeight)&&(identical(other.totalSellingInProvinceGovernmentalWeight, totalSellingInProvinceGovernmentalWeight) || other.totalSellingInProvinceGovernmentalWeight == totalSellingInProvinceGovernmentalWeight)&&(identical(other.totalSellingInProvinceFreeWeight, totalSellingInProvinceFreeWeight) || other.totalSellingInProvinceFreeWeight == totalSellingInProvinceFreeWeight)&&(identical(other.totalCommitmentSellingInProvinceGovernmentalWeight, totalCommitmentSellingInProvinceGovernmentalWeight) || other.totalCommitmentSellingInProvinceGovernmentalWeight == totalCommitmentSellingInProvinceGovernmentalWeight)&&(identical(other.totalCommitmentSellingInProvinceGovernmentalRemainWeight, totalCommitmentSellingInProvinceGovernmentalRemainWeight) || other.totalCommitmentSellingInProvinceGovernmentalRemainWeight == totalCommitmentSellingInProvinceGovernmentalRemainWeight)&&(identical(other.totalCommitmentSellingInProvinceFreeWeight, totalCommitmentSellingInProvinceFreeWeight) || other.totalCommitmentSellingInProvinceFreeWeight == totalCommitmentSellingInProvinceFreeWeight)&&(identical(other.totalCommitmentSellingInProvinceFreeRemainWeight, totalCommitmentSellingInProvinceFreeRemainWeight) || other.totalCommitmentSellingInProvinceFreeRemainWeight == totalCommitmentSellingInProvinceFreeRemainWeight)&&(identical(other.posAllocatedWeight, posAllocatedWeight) || other.posAllocatedWeight == posAllocatedWeight)&&(identical(other.posGovernmentalAllocatedWeight, posGovernmentalAllocatedWeight) || other.posGovernmentalAllocatedWeight == posGovernmentalAllocatedWeight)&&(identical(other.posFreeAllocatedWeight, posFreeAllocatedWeight) || other.posFreeAllocatedWeight == posFreeAllocatedWeight)&&(identical(other.wareHouseArchiveGovernmentalWeight, wareHouseArchiveGovernmentalWeight) || other.wareHouseArchiveGovernmentalWeight == wareHouseArchiveGovernmentalWeight)&&(identical(other.wareHouseArchiveFreeWeight, wareHouseArchiveFreeWeight) || other.wareHouseArchiveFreeWeight == wareHouseArchiveFreeWeight));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hashAll([runtimeType,totalGovernmentalInputWeight,totalFreeInputWeight,totalGovernmentalOutputWeight,totalFreeOutputWeight,totalGovernmentalRemainWeight,totalFreeRemainWeight,totalKillHouseFreeSaleBarCarcassesWeight,totalKillHouseAllocationsWeight,segmentationsWeight,coldHouseAllocationsWeight,totalSellingInProvinceGovernmentalWeight,totalSellingInProvinceFreeWeight,totalCommitmentSellingInProvinceGovernmentalWeight,totalCommitmentSellingInProvinceGovernmentalRemainWeight,totalCommitmentSellingInProvinceFreeWeight,totalCommitmentSellingInProvinceFreeRemainWeight,posAllocatedWeight,posGovernmentalAllocatedWeight,posFreeAllocatedWeight,wareHouseArchiveGovernmentalWeight,wareHouseArchiveFreeWeight]);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'KillHouseSalesInfoDashboard(totalGovernmentalInputWeight: $totalGovernmentalInputWeight, totalFreeInputWeight: $totalFreeInputWeight, totalGovernmentalOutputWeight: $totalGovernmentalOutputWeight, totalFreeOutputWeight: $totalFreeOutputWeight, totalGovernmentalRemainWeight: $totalGovernmentalRemainWeight, totalFreeRemainWeight: $totalFreeRemainWeight, totalKillHouseFreeSaleBarCarcassesWeight: $totalKillHouseFreeSaleBarCarcassesWeight, totalKillHouseAllocationsWeight: $totalKillHouseAllocationsWeight, segmentationsWeight: $segmentationsWeight, coldHouseAllocationsWeight: $coldHouseAllocationsWeight, totalSellingInProvinceGovernmentalWeight: $totalSellingInProvinceGovernmentalWeight, totalSellingInProvinceFreeWeight: $totalSellingInProvinceFreeWeight, totalCommitmentSellingInProvinceGovernmentalWeight: $totalCommitmentSellingInProvinceGovernmentalWeight, totalCommitmentSellingInProvinceGovernmentalRemainWeight: $totalCommitmentSellingInProvinceGovernmentalRemainWeight, totalCommitmentSellingInProvinceFreeWeight: $totalCommitmentSellingInProvinceFreeWeight, totalCommitmentSellingInProvinceFreeRemainWeight: $totalCommitmentSellingInProvinceFreeRemainWeight, posAllocatedWeight: $posAllocatedWeight, posGovernmentalAllocatedWeight: $posGovernmentalAllocatedWeight, posFreeAllocatedWeight: $posFreeAllocatedWeight, wareHouseArchiveGovernmentalWeight: $wareHouseArchiveGovernmentalWeight, wareHouseArchiveFreeWeight: $wareHouseArchiveFreeWeight)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $KillHouseSalesInfoDashboardCopyWith<$Res> {
|
||||
factory $KillHouseSalesInfoDashboardCopyWith(KillHouseSalesInfoDashboard value, $Res Function(KillHouseSalesInfoDashboard) _then) = _$KillHouseSalesInfoDashboardCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
double? totalGovernmentalInputWeight, double? totalFreeInputWeight, double? totalGovernmentalOutputWeight, double? totalFreeOutputWeight, double? totalGovernmentalRemainWeight, double? totalFreeRemainWeight,@JsonKey(name: 'total_kill_house_free_sale__bar_carcasses_weight') double? totalKillHouseFreeSaleBarCarcassesWeight, double? totalKillHouseAllocationsWeight, double? segmentationsWeight, double? coldHouseAllocationsWeight, double? totalSellingInProvinceGovernmentalWeight, double? totalSellingInProvinceFreeWeight, double? totalCommitmentSellingInProvinceGovernmentalWeight, double? totalCommitmentSellingInProvinceGovernmentalRemainWeight, double? totalCommitmentSellingInProvinceFreeWeight, double? totalCommitmentSellingInProvinceFreeRemainWeight, double? posAllocatedWeight, double? posGovernmentalAllocatedWeight, double? posFreeAllocatedWeight, double? wareHouseArchiveGovernmentalWeight, double? wareHouseArchiveFreeWeight
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$KillHouseSalesInfoDashboardCopyWithImpl<$Res>
|
||||
implements $KillHouseSalesInfoDashboardCopyWith<$Res> {
|
||||
_$KillHouseSalesInfoDashboardCopyWithImpl(this._self, this._then);
|
||||
|
||||
final KillHouseSalesInfoDashboard _self;
|
||||
final $Res Function(KillHouseSalesInfoDashboard) _then;
|
||||
|
||||
/// Create a copy of KillHouseSalesInfoDashboard
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? totalGovernmentalInputWeight = freezed,Object? totalFreeInputWeight = freezed,Object? totalGovernmentalOutputWeight = freezed,Object? totalFreeOutputWeight = freezed,Object? totalGovernmentalRemainWeight = freezed,Object? totalFreeRemainWeight = freezed,Object? totalKillHouseFreeSaleBarCarcassesWeight = freezed,Object? totalKillHouseAllocationsWeight = freezed,Object? segmentationsWeight = freezed,Object? coldHouseAllocationsWeight = freezed,Object? totalSellingInProvinceGovernmentalWeight = freezed,Object? totalSellingInProvinceFreeWeight = freezed,Object? totalCommitmentSellingInProvinceGovernmentalWeight = freezed,Object? totalCommitmentSellingInProvinceGovernmentalRemainWeight = freezed,Object? totalCommitmentSellingInProvinceFreeWeight = freezed,Object? totalCommitmentSellingInProvinceFreeRemainWeight = freezed,Object? posAllocatedWeight = freezed,Object? posGovernmentalAllocatedWeight = freezed,Object? posFreeAllocatedWeight = freezed,Object? wareHouseArchiveGovernmentalWeight = freezed,Object? wareHouseArchiveFreeWeight = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
totalGovernmentalInputWeight: freezed == totalGovernmentalInputWeight ? _self.totalGovernmentalInputWeight : totalGovernmentalInputWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,totalFreeInputWeight: freezed == totalFreeInputWeight ? _self.totalFreeInputWeight : totalFreeInputWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,totalGovernmentalOutputWeight: freezed == totalGovernmentalOutputWeight ? _self.totalGovernmentalOutputWeight : totalGovernmentalOutputWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,totalFreeOutputWeight: freezed == totalFreeOutputWeight ? _self.totalFreeOutputWeight : totalFreeOutputWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,totalGovernmentalRemainWeight: freezed == totalGovernmentalRemainWeight ? _self.totalGovernmentalRemainWeight : totalGovernmentalRemainWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,totalFreeRemainWeight: freezed == totalFreeRemainWeight ? _self.totalFreeRemainWeight : totalFreeRemainWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,totalKillHouseFreeSaleBarCarcassesWeight: freezed == totalKillHouseFreeSaleBarCarcassesWeight ? _self.totalKillHouseFreeSaleBarCarcassesWeight : totalKillHouseFreeSaleBarCarcassesWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,totalKillHouseAllocationsWeight: freezed == totalKillHouseAllocationsWeight ? _self.totalKillHouseAllocationsWeight : totalKillHouseAllocationsWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,segmentationsWeight: freezed == segmentationsWeight ? _self.segmentationsWeight : segmentationsWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,coldHouseAllocationsWeight: freezed == coldHouseAllocationsWeight ? _self.coldHouseAllocationsWeight : coldHouseAllocationsWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,totalSellingInProvinceGovernmentalWeight: freezed == totalSellingInProvinceGovernmentalWeight ? _self.totalSellingInProvinceGovernmentalWeight : totalSellingInProvinceGovernmentalWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,totalSellingInProvinceFreeWeight: freezed == totalSellingInProvinceFreeWeight ? _self.totalSellingInProvinceFreeWeight : totalSellingInProvinceFreeWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,totalCommitmentSellingInProvinceGovernmentalWeight: freezed == totalCommitmentSellingInProvinceGovernmentalWeight ? _self.totalCommitmentSellingInProvinceGovernmentalWeight : totalCommitmentSellingInProvinceGovernmentalWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,totalCommitmentSellingInProvinceGovernmentalRemainWeight: freezed == totalCommitmentSellingInProvinceGovernmentalRemainWeight ? _self.totalCommitmentSellingInProvinceGovernmentalRemainWeight : totalCommitmentSellingInProvinceGovernmentalRemainWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,totalCommitmentSellingInProvinceFreeWeight: freezed == totalCommitmentSellingInProvinceFreeWeight ? _self.totalCommitmentSellingInProvinceFreeWeight : totalCommitmentSellingInProvinceFreeWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,totalCommitmentSellingInProvinceFreeRemainWeight: freezed == totalCommitmentSellingInProvinceFreeRemainWeight ? _self.totalCommitmentSellingInProvinceFreeRemainWeight : totalCommitmentSellingInProvinceFreeRemainWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,posAllocatedWeight: freezed == posAllocatedWeight ? _self.posAllocatedWeight : posAllocatedWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,posGovernmentalAllocatedWeight: freezed == posGovernmentalAllocatedWeight ? _self.posGovernmentalAllocatedWeight : posGovernmentalAllocatedWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,posFreeAllocatedWeight: freezed == posFreeAllocatedWeight ? _self.posFreeAllocatedWeight : posFreeAllocatedWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,wareHouseArchiveGovernmentalWeight: freezed == wareHouseArchiveGovernmentalWeight ? _self.wareHouseArchiveGovernmentalWeight : wareHouseArchiveGovernmentalWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,wareHouseArchiveFreeWeight: freezed == wareHouseArchiveFreeWeight ? _self.wareHouseArchiveFreeWeight : wareHouseArchiveFreeWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [KillHouseSalesInfoDashboard].
|
||||
extension KillHouseSalesInfoDashboardPatterns on KillHouseSalesInfoDashboard {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _KillHouseSalesInfoDashboard value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _KillHouseSalesInfoDashboard() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _KillHouseSalesInfoDashboard value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _KillHouseSalesInfoDashboard():
|
||||
return $default(_that);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _KillHouseSalesInfoDashboard value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _KillHouseSalesInfoDashboard() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( double? totalGovernmentalInputWeight, double? totalFreeInputWeight, double? totalGovernmentalOutputWeight, double? totalFreeOutputWeight, double? totalGovernmentalRemainWeight, double? totalFreeRemainWeight, @JsonKey(name: 'total_kill_house_free_sale__bar_carcasses_weight') double? totalKillHouseFreeSaleBarCarcassesWeight, double? totalKillHouseAllocationsWeight, double? segmentationsWeight, double? coldHouseAllocationsWeight, double? totalSellingInProvinceGovernmentalWeight, double? totalSellingInProvinceFreeWeight, double? totalCommitmentSellingInProvinceGovernmentalWeight, double? totalCommitmentSellingInProvinceGovernmentalRemainWeight, double? totalCommitmentSellingInProvinceFreeWeight, double? totalCommitmentSellingInProvinceFreeRemainWeight, double? posAllocatedWeight, double? posGovernmentalAllocatedWeight, double? posFreeAllocatedWeight, double? wareHouseArchiveGovernmentalWeight, double? wareHouseArchiveFreeWeight)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _KillHouseSalesInfoDashboard() when $default != null:
|
||||
return $default(_that.totalGovernmentalInputWeight,_that.totalFreeInputWeight,_that.totalGovernmentalOutputWeight,_that.totalFreeOutputWeight,_that.totalGovernmentalRemainWeight,_that.totalFreeRemainWeight,_that.totalKillHouseFreeSaleBarCarcassesWeight,_that.totalKillHouseAllocationsWeight,_that.segmentationsWeight,_that.coldHouseAllocationsWeight,_that.totalSellingInProvinceGovernmentalWeight,_that.totalSellingInProvinceFreeWeight,_that.totalCommitmentSellingInProvinceGovernmentalWeight,_that.totalCommitmentSellingInProvinceGovernmentalRemainWeight,_that.totalCommitmentSellingInProvinceFreeWeight,_that.totalCommitmentSellingInProvinceFreeRemainWeight,_that.posAllocatedWeight,_that.posGovernmentalAllocatedWeight,_that.posFreeAllocatedWeight,_that.wareHouseArchiveGovernmentalWeight,_that.wareHouseArchiveFreeWeight);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( double? totalGovernmentalInputWeight, double? totalFreeInputWeight, double? totalGovernmentalOutputWeight, double? totalFreeOutputWeight, double? totalGovernmentalRemainWeight, double? totalFreeRemainWeight, @JsonKey(name: 'total_kill_house_free_sale__bar_carcasses_weight') double? totalKillHouseFreeSaleBarCarcassesWeight, double? totalKillHouseAllocationsWeight, double? segmentationsWeight, double? coldHouseAllocationsWeight, double? totalSellingInProvinceGovernmentalWeight, double? totalSellingInProvinceFreeWeight, double? totalCommitmentSellingInProvinceGovernmentalWeight, double? totalCommitmentSellingInProvinceGovernmentalRemainWeight, double? totalCommitmentSellingInProvinceFreeWeight, double? totalCommitmentSellingInProvinceFreeRemainWeight, double? posAllocatedWeight, double? posGovernmentalAllocatedWeight, double? posFreeAllocatedWeight, double? wareHouseArchiveGovernmentalWeight, double? wareHouseArchiveFreeWeight) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _KillHouseSalesInfoDashboard():
|
||||
return $default(_that.totalGovernmentalInputWeight,_that.totalFreeInputWeight,_that.totalGovernmentalOutputWeight,_that.totalFreeOutputWeight,_that.totalGovernmentalRemainWeight,_that.totalFreeRemainWeight,_that.totalKillHouseFreeSaleBarCarcassesWeight,_that.totalKillHouseAllocationsWeight,_that.segmentationsWeight,_that.coldHouseAllocationsWeight,_that.totalSellingInProvinceGovernmentalWeight,_that.totalSellingInProvinceFreeWeight,_that.totalCommitmentSellingInProvinceGovernmentalWeight,_that.totalCommitmentSellingInProvinceGovernmentalRemainWeight,_that.totalCommitmentSellingInProvinceFreeWeight,_that.totalCommitmentSellingInProvinceFreeRemainWeight,_that.posAllocatedWeight,_that.posGovernmentalAllocatedWeight,_that.posFreeAllocatedWeight,_that.wareHouseArchiveGovernmentalWeight,_that.wareHouseArchiveFreeWeight);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( double? totalGovernmentalInputWeight, double? totalFreeInputWeight, double? totalGovernmentalOutputWeight, double? totalFreeOutputWeight, double? totalGovernmentalRemainWeight, double? totalFreeRemainWeight, @JsonKey(name: 'total_kill_house_free_sale__bar_carcasses_weight') double? totalKillHouseFreeSaleBarCarcassesWeight, double? totalKillHouseAllocationsWeight, double? segmentationsWeight, double? coldHouseAllocationsWeight, double? totalSellingInProvinceGovernmentalWeight, double? totalSellingInProvinceFreeWeight, double? totalCommitmentSellingInProvinceGovernmentalWeight, double? totalCommitmentSellingInProvinceGovernmentalRemainWeight, double? totalCommitmentSellingInProvinceFreeWeight, double? totalCommitmentSellingInProvinceFreeRemainWeight, double? posAllocatedWeight, double? posGovernmentalAllocatedWeight, double? posFreeAllocatedWeight, double? wareHouseArchiveGovernmentalWeight, double? wareHouseArchiveFreeWeight)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _KillHouseSalesInfoDashboard() when $default != null:
|
||||
return $default(_that.totalGovernmentalInputWeight,_that.totalFreeInputWeight,_that.totalGovernmentalOutputWeight,_that.totalFreeOutputWeight,_that.totalGovernmentalRemainWeight,_that.totalFreeRemainWeight,_that.totalKillHouseFreeSaleBarCarcassesWeight,_that.totalKillHouseAllocationsWeight,_that.segmentationsWeight,_that.coldHouseAllocationsWeight,_that.totalSellingInProvinceGovernmentalWeight,_that.totalSellingInProvinceFreeWeight,_that.totalCommitmentSellingInProvinceGovernmentalWeight,_that.totalCommitmentSellingInProvinceGovernmentalRemainWeight,_that.totalCommitmentSellingInProvinceFreeWeight,_that.totalCommitmentSellingInProvinceFreeRemainWeight,_that.posAllocatedWeight,_that.posGovernmentalAllocatedWeight,_that.posFreeAllocatedWeight,_that.wareHouseArchiveGovernmentalWeight,_that.wareHouseArchiveFreeWeight);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _KillHouseSalesInfoDashboard implements KillHouseSalesInfoDashboard {
|
||||
const _KillHouseSalesInfoDashboard({this.totalGovernmentalInputWeight, this.totalFreeInputWeight, this.totalGovernmentalOutputWeight, this.totalFreeOutputWeight, this.totalGovernmentalRemainWeight, this.totalFreeRemainWeight, @JsonKey(name: 'total_kill_house_free_sale__bar_carcasses_weight') this.totalKillHouseFreeSaleBarCarcassesWeight, this.totalKillHouseAllocationsWeight, this.segmentationsWeight, this.coldHouseAllocationsWeight, this.totalSellingInProvinceGovernmentalWeight, this.totalSellingInProvinceFreeWeight, this.totalCommitmentSellingInProvinceGovernmentalWeight, this.totalCommitmentSellingInProvinceGovernmentalRemainWeight, this.totalCommitmentSellingInProvinceFreeWeight, this.totalCommitmentSellingInProvinceFreeRemainWeight, this.posAllocatedWeight, this.posGovernmentalAllocatedWeight, this.posFreeAllocatedWeight, this.wareHouseArchiveGovernmentalWeight, this.wareHouseArchiveFreeWeight});
|
||||
factory _KillHouseSalesInfoDashboard.fromJson(Map<String, dynamic> json) => _$KillHouseSalesInfoDashboardFromJson(json);
|
||||
|
||||
@override final double? totalGovernmentalInputWeight;
|
||||
@override final double? totalFreeInputWeight;
|
||||
@override final double? totalGovernmentalOutputWeight;
|
||||
@override final double? totalFreeOutputWeight;
|
||||
@override final double? totalGovernmentalRemainWeight;
|
||||
@override final double? totalFreeRemainWeight;
|
||||
@override@JsonKey(name: 'total_kill_house_free_sale__bar_carcasses_weight') final double? totalKillHouseFreeSaleBarCarcassesWeight;
|
||||
@override final double? totalKillHouseAllocationsWeight;
|
||||
@override final double? segmentationsWeight;
|
||||
@override final double? coldHouseAllocationsWeight;
|
||||
@override final double? totalSellingInProvinceGovernmentalWeight;
|
||||
@override final double? totalSellingInProvinceFreeWeight;
|
||||
@override final double? totalCommitmentSellingInProvinceGovernmentalWeight;
|
||||
@override final double? totalCommitmentSellingInProvinceGovernmentalRemainWeight;
|
||||
@override final double? totalCommitmentSellingInProvinceFreeWeight;
|
||||
@override final double? totalCommitmentSellingInProvinceFreeRemainWeight;
|
||||
@override final double? posAllocatedWeight;
|
||||
@override final double? posGovernmentalAllocatedWeight;
|
||||
@override final double? posFreeAllocatedWeight;
|
||||
@override final double? wareHouseArchiveGovernmentalWeight;
|
||||
@override final double? wareHouseArchiveFreeWeight;
|
||||
|
||||
/// Create a copy of KillHouseSalesInfoDashboard
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$KillHouseSalesInfoDashboardCopyWith<_KillHouseSalesInfoDashboard> get copyWith => __$KillHouseSalesInfoDashboardCopyWithImpl<_KillHouseSalesInfoDashboard>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$KillHouseSalesInfoDashboardToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _KillHouseSalesInfoDashboard&&(identical(other.totalGovernmentalInputWeight, totalGovernmentalInputWeight) || other.totalGovernmentalInputWeight == totalGovernmentalInputWeight)&&(identical(other.totalFreeInputWeight, totalFreeInputWeight) || other.totalFreeInputWeight == totalFreeInputWeight)&&(identical(other.totalGovernmentalOutputWeight, totalGovernmentalOutputWeight) || other.totalGovernmentalOutputWeight == totalGovernmentalOutputWeight)&&(identical(other.totalFreeOutputWeight, totalFreeOutputWeight) || other.totalFreeOutputWeight == totalFreeOutputWeight)&&(identical(other.totalGovernmentalRemainWeight, totalGovernmentalRemainWeight) || other.totalGovernmentalRemainWeight == totalGovernmentalRemainWeight)&&(identical(other.totalFreeRemainWeight, totalFreeRemainWeight) || other.totalFreeRemainWeight == totalFreeRemainWeight)&&(identical(other.totalKillHouseFreeSaleBarCarcassesWeight, totalKillHouseFreeSaleBarCarcassesWeight) || other.totalKillHouseFreeSaleBarCarcassesWeight == totalKillHouseFreeSaleBarCarcassesWeight)&&(identical(other.totalKillHouseAllocationsWeight, totalKillHouseAllocationsWeight) || other.totalKillHouseAllocationsWeight == totalKillHouseAllocationsWeight)&&(identical(other.segmentationsWeight, segmentationsWeight) || other.segmentationsWeight == segmentationsWeight)&&(identical(other.coldHouseAllocationsWeight, coldHouseAllocationsWeight) || other.coldHouseAllocationsWeight == coldHouseAllocationsWeight)&&(identical(other.totalSellingInProvinceGovernmentalWeight, totalSellingInProvinceGovernmentalWeight) || other.totalSellingInProvinceGovernmentalWeight == totalSellingInProvinceGovernmentalWeight)&&(identical(other.totalSellingInProvinceFreeWeight, totalSellingInProvinceFreeWeight) || other.totalSellingInProvinceFreeWeight == totalSellingInProvinceFreeWeight)&&(identical(other.totalCommitmentSellingInProvinceGovernmentalWeight, totalCommitmentSellingInProvinceGovernmentalWeight) || other.totalCommitmentSellingInProvinceGovernmentalWeight == totalCommitmentSellingInProvinceGovernmentalWeight)&&(identical(other.totalCommitmentSellingInProvinceGovernmentalRemainWeight, totalCommitmentSellingInProvinceGovernmentalRemainWeight) || other.totalCommitmentSellingInProvinceGovernmentalRemainWeight == totalCommitmentSellingInProvinceGovernmentalRemainWeight)&&(identical(other.totalCommitmentSellingInProvinceFreeWeight, totalCommitmentSellingInProvinceFreeWeight) || other.totalCommitmentSellingInProvinceFreeWeight == totalCommitmentSellingInProvinceFreeWeight)&&(identical(other.totalCommitmentSellingInProvinceFreeRemainWeight, totalCommitmentSellingInProvinceFreeRemainWeight) || other.totalCommitmentSellingInProvinceFreeRemainWeight == totalCommitmentSellingInProvinceFreeRemainWeight)&&(identical(other.posAllocatedWeight, posAllocatedWeight) || other.posAllocatedWeight == posAllocatedWeight)&&(identical(other.posGovernmentalAllocatedWeight, posGovernmentalAllocatedWeight) || other.posGovernmentalAllocatedWeight == posGovernmentalAllocatedWeight)&&(identical(other.posFreeAllocatedWeight, posFreeAllocatedWeight) || other.posFreeAllocatedWeight == posFreeAllocatedWeight)&&(identical(other.wareHouseArchiveGovernmentalWeight, wareHouseArchiveGovernmentalWeight) || other.wareHouseArchiveGovernmentalWeight == wareHouseArchiveGovernmentalWeight)&&(identical(other.wareHouseArchiveFreeWeight, wareHouseArchiveFreeWeight) || other.wareHouseArchiveFreeWeight == wareHouseArchiveFreeWeight));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hashAll([runtimeType,totalGovernmentalInputWeight,totalFreeInputWeight,totalGovernmentalOutputWeight,totalFreeOutputWeight,totalGovernmentalRemainWeight,totalFreeRemainWeight,totalKillHouseFreeSaleBarCarcassesWeight,totalKillHouseAllocationsWeight,segmentationsWeight,coldHouseAllocationsWeight,totalSellingInProvinceGovernmentalWeight,totalSellingInProvinceFreeWeight,totalCommitmentSellingInProvinceGovernmentalWeight,totalCommitmentSellingInProvinceGovernmentalRemainWeight,totalCommitmentSellingInProvinceFreeWeight,totalCommitmentSellingInProvinceFreeRemainWeight,posAllocatedWeight,posGovernmentalAllocatedWeight,posFreeAllocatedWeight,wareHouseArchiveGovernmentalWeight,wareHouseArchiveFreeWeight]);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'KillHouseSalesInfoDashboard(totalGovernmentalInputWeight: $totalGovernmentalInputWeight, totalFreeInputWeight: $totalFreeInputWeight, totalGovernmentalOutputWeight: $totalGovernmentalOutputWeight, totalFreeOutputWeight: $totalFreeOutputWeight, totalGovernmentalRemainWeight: $totalGovernmentalRemainWeight, totalFreeRemainWeight: $totalFreeRemainWeight, totalKillHouseFreeSaleBarCarcassesWeight: $totalKillHouseFreeSaleBarCarcassesWeight, totalKillHouseAllocationsWeight: $totalKillHouseAllocationsWeight, segmentationsWeight: $segmentationsWeight, coldHouseAllocationsWeight: $coldHouseAllocationsWeight, totalSellingInProvinceGovernmentalWeight: $totalSellingInProvinceGovernmentalWeight, totalSellingInProvinceFreeWeight: $totalSellingInProvinceFreeWeight, totalCommitmentSellingInProvinceGovernmentalWeight: $totalCommitmentSellingInProvinceGovernmentalWeight, totalCommitmentSellingInProvinceGovernmentalRemainWeight: $totalCommitmentSellingInProvinceGovernmentalRemainWeight, totalCommitmentSellingInProvinceFreeWeight: $totalCommitmentSellingInProvinceFreeWeight, totalCommitmentSellingInProvinceFreeRemainWeight: $totalCommitmentSellingInProvinceFreeRemainWeight, posAllocatedWeight: $posAllocatedWeight, posGovernmentalAllocatedWeight: $posGovernmentalAllocatedWeight, posFreeAllocatedWeight: $posFreeAllocatedWeight, wareHouseArchiveGovernmentalWeight: $wareHouseArchiveGovernmentalWeight, wareHouseArchiveFreeWeight: $wareHouseArchiveFreeWeight)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$KillHouseSalesInfoDashboardCopyWith<$Res> implements $KillHouseSalesInfoDashboardCopyWith<$Res> {
|
||||
factory _$KillHouseSalesInfoDashboardCopyWith(_KillHouseSalesInfoDashboard value, $Res Function(_KillHouseSalesInfoDashboard) _then) = __$KillHouseSalesInfoDashboardCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
double? totalGovernmentalInputWeight, double? totalFreeInputWeight, double? totalGovernmentalOutputWeight, double? totalFreeOutputWeight, double? totalGovernmentalRemainWeight, double? totalFreeRemainWeight,@JsonKey(name: 'total_kill_house_free_sale__bar_carcasses_weight') double? totalKillHouseFreeSaleBarCarcassesWeight, double? totalKillHouseAllocationsWeight, double? segmentationsWeight, double? coldHouseAllocationsWeight, double? totalSellingInProvinceGovernmentalWeight, double? totalSellingInProvinceFreeWeight, double? totalCommitmentSellingInProvinceGovernmentalWeight, double? totalCommitmentSellingInProvinceGovernmentalRemainWeight, double? totalCommitmentSellingInProvinceFreeWeight, double? totalCommitmentSellingInProvinceFreeRemainWeight, double? posAllocatedWeight, double? posGovernmentalAllocatedWeight, double? posFreeAllocatedWeight, double? wareHouseArchiveGovernmentalWeight, double? wareHouseArchiveFreeWeight
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$KillHouseSalesInfoDashboardCopyWithImpl<$Res>
|
||||
implements _$KillHouseSalesInfoDashboardCopyWith<$Res> {
|
||||
__$KillHouseSalesInfoDashboardCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _KillHouseSalesInfoDashboard _self;
|
||||
final $Res Function(_KillHouseSalesInfoDashboard) _then;
|
||||
|
||||
/// Create a copy of KillHouseSalesInfoDashboard
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? totalGovernmentalInputWeight = freezed,Object? totalFreeInputWeight = freezed,Object? totalGovernmentalOutputWeight = freezed,Object? totalFreeOutputWeight = freezed,Object? totalGovernmentalRemainWeight = freezed,Object? totalFreeRemainWeight = freezed,Object? totalKillHouseFreeSaleBarCarcassesWeight = freezed,Object? totalKillHouseAllocationsWeight = freezed,Object? segmentationsWeight = freezed,Object? coldHouseAllocationsWeight = freezed,Object? totalSellingInProvinceGovernmentalWeight = freezed,Object? totalSellingInProvinceFreeWeight = freezed,Object? totalCommitmentSellingInProvinceGovernmentalWeight = freezed,Object? totalCommitmentSellingInProvinceGovernmentalRemainWeight = freezed,Object? totalCommitmentSellingInProvinceFreeWeight = freezed,Object? totalCommitmentSellingInProvinceFreeRemainWeight = freezed,Object? posAllocatedWeight = freezed,Object? posGovernmentalAllocatedWeight = freezed,Object? posFreeAllocatedWeight = freezed,Object? wareHouseArchiveGovernmentalWeight = freezed,Object? wareHouseArchiveFreeWeight = freezed,}) {
|
||||
return _then(_KillHouseSalesInfoDashboard(
|
||||
totalGovernmentalInputWeight: freezed == totalGovernmentalInputWeight ? _self.totalGovernmentalInputWeight : totalGovernmentalInputWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,totalFreeInputWeight: freezed == totalFreeInputWeight ? _self.totalFreeInputWeight : totalFreeInputWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,totalGovernmentalOutputWeight: freezed == totalGovernmentalOutputWeight ? _self.totalGovernmentalOutputWeight : totalGovernmentalOutputWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,totalFreeOutputWeight: freezed == totalFreeOutputWeight ? _self.totalFreeOutputWeight : totalFreeOutputWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,totalGovernmentalRemainWeight: freezed == totalGovernmentalRemainWeight ? _self.totalGovernmentalRemainWeight : totalGovernmentalRemainWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,totalFreeRemainWeight: freezed == totalFreeRemainWeight ? _self.totalFreeRemainWeight : totalFreeRemainWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,totalKillHouseFreeSaleBarCarcassesWeight: freezed == totalKillHouseFreeSaleBarCarcassesWeight ? _self.totalKillHouseFreeSaleBarCarcassesWeight : totalKillHouseFreeSaleBarCarcassesWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,totalKillHouseAllocationsWeight: freezed == totalKillHouseAllocationsWeight ? _self.totalKillHouseAllocationsWeight : totalKillHouseAllocationsWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,segmentationsWeight: freezed == segmentationsWeight ? _self.segmentationsWeight : segmentationsWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,coldHouseAllocationsWeight: freezed == coldHouseAllocationsWeight ? _self.coldHouseAllocationsWeight : coldHouseAllocationsWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,totalSellingInProvinceGovernmentalWeight: freezed == totalSellingInProvinceGovernmentalWeight ? _self.totalSellingInProvinceGovernmentalWeight : totalSellingInProvinceGovernmentalWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,totalSellingInProvinceFreeWeight: freezed == totalSellingInProvinceFreeWeight ? _self.totalSellingInProvinceFreeWeight : totalSellingInProvinceFreeWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,totalCommitmentSellingInProvinceGovernmentalWeight: freezed == totalCommitmentSellingInProvinceGovernmentalWeight ? _self.totalCommitmentSellingInProvinceGovernmentalWeight : totalCommitmentSellingInProvinceGovernmentalWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,totalCommitmentSellingInProvinceGovernmentalRemainWeight: freezed == totalCommitmentSellingInProvinceGovernmentalRemainWeight ? _self.totalCommitmentSellingInProvinceGovernmentalRemainWeight : totalCommitmentSellingInProvinceGovernmentalRemainWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,totalCommitmentSellingInProvinceFreeWeight: freezed == totalCommitmentSellingInProvinceFreeWeight ? _self.totalCommitmentSellingInProvinceFreeWeight : totalCommitmentSellingInProvinceFreeWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,totalCommitmentSellingInProvinceFreeRemainWeight: freezed == totalCommitmentSellingInProvinceFreeRemainWeight ? _self.totalCommitmentSellingInProvinceFreeRemainWeight : totalCommitmentSellingInProvinceFreeRemainWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,posAllocatedWeight: freezed == posAllocatedWeight ? _self.posAllocatedWeight : posAllocatedWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,posGovernmentalAllocatedWeight: freezed == posGovernmentalAllocatedWeight ? _self.posGovernmentalAllocatedWeight : posGovernmentalAllocatedWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,posFreeAllocatedWeight: freezed == posFreeAllocatedWeight ? _self.posFreeAllocatedWeight : posFreeAllocatedWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,wareHouseArchiveGovernmentalWeight: freezed == wareHouseArchiveGovernmentalWeight ? _self.wareHouseArchiveGovernmentalWeight : wareHouseArchiveGovernmentalWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,wareHouseArchiveFreeWeight: freezed == wareHouseArchiveFreeWeight ? _self.wareHouseArchiveFreeWeight : wareHouseArchiveFreeWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
@@ -1,91 +0,0 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'kill_house_sales_info_dashboard.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_KillHouseSalesInfoDashboard _$KillHouseSalesInfoDashboardFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _KillHouseSalesInfoDashboard(
|
||||
totalGovernmentalInputWeight:
|
||||
(json['total_governmental_input_weight'] as num?)?.toDouble(),
|
||||
totalFreeInputWeight: (json['total_free_input_weight'] as num?)?.toDouble(),
|
||||
totalGovernmentalOutputWeight:
|
||||
(json['total_governmental_output_weight'] as num?)?.toDouble(),
|
||||
totalFreeOutputWeight: (json['total_free_output_weight'] as num?)?.toDouble(),
|
||||
totalGovernmentalRemainWeight:
|
||||
(json['total_governmental_remain_weight'] as num?)?.toDouble(),
|
||||
totalFreeRemainWeight: (json['total_free_remain_weight'] as num?)?.toDouble(),
|
||||
totalKillHouseFreeSaleBarCarcassesWeight:
|
||||
(json['total_kill_house_free_sale__bar_carcasses_weight'] as num?)
|
||||
?.toDouble(),
|
||||
totalKillHouseAllocationsWeight:
|
||||
(json['total_kill_house_allocations_weight'] as num?)?.toDouble(),
|
||||
segmentationsWeight: (json['segmentations_weight'] as num?)?.toDouble(),
|
||||
coldHouseAllocationsWeight: (json['cold_house_allocations_weight'] as num?)
|
||||
?.toDouble(),
|
||||
totalSellingInProvinceGovernmentalWeight:
|
||||
(json['total_selling_in_province_governmental_weight'] as num?)
|
||||
?.toDouble(),
|
||||
totalSellingInProvinceFreeWeight:
|
||||
(json['total_selling_in_province_free_weight'] as num?)?.toDouble(),
|
||||
totalCommitmentSellingInProvinceGovernmentalWeight:
|
||||
(json['total_commitment_selling_in_province_governmental_weight'] as num?)
|
||||
?.toDouble(),
|
||||
totalCommitmentSellingInProvinceGovernmentalRemainWeight:
|
||||
(json['total_commitment_selling_in_province_governmental_remain_weight']
|
||||
as num?)
|
||||
?.toDouble(),
|
||||
totalCommitmentSellingInProvinceFreeWeight:
|
||||
(json['total_commitment_selling_in_province_free_weight'] as num?)
|
||||
?.toDouble(),
|
||||
totalCommitmentSellingInProvinceFreeRemainWeight:
|
||||
(json['total_commitment_selling_in_province_free_remain_weight'] as num?)
|
||||
?.toDouble(),
|
||||
posAllocatedWeight: (json['pos_allocated_weight'] as num?)?.toDouble(),
|
||||
posGovernmentalAllocatedWeight:
|
||||
(json['pos_governmental_allocated_weight'] as num?)?.toDouble(),
|
||||
posFreeAllocatedWeight: (json['pos_free_allocated_weight'] as num?)
|
||||
?.toDouble(),
|
||||
wareHouseArchiveGovernmentalWeight:
|
||||
(json['ware_house_archive_governmental_weight'] as num?)?.toDouble(),
|
||||
wareHouseArchiveFreeWeight: (json['ware_house_archive_free_weight'] as num?)
|
||||
?.toDouble(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$KillHouseSalesInfoDashboardToJson(
|
||||
_KillHouseSalesInfoDashboard instance,
|
||||
) => <String, dynamic>{
|
||||
'total_governmental_input_weight': instance.totalGovernmentalInputWeight,
|
||||
'total_free_input_weight': instance.totalFreeInputWeight,
|
||||
'total_governmental_output_weight': instance.totalGovernmentalOutputWeight,
|
||||
'total_free_output_weight': instance.totalFreeOutputWeight,
|
||||
'total_governmental_remain_weight': instance.totalGovernmentalRemainWeight,
|
||||
'total_free_remain_weight': instance.totalFreeRemainWeight,
|
||||
'total_kill_house_free_sale__bar_carcasses_weight':
|
||||
instance.totalKillHouseFreeSaleBarCarcassesWeight,
|
||||
'total_kill_house_allocations_weight':
|
||||
instance.totalKillHouseAllocationsWeight,
|
||||
'segmentations_weight': instance.segmentationsWeight,
|
||||
'cold_house_allocations_weight': instance.coldHouseAllocationsWeight,
|
||||
'total_selling_in_province_governmental_weight':
|
||||
instance.totalSellingInProvinceGovernmentalWeight,
|
||||
'total_selling_in_province_free_weight':
|
||||
instance.totalSellingInProvinceFreeWeight,
|
||||
'total_commitment_selling_in_province_governmental_weight':
|
||||
instance.totalCommitmentSellingInProvinceGovernmentalWeight,
|
||||
'total_commitment_selling_in_province_governmental_remain_weight':
|
||||
instance.totalCommitmentSellingInProvinceGovernmentalRemainWeight,
|
||||
'total_commitment_selling_in_province_free_weight':
|
||||
instance.totalCommitmentSellingInProvinceFreeWeight,
|
||||
'total_commitment_selling_in_province_free_remain_weight':
|
||||
instance.totalCommitmentSellingInProvinceFreeRemainWeight,
|
||||
'pos_allocated_weight': instance.posAllocatedWeight,
|
||||
'pos_governmental_allocated_weight': instance.posGovernmentalAllocatedWeight,
|
||||
'pos_free_allocated_weight': instance.posFreeAllocatedWeight,
|
||||
'ware_house_archive_governmental_weight':
|
||||
instance.wareHouseArchiveGovernmentalWeight,
|
||||
'ware_house_archive_free_weight': instance.wareHouseArchiveFreeWeight,
|
||||
};
|
||||
@@ -16,7 +16,6 @@ abstract class CreateStewardFreeBar with _$CreateStewardFreeBar {
|
||||
int? numberOfCarcasses,
|
||||
String? date,
|
||||
String? barImage,
|
||||
String? distributionType,
|
||||
}) = _CreateStewardFreeBar;
|
||||
|
||||
factory CreateStewardFreeBar.fromJson(Map<String, dynamic> json) =>
|
||||
@@ -15,7 +15,7 @@ T _$identity<T>(T value) => value;
|
||||
/// @nodoc
|
||||
mixin _$CreateStewardFreeBar {
|
||||
|
||||
String? get productKey; String? get key; String? get killHouseName; String? get killHouseMobile; String? get province; String? get city; int? get weightOfCarcasses; int? get numberOfCarcasses; String? get date; String? get barImage; String? get distributionType;
|
||||
String? get productKey; String? get key; String? get killHouseName; String? get killHouseMobile; String? get province; String? get city; int? get weightOfCarcasses; int? get numberOfCarcasses; String? get date; String? get barImage;
|
||||
/// Create a copy of CreateStewardFreeBar
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -28,16 +28,16 @@ $CreateStewardFreeBarCopyWith<CreateStewardFreeBar> get copyWith => _$CreateStew
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is CreateStewardFreeBar&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.key, key) || other.key == key)&&(identical(other.killHouseName, killHouseName) || other.killHouseName == killHouseName)&&(identical(other.killHouseMobile, killHouseMobile) || other.killHouseMobile == killHouseMobile)&&(identical(other.province, province) || other.province == province)&&(identical(other.city, city) || other.city == city)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.date, date) || other.date == date)&&(identical(other.barImage, barImage) || other.barImage == barImage)&&(identical(other.distributionType, distributionType) || other.distributionType == distributionType));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is CreateStewardFreeBar&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.key, key) || other.key == key)&&(identical(other.killHouseName, killHouseName) || other.killHouseName == killHouseName)&&(identical(other.killHouseMobile, killHouseMobile) || other.killHouseMobile == killHouseMobile)&&(identical(other.province, province) || other.province == province)&&(identical(other.city, city) || other.city == city)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.date, date) || other.date == date)&&(identical(other.barImage, barImage) || other.barImage == barImage));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,productKey,key,killHouseName,killHouseMobile,province,city,weightOfCarcasses,numberOfCarcasses,date,barImage,distributionType);
|
||||
int get hashCode => Object.hash(runtimeType,productKey,key,killHouseName,killHouseMobile,province,city,weightOfCarcasses,numberOfCarcasses,date,barImage);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'CreateStewardFreeBar(productKey: $productKey, key: $key, killHouseName: $killHouseName, killHouseMobile: $killHouseMobile, province: $province, city: $city, weightOfCarcasses: $weightOfCarcasses, numberOfCarcasses: $numberOfCarcasses, date: $date, barImage: $barImage, distributionType: $distributionType)';
|
||||
return 'CreateStewardFreeBar(productKey: $productKey, key: $key, killHouseName: $killHouseName, killHouseMobile: $killHouseMobile, province: $province, city: $city, weightOfCarcasses: $weightOfCarcasses, numberOfCarcasses: $numberOfCarcasses, date: $date, barImage: $barImage)';
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ abstract mixin class $CreateStewardFreeBarCopyWith<$Res> {
|
||||
factory $CreateStewardFreeBarCopyWith(CreateStewardFreeBar value, $Res Function(CreateStewardFreeBar) _then) = _$CreateStewardFreeBarCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String? productKey, String? key, String? killHouseName, String? killHouseMobile, String? province, String? city, int? weightOfCarcasses, int? numberOfCarcasses, String? date, String? barImage, String? distributionType
|
||||
String? productKey, String? key, String? killHouseName, String? killHouseMobile, String? province, String? city, int? weightOfCarcasses, int? numberOfCarcasses, String? date, String? barImage
|
||||
});
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ class _$CreateStewardFreeBarCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of CreateStewardFreeBar
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? productKey = freezed,Object? key = freezed,Object? killHouseName = freezed,Object? killHouseMobile = freezed,Object? province = freezed,Object? city = freezed,Object? weightOfCarcasses = freezed,Object? numberOfCarcasses = freezed,Object? date = freezed,Object? barImage = freezed,Object? distributionType = freezed,}) {
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? productKey = freezed,Object? key = freezed,Object? killHouseName = freezed,Object? killHouseMobile = freezed,Object? province = freezed,Object? city = freezed,Object? weightOfCarcasses = freezed,Object? numberOfCarcasses = freezed,Object? date = freezed,Object? barImage = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
productKey: freezed == productKey ? _self.productKey : productKey // ignore: cast_nullable_to_non_nullable
|
||||
as String?,key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
|
||||
@@ -77,7 +77,6 @@ as String?,weightOfCarcasses: freezed == weightOfCarcasses ? _self.weightOfCarca
|
||||
as int?,numberOfCarcasses: freezed == numberOfCarcasses ? _self.numberOfCarcasses : numberOfCarcasses // ignore: cast_nullable_to_non_nullable
|
||||
as int?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
|
||||
as String?,barImage: freezed == barImage ? _self.barImage : barImage // ignore: cast_nullable_to_non_nullable
|
||||
as String?,distributionType: freezed == distributionType ? _self.distributionType : distributionType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
@@ -163,10 +162,10 @@ return $default(_that);case _:
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? productKey, String? key, String? killHouseName, String? killHouseMobile, String? province, String? city, int? weightOfCarcasses, int? numberOfCarcasses, String? date, String? barImage, String? distributionType)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? productKey, String? key, String? killHouseName, String? killHouseMobile, String? province, String? city, int? weightOfCarcasses, int? numberOfCarcasses, String? date, String? barImage)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _CreateStewardFreeBar() when $default != null:
|
||||
return $default(_that.productKey,_that.key,_that.killHouseName,_that.killHouseMobile,_that.province,_that.city,_that.weightOfCarcasses,_that.numberOfCarcasses,_that.date,_that.barImage,_that.distributionType);case _:
|
||||
return $default(_that.productKey,_that.key,_that.killHouseName,_that.killHouseMobile,_that.province,_that.city,_that.weightOfCarcasses,_that.numberOfCarcasses,_that.date,_that.barImage);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
@@ -184,10 +183,10 @@ return $default(_that.productKey,_that.key,_that.killHouseName,_that.killHouseMo
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? productKey, String? key, String? killHouseName, String? killHouseMobile, String? province, String? city, int? weightOfCarcasses, int? numberOfCarcasses, String? date, String? barImage, String? distributionType) $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? productKey, String? key, String? killHouseName, String? killHouseMobile, String? province, String? city, int? weightOfCarcasses, int? numberOfCarcasses, String? date, String? barImage) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _CreateStewardFreeBar():
|
||||
return $default(_that.productKey,_that.key,_that.killHouseName,_that.killHouseMobile,_that.province,_that.city,_that.weightOfCarcasses,_that.numberOfCarcasses,_that.date,_that.barImage,_that.distributionType);case _:
|
||||
return $default(_that.productKey,_that.key,_that.killHouseName,_that.killHouseMobile,_that.province,_that.city,_that.weightOfCarcasses,_that.numberOfCarcasses,_that.date,_that.barImage);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
@@ -204,10 +203,10 @@ return $default(_that.productKey,_that.key,_that.killHouseName,_that.killHouseMo
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? productKey, String? key, String? killHouseName, String? killHouseMobile, String? province, String? city, int? weightOfCarcasses, int? numberOfCarcasses, String? date, String? barImage, String? distributionType)? $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? productKey, String? key, String? killHouseName, String? killHouseMobile, String? province, String? city, int? weightOfCarcasses, int? numberOfCarcasses, String? date, String? barImage)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _CreateStewardFreeBar() when $default != null:
|
||||
return $default(_that.productKey,_that.key,_that.killHouseName,_that.killHouseMobile,_that.province,_that.city,_that.weightOfCarcasses,_that.numberOfCarcasses,_that.date,_that.barImage,_that.distributionType);case _:
|
||||
return $default(_that.productKey,_that.key,_that.killHouseName,_that.killHouseMobile,_that.province,_that.city,_that.weightOfCarcasses,_that.numberOfCarcasses,_that.date,_that.barImage);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
@@ -219,7 +218,7 @@ return $default(_that.productKey,_that.key,_that.killHouseName,_that.killHouseMo
|
||||
@JsonSerializable()
|
||||
|
||||
class _CreateStewardFreeBar implements CreateStewardFreeBar {
|
||||
const _CreateStewardFreeBar({this.productKey, this.key, this.killHouseName, this.killHouseMobile, this.province, this.city, this.weightOfCarcasses, this.numberOfCarcasses, this.date, this.barImage, this.distributionType});
|
||||
const _CreateStewardFreeBar({this.productKey, this.key, this.killHouseName, this.killHouseMobile, this.province, this.city, this.weightOfCarcasses, this.numberOfCarcasses, this.date, this.barImage});
|
||||
factory _CreateStewardFreeBar.fromJson(Map<String, dynamic> json) => _$CreateStewardFreeBarFromJson(json);
|
||||
|
||||
@override final String? productKey;
|
||||
@@ -232,7 +231,6 @@ class _CreateStewardFreeBar implements CreateStewardFreeBar {
|
||||
@override final int? numberOfCarcasses;
|
||||
@override final String? date;
|
||||
@override final String? barImage;
|
||||
@override final String? distributionType;
|
||||
|
||||
/// Create a copy of CreateStewardFreeBar
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -247,16 +245,16 @@ Map<String, dynamic> toJson() {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _CreateStewardFreeBar&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.key, key) || other.key == key)&&(identical(other.killHouseName, killHouseName) || other.killHouseName == killHouseName)&&(identical(other.killHouseMobile, killHouseMobile) || other.killHouseMobile == killHouseMobile)&&(identical(other.province, province) || other.province == province)&&(identical(other.city, city) || other.city == city)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.date, date) || other.date == date)&&(identical(other.barImage, barImage) || other.barImage == barImage)&&(identical(other.distributionType, distributionType) || other.distributionType == distributionType));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _CreateStewardFreeBar&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.key, key) || other.key == key)&&(identical(other.killHouseName, killHouseName) || other.killHouseName == killHouseName)&&(identical(other.killHouseMobile, killHouseMobile) || other.killHouseMobile == killHouseMobile)&&(identical(other.province, province) || other.province == province)&&(identical(other.city, city) || other.city == city)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.date, date) || other.date == date)&&(identical(other.barImage, barImage) || other.barImage == barImage));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,productKey,key,killHouseName,killHouseMobile,province,city,weightOfCarcasses,numberOfCarcasses,date,barImage,distributionType);
|
||||
int get hashCode => Object.hash(runtimeType,productKey,key,killHouseName,killHouseMobile,province,city,weightOfCarcasses,numberOfCarcasses,date,barImage);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'CreateStewardFreeBar(productKey: $productKey, key: $key, killHouseName: $killHouseName, killHouseMobile: $killHouseMobile, province: $province, city: $city, weightOfCarcasses: $weightOfCarcasses, numberOfCarcasses: $numberOfCarcasses, date: $date, barImage: $barImage, distributionType: $distributionType)';
|
||||
return 'CreateStewardFreeBar(productKey: $productKey, key: $key, killHouseName: $killHouseName, killHouseMobile: $killHouseMobile, province: $province, city: $city, weightOfCarcasses: $weightOfCarcasses, numberOfCarcasses: $numberOfCarcasses, date: $date, barImage: $barImage)';
|
||||
}
|
||||
|
||||
|
||||
@@ -267,7 +265,7 @@ abstract mixin class _$CreateStewardFreeBarCopyWith<$Res> implements $CreateStew
|
||||
factory _$CreateStewardFreeBarCopyWith(_CreateStewardFreeBar value, $Res Function(_CreateStewardFreeBar) _then) = __$CreateStewardFreeBarCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String? productKey, String? key, String? killHouseName, String? killHouseMobile, String? province, String? city, int? weightOfCarcasses, int? numberOfCarcasses, String? date, String? barImage, String? distributionType
|
||||
String? productKey, String? key, String? killHouseName, String? killHouseMobile, String? province, String? city, int? weightOfCarcasses, int? numberOfCarcasses, String? date, String? barImage
|
||||
});
|
||||
|
||||
|
||||
@@ -284,7 +282,7 @@ class __$CreateStewardFreeBarCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of CreateStewardFreeBar
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? productKey = freezed,Object? key = freezed,Object? killHouseName = freezed,Object? killHouseMobile = freezed,Object? province = freezed,Object? city = freezed,Object? weightOfCarcasses = freezed,Object? numberOfCarcasses = freezed,Object? date = freezed,Object? barImage = freezed,Object? distributionType = freezed,}) {
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? productKey = freezed,Object? key = freezed,Object? killHouseName = freezed,Object? killHouseMobile = freezed,Object? province = freezed,Object? city = freezed,Object? weightOfCarcasses = freezed,Object? numberOfCarcasses = freezed,Object? date = freezed,Object? barImage = freezed,}) {
|
||||
return _then(_CreateStewardFreeBar(
|
||||
productKey: freezed == productKey ? _self.productKey : productKey // ignore: cast_nullable_to_non_nullable
|
||||
as String?,key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
|
||||
@@ -296,7 +294,6 @@ as String?,weightOfCarcasses: freezed == weightOfCarcasses ? _self.weightOfCarca
|
||||
as int?,numberOfCarcasses: freezed == numberOfCarcasses ? _self.numberOfCarcasses : numberOfCarcasses // ignore: cast_nullable_to_non_nullable
|
||||
as int?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
|
||||
as String?,barImage: freezed == barImage ? _self.barImage : barImage // ignore: cast_nullable_to_non_nullable
|
||||
as String?,distributionType: freezed == distributionType ? _self.distributionType : distributionType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
@@ -19,7 +19,6 @@ _CreateStewardFreeBar _$CreateStewardFreeBarFromJson(
|
||||
numberOfCarcasses: (json['number_of_carcasses'] as num?)?.toInt(),
|
||||
date: json['date'] as String?,
|
||||
barImage: json['bar_image'] as String?,
|
||||
distributionType: json['distribution_type'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$CreateStewardFreeBarToJson(
|
||||
@@ -35,5 +34,4 @@ Map<String, dynamic> _$CreateStewardFreeBarToJson(
|
||||
'number_of_carcasses': instance.numberOfCarcasses,
|
||||
'date': instance.date,
|
||||
'bar_image': instance.barImage,
|
||||
'distribution_type': instance.distributionType,
|
||||
};
|
||||
@@ -22,7 +22,6 @@ abstract class StewardFreeSaleBarRequest with _$StewardFreeSaleBarRequest {
|
||||
String? quota,
|
||||
String? saleType,
|
||||
String? productionDate,
|
||||
String? distributionType,
|
||||
}) = _StewardFreeSaleBarRequest;
|
||||
|
||||
factory StewardFreeSaleBarRequest.fromJson(Map<String, dynamic> json) =>
|
||||
@@ -15,7 +15,7 @@ T _$identity<T>(T value) => value;
|
||||
/// @nodoc
|
||||
mixin _$StewardFreeSaleBarRequest {
|
||||
|
||||
String? get buyerKey; String? get buyerMobile; String? get buyerName; String? get city; String? get key; int? get numberOfCarcasses; int? get weightOfCarcasses; String? get date; String? get clearanceCode; String? get productKey; String? get role; String? get registerCode; String? get province; String? get quota; String? get saleType; String? get productionDate; String? get distributionType;
|
||||
String? get buyerKey; String? get buyerMobile; String? get buyerName; String? get city; String? get key; int? get numberOfCarcasses; int? get weightOfCarcasses; String? get date; String? get clearanceCode; String? get productKey; String? get role; String? get registerCode; String? get province; String? get quota; String? get saleType; String? get productionDate;
|
||||
/// Create a copy of StewardFreeSaleBarRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -28,16 +28,16 @@ $StewardFreeSaleBarRequestCopyWith<StewardFreeSaleBarRequest> get copyWith => _$
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is StewardFreeSaleBarRequest&&(identical(other.buyerKey, buyerKey) || other.buyerKey == buyerKey)&&(identical(other.buyerMobile, buyerMobile) || other.buyerMobile == buyerMobile)&&(identical(other.buyerName, buyerName) || other.buyerName == buyerName)&&(identical(other.city, city) || other.city == city)&&(identical(other.key, key) || other.key == key)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.date, date) || other.date == date)&&(identical(other.clearanceCode, clearanceCode) || other.clearanceCode == clearanceCode)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.role, role) || other.role == role)&&(identical(other.registerCode, registerCode) || other.registerCode == registerCode)&&(identical(other.province, province) || other.province == province)&&(identical(other.quota, quota) || other.quota == quota)&&(identical(other.saleType, saleType) || other.saleType == saleType)&&(identical(other.productionDate, productionDate) || other.productionDate == productionDate)&&(identical(other.distributionType, distributionType) || other.distributionType == distributionType));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is StewardFreeSaleBarRequest&&(identical(other.buyerKey, buyerKey) || other.buyerKey == buyerKey)&&(identical(other.buyerMobile, buyerMobile) || other.buyerMobile == buyerMobile)&&(identical(other.buyerName, buyerName) || other.buyerName == buyerName)&&(identical(other.city, city) || other.city == city)&&(identical(other.key, key) || other.key == key)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.date, date) || other.date == date)&&(identical(other.clearanceCode, clearanceCode) || other.clearanceCode == clearanceCode)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.role, role) || other.role == role)&&(identical(other.registerCode, registerCode) || other.registerCode == registerCode)&&(identical(other.province, province) || other.province == province)&&(identical(other.quota, quota) || other.quota == quota)&&(identical(other.saleType, saleType) || other.saleType == saleType)&&(identical(other.productionDate, productionDate) || other.productionDate == productionDate));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,buyerKey,buyerMobile,buyerName,city,key,numberOfCarcasses,weightOfCarcasses,date,clearanceCode,productKey,role,registerCode,province,quota,saleType,productionDate,distributionType);
|
||||
int get hashCode => Object.hash(runtimeType,buyerKey,buyerMobile,buyerName,city,key,numberOfCarcasses,weightOfCarcasses,date,clearanceCode,productKey,role,registerCode,province,quota,saleType,productionDate);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'StewardFreeSaleBarRequest(buyerKey: $buyerKey, buyerMobile: $buyerMobile, buyerName: $buyerName, city: $city, key: $key, numberOfCarcasses: $numberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, date: $date, clearanceCode: $clearanceCode, productKey: $productKey, role: $role, registerCode: $registerCode, province: $province, quota: $quota, saleType: $saleType, productionDate: $productionDate, distributionType: $distributionType)';
|
||||
return 'StewardFreeSaleBarRequest(buyerKey: $buyerKey, buyerMobile: $buyerMobile, buyerName: $buyerName, city: $city, key: $key, numberOfCarcasses: $numberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, date: $date, clearanceCode: $clearanceCode, productKey: $productKey, role: $role, registerCode: $registerCode, province: $province, quota: $quota, saleType: $saleType, productionDate: $productionDate)';
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ abstract mixin class $StewardFreeSaleBarRequestCopyWith<$Res> {
|
||||
factory $StewardFreeSaleBarRequestCopyWith(StewardFreeSaleBarRequest value, $Res Function(StewardFreeSaleBarRequest) _then) = _$StewardFreeSaleBarRequestCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String? buyerKey, String? buyerMobile, String? buyerName, String? city, String? key, int? numberOfCarcasses, int? weightOfCarcasses, String? date, String? clearanceCode, String? productKey, String? role, String? registerCode, String? province, String? quota, String? saleType, String? productionDate, String? distributionType
|
||||
String? buyerKey, String? buyerMobile, String? buyerName, String? city, String? key, int? numberOfCarcasses, int? weightOfCarcasses, String? date, String? clearanceCode, String? productKey, String? role, String? registerCode, String? province, String? quota, String? saleType, String? productionDate
|
||||
});
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ class _$StewardFreeSaleBarRequestCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of StewardFreeSaleBarRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? buyerKey = freezed,Object? buyerMobile = freezed,Object? buyerName = freezed,Object? city = freezed,Object? key = freezed,Object? numberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,Object? date = freezed,Object? clearanceCode = freezed,Object? productKey = freezed,Object? role = freezed,Object? registerCode = freezed,Object? province = freezed,Object? quota = freezed,Object? saleType = freezed,Object? productionDate = freezed,Object? distributionType = freezed,}) {
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? buyerKey = freezed,Object? buyerMobile = freezed,Object? buyerName = freezed,Object? city = freezed,Object? key = freezed,Object? numberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,Object? date = freezed,Object? clearanceCode = freezed,Object? productKey = freezed,Object? role = freezed,Object? registerCode = freezed,Object? province = freezed,Object? quota = freezed,Object? saleType = freezed,Object? productionDate = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
buyerKey: freezed == buyerKey ? _self.buyerKey : buyerKey // ignore: cast_nullable_to_non_nullable
|
||||
as String?,buyerMobile: freezed == buyerMobile ? _self.buyerMobile : buyerMobile // ignore: cast_nullable_to_non_nullable
|
||||
@@ -83,7 +83,6 @@ as String?,province: freezed == province ? _self.province : province // ignore:
|
||||
as String?,quota: freezed == quota ? _self.quota : quota // ignore: cast_nullable_to_non_nullable
|
||||
as String?,saleType: freezed == saleType ? _self.saleType : saleType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,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?,
|
||||
));
|
||||
}
|
||||
@@ -169,10 +168,10 @@ return $default(_that);case _:
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? buyerKey, String? buyerMobile, String? buyerName, String? city, String? key, int? numberOfCarcasses, int? weightOfCarcasses, String? date, String? clearanceCode, String? productKey, String? role, String? registerCode, String? province, String? quota, String? saleType, String? productionDate, String? distributionType)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? buyerKey, String? buyerMobile, String? buyerName, String? city, String? key, int? numberOfCarcasses, int? weightOfCarcasses, String? date, String? clearanceCode, String? productKey, String? role, String? registerCode, String? province, String? quota, String? saleType, String? productionDate)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _StewardFreeSaleBarRequest() when $default != null:
|
||||
return $default(_that.buyerKey,_that.buyerMobile,_that.buyerName,_that.city,_that.key,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.date,_that.clearanceCode,_that.productKey,_that.role,_that.registerCode,_that.province,_that.quota,_that.saleType,_that.productionDate,_that.distributionType);case _:
|
||||
return $default(_that.buyerKey,_that.buyerMobile,_that.buyerName,_that.city,_that.key,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.date,_that.clearanceCode,_that.productKey,_that.role,_that.registerCode,_that.province,_that.quota,_that.saleType,_that.productionDate);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
@@ -190,10 +189,10 @@ return $default(_that.buyerKey,_that.buyerMobile,_that.buyerName,_that.city,_tha
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? buyerKey, String? buyerMobile, String? buyerName, String? city, String? key, int? numberOfCarcasses, int? weightOfCarcasses, String? date, String? clearanceCode, String? productKey, String? role, String? registerCode, String? province, String? quota, String? saleType, String? productionDate, String? distributionType) $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? buyerKey, String? buyerMobile, String? buyerName, String? city, String? key, int? numberOfCarcasses, int? weightOfCarcasses, String? date, String? clearanceCode, String? productKey, String? role, String? registerCode, String? province, String? quota, String? saleType, String? productionDate) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _StewardFreeSaleBarRequest():
|
||||
return $default(_that.buyerKey,_that.buyerMobile,_that.buyerName,_that.city,_that.key,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.date,_that.clearanceCode,_that.productKey,_that.role,_that.registerCode,_that.province,_that.quota,_that.saleType,_that.productionDate,_that.distributionType);case _:
|
||||
return $default(_that.buyerKey,_that.buyerMobile,_that.buyerName,_that.city,_that.key,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.date,_that.clearanceCode,_that.productKey,_that.role,_that.registerCode,_that.province,_that.quota,_that.saleType,_that.productionDate);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
@@ -210,10 +209,10 @@ return $default(_that.buyerKey,_that.buyerMobile,_that.buyerName,_that.city,_tha
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? buyerKey, String? buyerMobile, String? buyerName, String? city, String? key, int? numberOfCarcasses, int? weightOfCarcasses, String? date, String? clearanceCode, String? productKey, String? role, String? registerCode, String? province, String? quota, String? saleType, String? productionDate, String? distributionType)? $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? buyerKey, String? buyerMobile, String? buyerName, String? city, String? key, int? numberOfCarcasses, int? weightOfCarcasses, String? date, String? clearanceCode, String? productKey, String? role, String? registerCode, String? province, String? quota, String? saleType, String? productionDate)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _StewardFreeSaleBarRequest() when $default != null:
|
||||
return $default(_that.buyerKey,_that.buyerMobile,_that.buyerName,_that.city,_that.key,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.date,_that.clearanceCode,_that.productKey,_that.role,_that.registerCode,_that.province,_that.quota,_that.saleType,_that.productionDate,_that.distributionType);case _:
|
||||
return $default(_that.buyerKey,_that.buyerMobile,_that.buyerName,_that.city,_that.key,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.date,_that.clearanceCode,_that.productKey,_that.role,_that.registerCode,_that.province,_that.quota,_that.saleType,_that.productionDate);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
@@ -225,7 +224,7 @@ return $default(_that.buyerKey,_that.buyerMobile,_that.buyerName,_that.city,_tha
|
||||
@JsonSerializable()
|
||||
|
||||
class _StewardFreeSaleBarRequest implements StewardFreeSaleBarRequest {
|
||||
const _StewardFreeSaleBarRequest({this.buyerKey, this.buyerMobile, this.buyerName, this.city, this.key, this.numberOfCarcasses, this.weightOfCarcasses, this.date, this.clearanceCode, this.productKey, this.role, this.registerCode, this.province, this.quota, this.saleType, this.productionDate, this.distributionType});
|
||||
const _StewardFreeSaleBarRequest({this.buyerKey, this.buyerMobile, this.buyerName, this.city, this.key, this.numberOfCarcasses, this.weightOfCarcasses, this.date, this.clearanceCode, this.productKey, this.role, this.registerCode, this.province, this.quota, this.saleType, this.productionDate});
|
||||
factory _StewardFreeSaleBarRequest.fromJson(Map<String, dynamic> json) => _$StewardFreeSaleBarRequestFromJson(json);
|
||||
|
||||
@override final String? buyerKey;
|
||||
@@ -244,7 +243,6 @@ class _StewardFreeSaleBarRequest implements StewardFreeSaleBarRequest {
|
||||
@override final String? quota;
|
||||
@override final String? saleType;
|
||||
@override final String? productionDate;
|
||||
@override final String? distributionType;
|
||||
|
||||
/// Create a copy of StewardFreeSaleBarRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -259,16 +257,16 @@ Map<String, dynamic> toJson() {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _StewardFreeSaleBarRequest&&(identical(other.buyerKey, buyerKey) || other.buyerKey == buyerKey)&&(identical(other.buyerMobile, buyerMobile) || other.buyerMobile == buyerMobile)&&(identical(other.buyerName, buyerName) || other.buyerName == buyerName)&&(identical(other.city, city) || other.city == city)&&(identical(other.key, key) || other.key == key)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.date, date) || other.date == date)&&(identical(other.clearanceCode, clearanceCode) || other.clearanceCode == clearanceCode)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.role, role) || other.role == role)&&(identical(other.registerCode, registerCode) || other.registerCode == registerCode)&&(identical(other.province, province) || other.province == province)&&(identical(other.quota, quota) || other.quota == quota)&&(identical(other.saleType, saleType) || other.saleType == saleType)&&(identical(other.productionDate, productionDate) || other.productionDate == productionDate)&&(identical(other.distributionType, distributionType) || other.distributionType == distributionType));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _StewardFreeSaleBarRequest&&(identical(other.buyerKey, buyerKey) || other.buyerKey == buyerKey)&&(identical(other.buyerMobile, buyerMobile) || other.buyerMobile == buyerMobile)&&(identical(other.buyerName, buyerName) || other.buyerName == buyerName)&&(identical(other.city, city) || other.city == city)&&(identical(other.key, key) || other.key == key)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.date, date) || other.date == date)&&(identical(other.clearanceCode, clearanceCode) || other.clearanceCode == clearanceCode)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.role, role) || other.role == role)&&(identical(other.registerCode, registerCode) || other.registerCode == registerCode)&&(identical(other.province, province) || other.province == province)&&(identical(other.quota, quota) || other.quota == quota)&&(identical(other.saleType, saleType) || other.saleType == saleType)&&(identical(other.productionDate, productionDate) || other.productionDate == productionDate));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,buyerKey,buyerMobile,buyerName,city,key,numberOfCarcasses,weightOfCarcasses,date,clearanceCode,productKey,role,registerCode,province,quota,saleType,productionDate,distributionType);
|
||||
int get hashCode => Object.hash(runtimeType,buyerKey,buyerMobile,buyerName,city,key,numberOfCarcasses,weightOfCarcasses,date,clearanceCode,productKey,role,registerCode,province,quota,saleType,productionDate);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'StewardFreeSaleBarRequest(buyerKey: $buyerKey, buyerMobile: $buyerMobile, buyerName: $buyerName, city: $city, key: $key, numberOfCarcasses: $numberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, date: $date, clearanceCode: $clearanceCode, productKey: $productKey, role: $role, registerCode: $registerCode, province: $province, quota: $quota, saleType: $saleType, productionDate: $productionDate, distributionType: $distributionType)';
|
||||
return 'StewardFreeSaleBarRequest(buyerKey: $buyerKey, buyerMobile: $buyerMobile, buyerName: $buyerName, city: $city, key: $key, numberOfCarcasses: $numberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, date: $date, clearanceCode: $clearanceCode, productKey: $productKey, role: $role, registerCode: $registerCode, province: $province, quota: $quota, saleType: $saleType, productionDate: $productionDate)';
|
||||
}
|
||||
|
||||
|
||||
@@ -279,7 +277,7 @@ abstract mixin class _$StewardFreeSaleBarRequestCopyWith<$Res> implements $Stewa
|
||||
factory _$StewardFreeSaleBarRequestCopyWith(_StewardFreeSaleBarRequest value, $Res Function(_StewardFreeSaleBarRequest) _then) = __$StewardFreeSaleBarRequestCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String? buyerKey, String? buyerMobile, String? buyerName, String? city, String? key, int? numberOfCarcasses, int? weightOfCarcasses, String? date, String? clearanceCode, String? productKey, String? role, String? registerCode, String? province, String? quota, String? saleType, String? productionDate, String? distributionType
|
||||
String? buyerKey, String? buyerMobile, String? buyerName, String? city, String? key, int? numberOfCarcasses, int? weightOfCarcasses, String? date, String? clearanceCode, String? productKey, String? role, String? registerCode, String? province, String? quota, String? saleType, String? productionDate
|
||||
});
|
||||
|
||||
|
||||
@@ -296,7 +294,7 @@ class __$StewardFreeSaleBarRequestCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of StewardFreeSaleBarRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? buyerKey = freezed,Object? buyerMobile = freezed,Object? buyerName = freezed,Object? city = freezed,Object? key = freezed,Object? numberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,Object? date = freezed,Object? clearanceCode = freezed,Object? productKey = freezed,Object? role = freezed,Object? registerCode = freezed,Object? province = freezed,Object? quota = freezed,Object? saleType = freezed,Object? productionDate = freezed,Object? distributionType = freezed,}) {
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? buyerKey = freezed,Object? buyerMobile = freezed,Object? buyerName = freezed,Object? city = freezed,Object? key = freezed,Object? numberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,Object? date = freezed,Object? clearanceCode = freezed,Object? productKey = freezed,Object? role = freezed,Object? registerCode = freezed,Object? province = freezed,Object? quota = freezed,Object? saleType = freezed,Object? productionDate = freezed,}) {
|
||||
return _then(_StewardFreeSaleBarRequest(
|
||||
buyerKey: freezed == buyerKey ? _self.buyerKey : buyerKey // ignore: cast_nullable_to_non_nullable
|
||||
as String?,buyerMobile: freezed == buyerMobile ? _self.buyerMobile : buyerMobile // ignore: cast_nullable_to_non_nullable
|
||||
@@ -314,7 +312,6 @@ as String?,province: freezed == province ? _self.province : province // ignore:
|
||||
as String?,quota: freezed == quota ? _self.quota : quota // ignore: cast_nullable_to_non_nullable
|
||||
as String?,saleType: freezed == saleType ? _self.saleType : saleType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,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?,
|
||||
));
|
||||
}
|
||||
@@ -25,7 +25,6 @@ _StewardFreeSaleBarRequest _$StewardFreeSaleBarRequestFromJson(
|
||||
quota: json['quota'] as String?,
|
||||
saleType: json['sale_type'] as String?,
|
||||
productionDate: json['production_date'] as String?,
|
||||
distributionType: json['distribution_type'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$StewardFreeSaleBarRequestToJson(
|
||||
@@ -47,5 +46,4 @@ Map<String, dynamic> _$StewardFreeSaleBarRequestToJson(
|
||||
'quota': instance.quota,
|
||||
'sale_type': instance.saleType,
|
||||
'production_date': instance.productionDate,
|
||||
'distribution_type': instance.distributionType,
|
||||
};
|
||||
@@ -21,7 +21,6 @@ abstract class SubmitStewardAllocation with _$SubmitStewardAllocation {
|
||||
bool? approvedPriceStatus,
|
||||
String? productionDate,
|
||||
String? date,
|
||||
String? distributionType,
|
||||
}) = _SubmitStewardAllocation;
|
||||
|
||||
factory SubmitStewardAllocation.fromJson(Map<String, dynamic> json) =>
|
||||
@@ -15,7 +15,7 @@ T _$identity<T>(T value) => value;
|
||||
/// @nodoc
|
||||
mixin _$SubmitStewardAllocation {
|
||||
|
||||
String? get sellerType; String? get buyerType; String? get guildKey; String? get productKey; String? get type; String? get allocationType; int? get numberOfCarcasses; int? get weightOfCarcasses; String? get sellType; int? get amount; String? get quota; int? get totalAmount; bool? get approvedPriceStatus; String? get productionDate; String? get date; String? get distributionType;
|
||||
String? get sellerType; String? get buyerType; String? get guildKey; String? get productKey; String? get type; String? get allocationType; int? get numberOfCarcasses; int? get weightOfCarcasses; String? get sellType; int? get amount; String? get quota; int? get totalAmount; bool? get approvedPriceStatus; String? get productionDate; String? get date;
|
||||
/// Create a copy of SubmitStewardAllocation
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -28,16 +28,16 @@ $SubmitStewardAllocationCopyWith<SubmitStewardAllocation> get copyWith => _$Subm
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SubmitStewardAllocation&&(identical(other.sellerType, sellerType) || other.sellerType == sellerType)&&(identical(other.buyerType, buyerType) || other.buyerType == buyerType)&&(identical(other.guildKey, guildKey) || other.guildKey == guildKey)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.type, type) || other.type == type)&&(identical(other.allocationType, allocationType) || other.allocationType == allocationType)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.sellType, sellType) || other.sellType == sellType)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.quota, quota) || other.quota == quota)&&(identical(other.totalAmount, totalAmount) || other.totalAmount == totalAmount)&&(identical(other.approvedPriceStatus, approvedPriceStatus) || other.approvedPriceStatus == approvedPriceStatus)&&(identical(other.productionDate, productionDate) || other.productionDate == productionDate)&&(identical(other.date, date) || other.date == date)&&(identical(other.distributionType, distributionType) || other.distributionType == distributionType));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SubmitStewardAllocation&&(identical(other.sellerType, sellerType) || other.sellerType == sellerType)&&(identical(other.buyerType, buyerType) || other.buyerType == buyerType)&&(identical(other.guildKey, guildKey) || other.guildKey == guildKey)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.type, type) || other.type == type)&&(identical(other.allocationType, allocationType) || other.allocationType == allocationType)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.sellType, sellType) || other.sellType == sellType)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.quota, quota) || other.quota == quota)&&(identical(other.totalAmount, totalAmount) || other.totalAmount == totalAmount)&&(identical(other.approvedPriceStatus, approvedPriceStatus) || other.approvedPriceStatus == approvedPriceStatus)&&(identical(other.productionDate, productionDate) || other.productionDate == productionDate)&&(identical(other.date, date) || other.date == date));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,sellerType,buyerType,guildKey,productKey,type,allocationType,numberOfCarcasses,weightOfCarcasses,sellType,amount,quota,totalAmount,approvedPriceStatus,productionDate,date,distributionType);
|
||||
int get hashCode => Object.hash(runtimeType,sellerType,buyerType,guildKey,productKey,type,allocationType,numberOfCarcasses,weightOfCarcasses,sellType,amount,quota,totalAmount,approvedPriceStatus,productionDate,date);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SubmitStewardAllocation(sellerType: $sellerType, buyerType: $buyerType, guildKey: $guildKey, productKey: $productKey, type: $type, allocationType: $allocationType, numberOfCarcasses: $numberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, sellType: $sellType, amount: $amount, quota: $quota, totalAmount: $totalAmount, approvedPriceStatus: $approvedPriceStatus, productionDate: $productionDate, date: $date, distributionType: $distributionType)';
|
||||
return 'SubmitStewardAllocation(sellerType: $sellerType, buyerType: $buyerType, guildKey: $guildKey, productKey: $productKey, type: $type, allocationType: $allocationType, numberOfCarcasses: $numberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, sellType: $sellType, amount: $amount, quota: $quota, totalAmount: $totalAmount, approvedPriceStatus: $approvedPriceStatus, productionDate: $productionDate, date: $date)';
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ abstract mixin class $SubmitStewardAllocationCopyWith<$Res> {
|
||||
factory $SubmitStewardAllocationCopyWith(SubmitStewardAllocation value, $Res Function(SubmitStewardAllocation) _then) = _$SubmitStewardAllocationCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String? sellerType, String? buyerType, String? guildKey, String? productKey, String? type, String? allocationType, int? numberOfCarcasses, int? weightOfCarcasses, String? sellType, int? amount, String? quota, int? totalAmount, bool? approvedPriceStatus, String? productionDate, String? date, String? distributionType
|
||||
String? sellerType, String? buyerType, String? guildKey, String? productKey, String? type, String? allocationType, int? numberOfCarcasses, int? weightOfCarcasses, String? sellType, int? amount, String? quota, int? totalAmount, bool? approvedPriceStatus, String? productionDate, String? date
|
||||
});
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ class _$SubmitStewardAllocationCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of SubmitStewardAllocation
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? sellerType = freezed,Object? buyerType = freezed,Object? guildKey = freezed,Object? productKey = freezed,Object? type = freezed,Object? allocationType = freezed,Object? numberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,Object? sellType = freezed,Object? amount = freezed,Object? quota = freezed,Object? totalAmount = freezed,Object? approvedPriceStatus = freezed,Object? productionDate = freezed,Object? date = freezed,Object? distributionType = freezed,}) {
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? sellerType = freezed,Object? buyerType = freezed,Object? guildKey = freezed,Object? productKey = freezed,Object? type = freezed,Object? allocationType = freezed,Object? numberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,Object? sellType = freezed,Object? amount = freezed,Object? quota = freezed,Object? totalAmount = freezed,Object? approvedPriceStatus = freezed,Object? productionDate = freezed,Object? date = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
sellerType: freezed == sellerType ? _self.sellerType : sellerType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,buyerType: freezed == buyerType ? _self.buyerType : buyerType // ignore: cast_nullable_to_non_nullable
|
||||
@@ -82,7 +82,6 @@ as String?,totalAmount: freezed == totalAmount ? _self.totalAmount : totalAmount
|
||||
as int?,approvedPriceStatus: freezed == approvedPriceStatus ? _self.approvedPriceStatus : approvedPriceStatus // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,productionDate: freezed == productionDate ? _self.productionDate : productionDate // ignore: cast_nullable_to_non_nullable
|
||||
as String?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
|
||||
as String?,distributionType: freezed == distributionType ? _self.distributionType : distributionType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
@@ -168,10 +167,10 @@ return $default(_that);case _:
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? sellerType, String? buyerType, String? guildKey, String? productKey, String? type, String? allocationType, int? numberOfCarcasses, int? weightOfCarcasses, String? sellType, int? amount, String? quota, int? totalAmount, bool? approvedPriceStatus, String? productionDate, String? date, String? distributionType)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? sellerType, String? buyerType, String? guildKey, String? productKey, String? type, String? allocationType, int? numberOfCarcasses, int? weightOfCarcasses, String? sellType, int? amount, String? quota, int? totalAmount, bool? approvedPriceStatus, String? productionDate, String? date)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SubmitStewardAllocation() when $default != null:
|
||||
return $default(_that.sellerType,_that.buyerType,_that.guildKey,_that.productKey,_that.type,_that.allocationType,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.sellType,_that.amount,_that.quota,_that.totalAmount,_that.approvedPriceStatus,_that.productionDate,_that.date,_that.distributionType);case _:
|
||||
return $default(_that.sellerType,_that.buyerType,_that.guildKey,_that.productKey,_that.type,_that.allocationType,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.sellType,_that.amount,_that.quota,_that.totalAmount,_that.approvedPriceStatus,_that.productionDate,_that.date);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
@@ -189,10 +188,10 @@ return $default(_that.sellerType,_that.buyerType,_that.guildKey,_that.productKey
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? sellerType, String? buyerType, String? guildKey, String? productKey, String? type, String? allocationType, int? numberOfCarcasses, int? weightOfCarcasses, String? sellType, int? amount, String? quota, int? totalAmount, bool? approvedPriceStatus, String? productionDate, String? date, String? distributionType) $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? sellerType, String? buyerType, String? guildKey, String? productKey, String? type, String? allocationType, int? numberOfCarcasses, int? weightOfCarcasses, String? sellType, int? amount, String? quota, int? totalAmount, bool? approvedPriceStatus, String? productionDate, String? date) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SubmitStewardAllocation():
|
||||
return $default(_that.sellerType,_that.buyerType,_that.guildKey,_that.productKey,_that.type,_that.allocationType,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.sellType,_that.amount,_that.quota,_that.totalAmount,_that.approvedPriceStatus,_that.productionDate,_that.date,_that.distributionType);case _:
|
||||
return $default(_that.sellerType,_that.buyerType,_that.guildKey,_that.productKey,_that.type,_that.allocationType,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.sellType,_that.amount,_that.quota,_that.totalAmount,_that.approvedPriceStatus,_that.productionDate,_that.date);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
@@ -209,10 +208,10 @@ return $default(_that.sellerType,_that.buyerType,_that.guildKey,_that.productKey
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? sellerType, String? buyerType, String? guildKey, String? productKey, String? type, String? allocationType, int? numberOfCarcasses, int? weightOfCarcasses, String? sellType, int? amount, String? quota, int? totalAmount, bool? approvedPriceStatus, String? productionDate, String? date, String? distributionType)? $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? sellerType, String? buyerType, String? guildKey, String? productKey, String? type, String? allocationType, int? numberOfCarcasses, int? weightOfCarcasses, String? sellType, int? amount, String? quota, int? totalAmount, bool? approvedPriceStatus, String? productionDate, String? date)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SubmitStewardAllocation() when $default != null:
|
||||
return $default(_that.sellerType,_that.buyerType,_that.guildKey,_that.productKey,_that.type,_that.allocationType,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.sellType,_that.amount,_that.quota,_that.totalAmount,_that.approvedPriceStatus,_that.productionDate,_that.date,_that.distributionType);case _:
|
||||
return $default(_that.sellerType,_that.buyerType,_that.guildKey,_that.productKey,_that.type,_that.allocationType,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.sellType,_that.amount,_that.quota,_that.totalAmount,_that.approvedPriceStatus,_that.productionDate,_that.date);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
@@ -224,7 +223,7 @@ return $default(_that.sellerType,_that.buyerType,_that.guildKey,_that.productKey
|
||||
@JsonSerializable()
|
||||
|
||||
class _SubmitStewardAllocation implements SubmitStewardAllocation {
|
||||
const _SubmitStewardAllocation({this.sellerType, this.buyerType, this.guildKey, this.productKey, this.type, this.allocationType, this.numberOfCarcasses, this.weightOfCarcasses, this.sellType, this.amount, this.quota, this.totalAmount, this.approvedPriceStatus, this.productionDate, this.date, this.distributionType});
|
||||
const _SubmitStewardAllocation({this.sellerType, this.buyerType, this.guildKey, this.productKey, this.type, this.allocationType, this.numberOfCarcasses, this.weightOfCarcasses, this.sellType, this.amount, this.quota, this.totalAmount, this.approvedPriceStatus, this.productionDate, this.date});
|
||||
factory _SubmitStewardAllocation.fromJson(Map<String, dynamic> json) => _$SubmitStewardAllocationFromJson(json);
|
||||
|
||||
@override final String? sellerType;
|
||||
@@ -242,7 +241,6 @@ class _SubmitStewardAllocation implements SubmitStewardAllocation {
|
||||
@override final bool? approvedPriceStatus;
|
||||
@override final String? productionDate;
|
||||
@override final String? date;
|
||||
@override final String? distributionType;
|
||||
|
||||
/// Create a copy of SubmitStewardAllocation
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -257,16 +255,16 @@ Map<String, dynamic> toJson() {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SubmitStewardAllocation&&(identical(other.sellerType, sellerType) || other.sellerType == sellerType)&&(identical(other.buyerType, buyerType) || other.buyerType == buyerType)&&(identical(other.guildKey, guildKey) || other.guildKey == guildKey)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.type, type) || other.type == type)&&(identical(other.allocationType, allocationType) || other.allocationType == allocationType)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.sellType, sellType) || other.sellType == sellType)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.quota, quota) || other.quota == quota)&&(identical(other.totalAmount, totalAmount) || other.totalAmount == totalAmount)&&(identical(other.approvedPriceStatus, approvedPriceStatus) || other.approvedPriceStatus == approvedPriceStatus)&&(identical(other.productionDate, productionDate) || other.productionDate == productionDate)&&(identical(other.date, date) || other.date == date)&&(identical(other.distributionType, distributionType) || other.distributionType == distributionType));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SubmitStewardAllocation&&(identical(other.sellerType, sellerType) || other.sellerType == sellerType)&&(identical(other.buyerType, buyerType) || other.buyerType == buyerType)&&(identical(other.guildKey, guildKey) || other.guildKey == guildKey)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.type, type) || other.type == type)&&(identical(other.allocationType, allocationType) || other.allocationType == allocationType)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.sellType, sellType) || other.sellType == sellType)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.quota, quota) || other.quota == quota)&&(identical(other.totalAmount, totalAmount) || other.totalAmount == totalAmount)&&(identical(other.approvedPriceStatus, approvedPriceStatus) || other.approvedPriceStatus == approvedPriceStatus)&&(identical(other.productionDate, productionDate) || other.productionDate == productionDate)&&(identical(other.date, date) || other.date == date));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,sellerType,buyerType,guildKey,productKey,type,allocationType,numberOfCarcasses,weightOfCarcasses,sellType,amount,quota,totalAmount,approvedPriceStatus,productionDate,date,distributionType);
|
||||
int get hashCode => Object.hash(runtimeType,sellerType,buyerType,guildKey,productKey,type,allocationType,numberOfCarcasses,weightOfCarcasses,sellType,amount,quota,totalAmount,approvedPriceStatus,productionDate,date);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SubmitStewardAllocation(sellerType: $sellerType, buyerType: $buyerType, guildKey: $guildKey, productKey: $productKey, type: $type, allocationType: $allocationType, numberOfCarcasses: $numberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, sellType: $sellType, amount: $amount, quota: $quota, totalAmount: $totalAmount, approvedPriceStatus: $approvedPriceStatus, productionDate: $productionDate, date: $date, distributionType: $distributionType)';
|
||||
return 'SubmitStewardAllocation(sellerType: $sellerType, buyerType: $buyerType, guildKey: $guildKey, productKey: $productKey, type: $type, allocationType: $allocationType, numberOfCarcasses: $numberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, sellType: $sellType, amount: $amount, quota: $quota, totalAmount: $totalAmount, approvedPriceStatus: $approvedPriceStatus, productionDate: $productionDate, date: $date)';
|
||||
}
|
||||
|
||||
|
||||
@@ -277,7 +275,7 @@ abstract mixin class _$SubmitStewardAllocationCopyWith<$Res> implements $SubmitS
|
||||
factory _$SubmitStewardAllocationCopyWith(_SubmitStewardAllocation value, $Res Function(_SubmitStewardAllocation) _then) = __$SubmitStewardAllocationCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String? sellerType, String? buyerType, String? guildKey, String? productKey, String? type, String? allocationType, int? numberOfCarcasses, int? weightOfCarcasses, String? sellType, int? amount, String? quota, int? totalAmount, bool? approvedPriceStatus, String? productionDate, String? date, String? distributionType
|
||||
String? sellerType, String? buyerType, String? guildKey, String? productKey, String? type, String? allocationType, int? numberOfCarcasses, int? weightOfCarcasses, String? sellType, int? amount, String? quota, int? totalAmount, bool? approvedPriceStatus, String? productionDate, String? date
|
||||
});
|
||||
|
||||
|
||||
@@ -294,7 +292,7 @@ class __$SubmitStewardAllocationCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of SubmitStewardAllocation
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? sellerType = freezed,Object? buyerType = freezed,Object? guildKey = freezed,Object? productKey = freezed,Object? type = freezed,Object? allocationType = freezed,Object? numberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,Object? sellType = freezed,Object? amount = freezed,Object? quota = freezed,Object? totalAmount = freezed,Object? approvedPriceStatus = freezed,Object? productionDate = freezed,Object? date = freezed,Object? distributionType = freezed,}) {
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? sellerType = freezed,Object? buyerType = freezed,Object? guildKey = freezed,Object? productKey = freezed,Object? type = freezed,Object? allocationType = freezed,Object? numberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,Object? sellType = freezed,Object? amount = freezed,Object? quota = freezed,Object? totalAmount = freezed,Object? approvedPriceStatus = freezed,Object? productionDate = freezed,Object? date = freezed,}) {
|
||||
return _then(_SubmitStewardAllocation(
|
||||
sellerType: freezed == sellerType ? _self.sellerType : sellerType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,buyerType: freezed == buyerType ? _self.buyerType : buyerType // ignore: cast_nullable_to_non_nullable
|
||||
@@ -311,7 +309,6 @@ as String?,totalAmount: freezed == totalAmount ? _self.totalAmount : totalAmount
|
||||
as int?,approvedPriceStatus: freezed == approvedPriceStatus ? _self.approvedPriceStatus : approvedPriceStatus // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,productionDate: freezed == productionDate ? _self.productionDate : productionDate // ignore: cast_nullable_to_non_nullable
|
||||
as String?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
|
||||
as String?,distributionType: freezed == distributionType ? _self.distributionType : distributionType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
@@ -24,7 +24,6 @@ _SubmitStewardAllocation _$SubmitStewardAllocationFromJson(
|
||||
approvedPriceStatus: json['approved_price_status'] as bool?,
|
||||
productionDate: json['production_date'] as String?,
|
||||
date: json['date'] as String?,
|
||||
distributionType: json['distribution_type'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SubmitStewardAllocationToJson(
|
||||
@@ -45,5 +44,4 @@ Map<String, dynamic> _$SubmitStewardAllocationToJson(
|
||||
'approved_price_status': instance.approvedPriceStatus,
|
||||
'production_date': instance.productionDate,
|
||||
'date': instance.date,
|
||||
'distribution_type': instance.distributionType,
|
||||
};
|
||||
@@ -4,7 +4,7 @@ part 'hatching_models.freezed.dart';
|
||||
part 'hatching_models.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class HatchingModel with _$HatchingModel {
|
||||
abstract class HatchingModel with _$HatchingModel{
|
||||
const factory HatchingModel({
|
||||
int? id,
|
||||
Poultry? poultry,
|
||||
@@ -94,11 +94,6 @@ abstract class HatchingModel with _$HatchingModel {
|
||||
String? outputArchiver,
|
||||
num? barDifferenceRequestWeight,
|
||||
num? barDifferenceRequestQuantity,
|
||||
num? totalDiseaseLosses,
|
||||
num? totalFlockDestruction,
|
||||
num? totalNormalFlockLosses,
|
||||
num? totalForceMajeureLosses,
|
||||
num? totalFireLosses,
|
||||
String? healthCertificate,
|
||||
num? samasatDischargePercentage,
|
||||
String? personTypeName,
|
||||
@@ -112,13 +107,11 @@ abstract class HatchingModel with _$HatchingModel {
|
||||
String? tenantCity,
|
||||
bool? hasTenant,
|
||||
String? archiveDate,
|
||||
bool? unknown,
|
||||
String? createdBy,
|
||||
String? modifiedBy,
|
||||
}) = _HatchingModel;
|
||||
|
||||
factory HatchingModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$HatchingModelFromJson(json);
|
||||
factory HatchingModel.fromJson(Map<String, dynamic> json) => _$HatchingModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
@@ -187,23 +180,24 @@ abstract class Poultry with _$Poultry {
|
||||
num? realKillingLiveWeight,
|
||||
num? realKillingCarcassesWeight,
|
||||
num? realKillingLossWeightPercent,
|
||||
String? interestLicenseId,
|
||||
int? interestLicenseId,
|
||||
bool? orderLimit,
|
||||
int? owner,
|
||||
int? userBankInfo,
|
||||
int? wallet,
|
||||
}) = _Poultry;
|
||||
|
||||
factory Poultry.fromJson(Map<String, dynamic> json) =>
|
||||
_$PoultryFromJson(json);
|
||||
factory Poultry.fromJson(Map<String, dynamic> json) => _$PoultryFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class PoultryUser with _$PoultryUser {
|
||||
const factory PoultryUser({String? fullname, String? mobile}) = _PoultryUser;
|
||||
const factory PoultryUser({
|
||||
String? fullname,
|
||||
String? mobile,
|
||||
}) = _PoultryUser;
|
||||
|
||||
factory PoultryUser.fromJson(Map<String, dynamic> json) =>
|
||||
_$PoultryUserFromJson(json);
|
||||
factory PoultryUser.fromJson(Map<String, dynamic> json) => _$PoultryUserFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
@@ -215,24 +209,27 @@ abstract class PoultryAddress with _$PoultryAddress {
|
||||
String? postalCode,
|
||||
}) = _PoultryAddress;
|
||||
|
||||
factory PoultryAddress.fromJson(Map<String, dynamic> json) =>
|
||||
_$PoultryAddressFromJson(json);
|
||||
factory PoultryAddress.fromJson(Map<String, dynamic> json) => _$PoultryAddressFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class ProvinceRef with _$ProvinceRef {
|
||||
const factory ProvinceRef({String? key, String? name}) = _ProvinceRef;
|
||||
const factory ProvinceRef({
|
||||
String? key,
|
||||
String? name,
|
||||
}) = _ProvinceRef;
|
||||
|
||||
factory ProvinceRef.fromJson(Map<String, dynamic> json) =>
|
||||
_$ProvinceRefFromJson(json);
|
||||
factory ProvinceRef.fromJson(Map<String, dynamic> json) => _$ProvinceRefFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class CityRef with _$CityRef {
|
||||
const factory CityRef({String? key, String? name}) = _CityRef;
|
||||
const factory CityRef({
|
||||
String? key,
|
||||
String? name,
|
||||
}) = _CityRef;
|
||||
|
||||
factory CityRef.fromJson(Map<String, dynamic> json) =>
|
||||
_$CityRefFromJson(json);
|
||||
factory CityRef.fromJson(Map<String, dynamic> json) => _$CityRefFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
@@ -250,8 +247,7 @@ abstract class ChainCompany with _$ChainCompany {
|
||||
num? wallet,
|
||||
}) = _ChainCompany;
|
||||
|
||||
factory ChainCompany.fromJson(Map<String, dynamic> json) =>
|
||||
_$ChainCompanyFromJson(json);
|
||||
factory ChainCompany.fromJson(Map<String, dynamic> json) => _$ChainCompanyFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
@@ -293,8 +289,7 @@ abstract class ChainUser with _$ChainUser {
|
||||
String? unitAddress,
|
||||
}) = _ChainUser;
|
||||
|
||||
factory ChainUser.fromJson(Map<String, dynamic> json) =>
|
||||
_$ChainUserFromJson(json);
|
||||
factory ChainUser.fromJson(Map<String, dynamic> json) => _$ChainUserFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
@@ -311,26 +306,27 @@ abstract class ChainUserState with _$ChainUserState {
|
||||
String? nationalCode,
|
||||
}) = _ChainUserState;
|
||||
|
||||
factory ChainUserState.fromJson(Map<String, dynamic> json) =>
|
||||
_$ChainUserStateFromJson(json);
|
||||
factory ChainUserState.fromJson(Map<String, dynamic> json) => _$ChainUserStateFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class VetFarm with _$VetFarm {
|
||||
const factory VetFarm({String? vetFarmFullName, String? vetFarmMobile}) =
|
||||
_VetFarm;
|
||||
const factory VetFarm({
|
||||
String? vetFarmFullName,
|
||||
String? vetFarmMobile,
|
||||
}) = _VetFarm;
|
||||
|
||||
factory VetFarm.fromJson(Map<String, dynamic> json) =>
|
||||
_$VetFarmFromJson(json);
|
||||
factory VetFarm.fromJson(Map<String, dynamic> json) => _$VetFarmFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class ActiveKill with _$ActiveKill {
|
||||
const factory ActiveKill({bool? activeKill, num? countOfRequest}) =
|
||||
_ActiveKill;
|
||||
const factory ActiveKill({
|
||||
bool? activeKill,
|
||||
num? countOfRequest,
|
||||
}) = _ActiveKill;
|
||||
|
||||
factory ActiveKill.fromJson(Map<String, dynamic> json) =>
|
||||
_$ActiveKillFromJson(json);
|
||||
factory ActiveKill.fromJson(Map<String, dynamic> json) => _$ActiveKillFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
@@ -352,8 +348,7 @@ abstract class KillingInfo with _$KillingInfo {
|
||||
num? wareHouseBarsWeightLose,
|
||||
}) = _KillingInfo;
|
||||
|
||||
factory KillingInfo.fromJson(Map<String, dynamic> json) =>
|
||||
_$KillingInfoFromJson(json);
|
||||
factory KillingInfo.fromJson(Map<String, dynamic> json) => _$KillingInfoFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
@@ -366,16 +361,17 @@ abstract class FreeGovernmentalInfo with _$FreeGovernmentalInfo {
|
||||
num? leftTotalFreeCommitmentQuantity,
|
||||
}) = _FreeGovernmentalInfo;
|
||||
|
||||
factory FreeGovernmentalInfo.fromJson(Map<String, dynamic> json) =>
|
||||
_$FreeGovernmentalInfoFromJson(json);
|
||||
factory FreeGovernmentalInfo.fromJson(Map<String, dynamic> json) => _$FreeGovernmentalInfoFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class ReportInfo with _$ReportInfo {
|
||||
const factory ReportInfo({bool? poultryScience, bool? image}) = _ReportInfo;
|
||||
const factory ReportInfo({
|
||||
bool? poultryScience,
|
||||
bool? image,
|
||||
}) = _ReportInfo;
|
||||
|
||||
factory ReportInfo.fromJson(Map<String, dynamic> json) =>
|
||||
_$ReportInfoFromJson(json);
|
||||
factory ReportInfo.fromJson(Map<String, dynamic> json) => _$ReportInfoFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
@@ -386,17 +382,18 @@ abstract class LatestHatchingChange with _$LatestHatchingChange {
|
||||
String? fullName,
|
||||
}) = _LatestHatchingChange;
|
||||
|
||||
factory LatestHatchingChange.fromJson(Map<String, dynamic> json) =>
|
||||
_$LatestHatchingChangeFromJson(json);
|
||||
factory LatestHatchingChange.fromJson(Map<String, dynamic> json) => _$LatestHatchingChangeFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class Registrar with _$Registrar {
|
||||
const factory Registrar({String? date, String? role, String? fullname}) =
|
||||
_Registrar;
|
||||
const factory Registrar({
|
||||
String? date,
|
||||
String? role,
|
||||
String? fullname,
|
||||
}) = _Registrar;
|
||||
|
||||
factory Registrar.fromJson(Map<String, dynamic> json) =>
|
||||
_$RegistrarFromJson(json);
|
||||
factory Registrar.fromJson(Map<String, dynamic> json) => _$RegistrarFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
@@ -408,8 +405,7 @@ abstract class LastChange with _$LastChange {
|
||||
String? fullName,
|
||||
}) = _LastChange;
|
||||
|
||||
factory LastChange.fromJson(Map<String, dynamic> json) =>
|
||||
_$LastChangeFromJson(json);
|
||||
factory LastChange.fromJson(Map<String, dynamic> json) => _$LastChangeFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
@@ -420,6 +416,6 @@ abstract class BreedItem with _$BreedItem {
|
||||
num? remainQuantity,
|
||||
}) = _BreedItem;
|
||||
|
||||
factory BreedItem.fromJson(Map<String, dynamic> json) =>
|
||||
_$BreedItemFromJson(json);
|
||||
factory BreedItem.fromJson(Map<String, dynamic> json) => _$BreedItemFromJson(json);
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -126,11 +126,6 @@ _HatchingModel _$HatchingModelFromJson(
|
||||
outputArchiver: json['output_archiver'] as String?,
|
||||
barDifferenceRequestWeight: json['bar_difference_request_weight'] as num?,
|
||||
barDifferenceRequestQuantity: json['bar_difference_request_quantity'] as num?,
|
||||
totalDiseaseLosses: json['total_disease_losses'] as num?,
|
||||
totalFlockDestruction: json['total_flock_destruction'] as num?,
|
||||
totalNormalFlockLosses: json['total_normal_flock_losses'] as num?,
|
||||
totalForceMajeureLosses: json['total_force_majeure_losses'] as num?,
|
||||
totalFireLosses: json['total_fire_losses'] as num?,
|
||||
healthCertificate: json['health_certificate'] as String?,
|
||||
samasatDischargePercentage: json['samasat_discharge_percentage'] as num?,
|
||||
personTypeName: json['person_type_name'] as String?,
|
||||
@@ -144,7 +139,6 @@ _HatchingModel _$HatchingModelFromJson(
|
||||
tenantCity: json['tenant_city'] as String?,
|
||||
hasTenant: json['has_tenant'] as bool?,
|
||||
archiveDate: json['archive_date'] as String?,
|
||||
unknown: json['unknown'] as bool?,
|
||||
createdBy: json['created_by'] as String?,
|
||||
modifiedBy: json['modified_by'] as String?,
|
||||
);
|
||||
@@ -239,11 +233,6 @@ Map<String, dynamic> _$HatchingModelToJson(_HatchingModel instance) =>
|
||||
'output_archiver': instance.outputArchiver,
|
||||
'bar_difference_request_weight': instance.barDifferenceRequestWeight,
|
||||
'bar_difference_request_quantity': instance.barDifferenceRequestQuantity,
|
||||
'total_disease_losses': instance.totalDiseaseLosses,
|
||||
'total_flock_destruction': instance.totalFlockDestruction,
|
||||
'total_normal_flock_losses': instance.totalNormalFlockLosses,
|
||||
'total_force_majeure_losses': instance.totalForceMajeureLosses,
|
||||
'total_fire_losses': instance.totalFireLosses,
|
||||
'health_certificate': instance.healthCertificate,
|
||||
'samasat_discharge_percentage': instance.samasatDischargePercentage,
|
||||
'person_type_name': instance.personTypeName,
|
||||
@@ -257,7 +246,6 @@ Map<String, dynamic> _$HatchingModelToJson(_HatchingModel instance) =>
|
||||
'tenant_city': instance.tenantCity,
|
||||
'has_tenant': instance.hasTenant,
|
||||
'archive_date': instance.archiveDate,
|
||||
'unknown': instance.unknown,
|
||||
'created_by': instance.createdBy,
|
||||
'modified_by': instance.modifiedBy,
|
||||
};
|
||||
@@ -331,7 +319,7 @@ _Poultry _$PoultryFromJson(Map<String, dynamic> json) => _Poultry(
|
||||
realKillingCarcassesWeight: json['real_killing_carcasses_weight'] as num?,
|
||||
realKillingLossWeightPercent:
|
||||
json['real_killing_loss_weight_percent'] as num?,
|
||||
interestLicenseId: json['interest_license_id'] as String?,
|
||||
interestLicenseId: (json['interest_license_id'] as num?)?.toInt(),
|
||||
orderLimit: json['order_limit'] as bool?,
|
||||
owner: (json['owner'] as num?)?.toInt(),
|
||||
userBankInfo: (json['user_bank_info'] as num?)?.toInt(),
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user