Compare commits

1 Commits

Author SHA1 Message Date
6644909827 fix: update .gitignore to prevent duplicate .lock entries 2025-12-03 08:43:02 +03:30
560 changed files with 5783 additions and 55457 deletions

1
.gitignore vendored
View File

@@ -17,6 +17,7 @@ migrate_working_dir/
*.ipr *.ipr
*.iws *.iws
*.lock *.lock
.lock
.idea/ .idea/
# The .vscode folder contains launch configuration and tasks you configure in # The .vscode folder contains launch configuration and tasks you configure in

View File

@@ -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` استفاده کنید یا به صورت دستی جستجو کنید.

View File

@@ -1,5 +1,5 @@
sdk.dir=C:\\Users\\Housh11\\AppData\\Local\\Android\\sdk sdk.dir=C:\\Users\\Housh11\\AppData\\Local\\Android\\sdk
flutter.sdk=C:\\src\\flutter flutter.sdk=C:\\src\\flutter
flutter.buildMode=debug flutter.buildMode=release
flutter.versionName=1.3.41 flutter.versionName=1.3.34
flutter.versionCode=37 flutter.versionCode=31

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

View File

@@ -2,5 +2,3 @@ description: This file stores settings for Dart & Flutter DevTools.
documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states
extensions: extensions:
- hive_ce: true - hive_ce: true
- provider: true
- shared_preferences: true

View File

@@ -1,6 +1,6 @@
import 'package:rasadyar_app/presentation/routes/app_pages.dart'; import 'package:rasadyar_app/presentation/routes/app_pages.dart';
import 'package:rasadyar_chicken/data/di/chicken_di.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_core/core.dart';
import 'package:rasadyar_inspection/injection/inspection_di.dart'; import 'package:rasadyar_inspection/injection/inspection_di.dart';
import 'package:rasadyar_inspection/inspection.dart'; import 'package:rasadyar_inspection/inspection.dart';
@@ -22,7 +22,7 @@ Future<void> seedTargetPage() async {
functions: ["setupLiveStockDI"], functions: ["setupLiveStockDI"],
), ),
TargetPage( TargetPage(
route: StewardRoutes.initSteward, route: ChickenRoutes.initSteward,
module: Module.chicken, module: Module.chicken,
functions: ["setupChickenDI"], functions: ["setupChickenDI"],
), ),

View File

@@ -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": "تست"
}
}

View File

@@ -2,5 +2,3 @@ description: This file stores settings for Dart & Flutter DevTools.
documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states
extensions: extensions:
- hive_ce: true - hive_ce: true
- provider: true
- shared_preferences: true

View File

@@ -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'; import 'package:rasadyar_chicken/presentation/routes/routes.dart';
String getFaUserRole(String? role) { String getFaUserRole(String? role) {
@@ -97,7 +88,7 @@ Map<String, String?> getFaUserRoleWithOnTap(String? role) {
case "Poultry": case "Poultry":
return {"مرغدار": null}; return {"مرغدار": null};
case "ProvinceOperator": case "ProvinceOperator":
return {"مدیر اجرایی": ProvinceOperatorRoutes.initProvinceOperator}; return {"مدیر اجرایی": null};
case "ProvinceFinancial": case "ProvinceFinancial":
return {"مالی اتحادیه": null}; return {"مالی اتحادیه": null};
case "KillHouse": case "KillHouse":
@@ -105,17 +96,17 @@ Map<String, String?> getFaUserRoleWithOnTap(String? role) {
case "KillHouseVet": case "KillHouseVet":
return {"دامپزشک کشتارگاه": null}; return {"دامپزشک کشتارگاه": null};
case "VetFarm": case "VetFarm":
return {"دامپزشک فارم": VetFarmRoutes.initVetFarm}; return {"دامپزشک فارم": null};
case "Driver": case "Driver":
return {"راننده": null}; return {"راننده": null};
case "ProvinceInspector": case "ProvinceInspector":
return {"بازرس اتحادیه": ProvinceInspectorRoutes.initProvinceInspector}; return {"بازرس اتحادیه": null};
case "VetSupervisor": case "VetSupervisor":
return {"دامپزشک کل": null}; return {"دامپزشک کل": null};
case "Jahad": case "Jahad":
return {"جهاد کشاورزی استان": JahadRoutes.initJahad}; return {"جهاد کشاورزی استان": null};
case "CityJahad": case "CityJahad":
return {"جهاد کشاورزی شهرستان": CityJahadRoutes.initCityJahad}; return {"جهاد کشاورزی شهرستان": null};
case "ProvincialGovernment": case "ProvincialGovernment":
return {"استانداری": null}; return {"استانداری": null};
case "Guilds": case "Guilds":
@@ -131,7 +122,7 @@ Map<String, String?> getFaUserRoleWithOnTap(String? role) {
case "Observatory": case "Observatory":
return {"رصدخانه": null}; return {"رصدخانه": null};
case "ProvinceSupervisor": case "ProvinceSupervisor":
return {"ناظر استان": ProvinceSupervisorRoutes.initProvinceSupervisor}; return {"ناظر استان": null};
case "GuildRoom": case "GuildRoom":
return {"اتاق اصناف": null}; return {"اتاق اصناف": null};
case "PosCompany": case "PosCompany":
@@ -139,7 +130,7 @@ Map<String, String?> getFaUserRoleWithOnTap(String? role) {
case "LiveStockSupport": case "LiveStockSupport":
return {"پشتیبانی امور دام": null}; return {"پشتیبانی امور دام": null};
case "SuperAdmin": case "SuperAdmin":
return {"ادمین کل": SuperAdminRoutes.initSuperAdmin}; return {"ادمین کل": null};
case "ChainCompany": case "ChainCompany":
return {"شرکت زنجیره": null}; return {"شرکت زنجیره": null};
case "AdminX": case "AdminX":
@@ -159,9 +150,9 @@ Map<String, String?> getFaUserRoleWithOnTap(String? role) {
case "LiveStockProvinceJahad": case "LiveStockProvinceJahad":
return {"جهاد استان": null}; return {"جهاد استان": null};
case "Steward": case "Steward":
return {"مباشر": StewardRoutes.initSteward}; return {"مباشر": ChickenRoutes.initSteward};
case "PoultryScience": case "PoultryScience":
return {"کارشناس طیور": PoultryScienceRoutes.initPoultryScience}; return {"کارشناس طیور": ChickenRoutes.initPoultryScience};
default: default:
return {"نامشخص": null}; return {"نامشخص": null};
} }

View File

@@ -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 { abstract class ChickenLocalDataSource {
Future<void> openBox(); Future<void> openBox();

View File

@@ -1,5 +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';
import 'package:rasadyar_chicken/features/steward/presentation/routes/routes.dart';
import 'package:rasadyar_core/core.dart'; import 'package:rasadyar_core/core.dart';
import 'chicken_local.dart'; import 'chicken_local.dart';
@@ -23,7 +22,7 @@ class ChickenLocalDataSourceImp implements ChickenLocalDataSource {
color: AppColor.greenLightActive.toARGB32(), color: AppColor.greenLightActive.toARGB32(),
iconColor: AppColor.greenNormal.toARGB32(), iconColor: AppColor.greenNormal.toARGB32(),
iconPath: Assets.vec.cubeSearchSvg.path, iconPath: Assets.vec.cubeSearchSvg.path,
path: StewardRoutes.buysInProvinceSteward, path: ChickenRoutes.buysInProvinceSteward,
), ),
WidelyUsedLocalItem( WidelyUsedLocalItem(
index: 1, index: 1,
@@ -32,7 +31,7 @@ class ChickenLocalDataSourceImp implements ChickenLocalDataSource {
color: AppColor.blueLightActive.toARGB32(), color: AppColor.blueLightActive.toARGB32(),
iconColor: AppColor.blueNormal.toARGB32(), iconColor: AppColor.blueNormal.toARGB32(),
iconPath: Assets.vec.cubeSvg.path, iconPath: Assets.vec.cubeSvg.path,
path: StewardRoutes.salesInProvinceSteward, path: ChickenRoutes.salesInProvinceSteward,
), ),
WidelyUsedLocalItem( WidelyUsedLocalItem(
@@ -41,7 +40,7 @@ class ChickenLocalDataSourceImp implements ChickenLocalDataSource {
color: AppColor.blueLightActive.toARGB32(), color: AppColor.blueLightActive.toARGB32(),
iconColor: AppColor.blueNormal.toARGB32(), iconColor: AppColor.blueNormal.toARGB32(),
iconPath: Assets.vec.cubeRotateSvg.path, iconPath: Assets.vec.cubeRotateSvg.path,
path: StewardRoutes.buysInProvinceSteward, path: ChickenRoutes.buysInProvinceSteward,
), ),
]; */ ]; */
} }

View File

@@ -1,6 +1,6 @@
import 'package:rasadyar_chicken/features/common/data/model/response/user_info/user_info_model.dart'; import 'package:rasadyar_chicken/data/models/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_profile_model/user_profile_model.dart';
abstract class AuthRemoteDataSource { abstract class AuthRemoteDataSource {
Future<UserProfileModel?> login({required Map<String, dynamic> authRequest}); Future<UserProfileModel?> login({required Map<String, dynamic> authRequest});
@@ -11,6 +11,6 @@ abstract class AuthRemoteDataSource {
Future<UserInfoModel?> getUserInfo(String phoneNumber); 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}); Future<void> stewardAppLogin({required String token, Map<String, dynamic>? queryParameters});
} }

View File

@@ -1,5 +1,5 @@
import 'package:rasadyar_chicken/features/common/data/model/response/user_info/user_info_model.dart'; import 'package:rasadyar_chicken/data/models/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_profile_model/user_profile_model.dart';
import 'package:rasadyar_core/core.dart'; import 'package:rasadyar_core/core.dart';
import 'auth_remote.dart'; import 'auth_remote.dart';

View File

@@ -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});
}

View File

@@ -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;
}
}

View File

@@ -0,0 +1,25 @@
import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/response/chicken_commission_prices/chicken_commission_prices.dart';
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;
abstract class KillHouseRemoteDataSource {
Future<List<KillHouseResponse>?> getKillHouseList({
required String token,
Map<String, dynamic>? queryParameters,
});
Future<ChickenCommissionPrices?> getCommissionPrice({
required String token,
Map<String, dynamic>? queryParameters,
});
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});
}

View File

@@ -0,0 +1,80 @@
import 'package:rasadyar_chicken/data/data_source/remote/kill_house/kill_house_remote.dart';
import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/response/chicken_commission_prices/chicken_commission_prices.dart';
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_core/core.dart';
class KillHouseRemoteDataSourceImpl extends KillHouseRemoteDataSource {
final DioRemote _httpClient;
KillHouseRemoteDataSourceImpl(this._httpClient);
@override
Future<ChickenCommissionPrices?> getCommissionPrice({
required String token,
Map<String, dynamic>? queryParameters,
}) async {
var res = await _httpClient.get(
'/chicken-commission-prices/',
headers: {'Authorization': 'Bearer $token'},
fromJson: (json) {
var data = json['results'] as List<dynamic>;
return ChickenCommissionPrices.fromJson(data.first as Map<String, dynamic>);
},
);
return res.data;
}
@override
Future<List<KillHouseResponse>?> getKillHouseList({
required String token,
Map<String, dynamic>? queryParameters,
}) async {
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(),
);
return res.data;
}
@override
Future<void> submitKillHouseRequest({
required String token,
required Map<String, dynamic> data,
}) async {
await _httpClient.post(
'/kill_request/',
headers: {'Authorization': 'Bearer $token'},
data: data,
);
}
@override
Future<List<listModel.KillRequestList>?> getListKillRequest({
required String token,
Map<String, dynamic>? queryParameters,
}) async {
var res = await _httpClient.get(
'/kill_request/',
headers: {'Authorization': 'Bearer $token'},
queryParameters: queryParameters,
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 {
await _httpClient.delete(
'/kill_request/$requestId/',
headers: {'Authorization': 'Bearer $token'},
);
}
}

View File

@@ -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,
});
}

View File

@@ -1,26 +1,24 @@
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/hatching/hatching_models.dart'; import 'package:rasadyar_chicken/data/models/poultry_export/poultry_export.dart';
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/hatching_report/hatching_report.dart'; import 'package:rasadyar_chicken/data/models/request/kill_registration/kill_registration.dart';
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/home_poultry_science/home_poultry_science_model.dart'; import 'package:rasadyar_chicken/data/models/response/all_poultry/all_poultry.dart';
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/poultry_farm/poultry_farm.dart'; import 'package:rasadyar_chicken/data/models/response/approved_price/approved_price.dart';
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/approved_price/approved_price.dart'; import 'package:rasadyar_chicken/data/models/response/hatching/hatching_models.dart';
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/all_poultry/all_poultry.dart'; import 'package:rasadyar_chicken/data/models/response/hatching_report/hatching_report.dart';
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/poultry_science_report/poultry_science_report.dart'; import 'package:rasadyar_chicken/data/models/response/kill_house_poultry/kill_house_poultry.dart';
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/sell_for_freezing/sell_for_freezing.dart'; import 'package:rasadyar_chicken/data/models/response/kill_request_poultry/kill_request_poultry.dart';
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/poultry_export/poultry_export.dart'; import 'package:rasadyar_chicken/data/models/response/poultry_farm/poultry_farm.dart';
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/kill_request_poultry/kill_request_poultry.dart'; import 'package:rasadyar_chicken/data/models/response/poultry_hatching/poultry_hatching.dart';
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/poultry_hatching/poultry_hatching.dart'; import 'package:rasadyar_chicken/data/models/response/poultry_order/poultry_order.dart';
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/kill_house_poultry/kill_house_poultry.dart'; import 'package:rasadyar_chicken/data/models/response/poultry_science/home_poultry_science/home_poultry_science_model.dart';
import 'package:rasadyar_chicken/features/poultry_science/data/model/request/kill_registration/kill_registration.dart'; import 'package:rasadyar_chicken/data/models/response/sell_for_freezing/sell_for_freezing.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_core/core.dart'; import 'package:rasadyar_core/core.dart';
class PoultryScienceRemoteDataSourceImpl import 'poultry_science_remote.dart';
implements PoultryScienceRemoteDataSource {
class PoultryScienceRemoteDatasourceImp implements PoultryScienceRemoteDatasource {
final DioRemote _httpClient; final DioRemote _httpClient;
PoultryScienceRemoteDataSourceImpl(this._httpClient); PoultryScienceRemoteDatasourceImp(this._httpClient);
@override @override
Future<HomePoultryScienceModel?> getHomePoultryScience({ Future<HomePoultryScienceModel?> getHomePoultryScience({
@@ -126,9 +124,8 @@ class PoultryScienceRemoteDataSourceImpl
'/get-all-poultry/', '/get-all-poultry/',
headers: {'Authorization': 'Bearer $token'}, headers: {'Authorization': 'Bearer $token'},
queryParameters: queryParameters, queryParameters: queryParameters,
fromJsonList: (json) => json fromJsonList: (json) =>
.map((e) => AllPoultry.fromJson(e as Map<String, dynamic>)) json.map((e) => AllPoultry.fromJson(e as Map<String, dynamic>)).toList(),
.toList(),
); );
return res.data; return res.data;
} }
@@ -170,8 +167,7 @@ class PoultryScienceRemoteDataSourceImpl
'/Poultry/', '/Poultry/',
headers: {'Authorization': 'Bearer $token'}, headers: {'Authorization': 'Bearer $token'},
queryParameters: queryParameters, queryParameters: queryParameters,
fromJsonList: (json) => fromJsonList: (json) => json.map((e) => KillRequestPoultry.fromJson(e)).toList(),
json.map((e) => KillRequestPoultry.fromJson(e)).toList(),
); );
return res.data; return res.data;
} }
@@ -185,8 +181,7 @@ class PoultryScienceRemoteDataSourceImpl
'/poultry_hatching/', '/poultry_hatching/',
headers: {'Authorization': 'Bearer $token'}, headers: {'Authorization': 'Bearer $token'},
queryParameters: queryParameters, queryParameters: queryParameters,
fromJsonList: (json) => fromJsonList: (json) => json.map((e) => PoultryHatching.fromJson(e)).toList(),
json.map((e) => PoultryHatching.fromJson(e)).toList(),
); );
return res.data; return res.data;
} }
@@ -200,8 +195,7 @@ class PoultryScienceRemoteDataSourceImpl
'/kill_house_list/', '/kill_house_list/',
headers: {'Authorization': 'Bearer $token'}, headers: {'Authorization': 'Bearer $token'},
queryParameters: queryParameters, queryParameters: queryParameters,
fromJsonList: (json) => fromJsonList: (json) => json.map((e) => KillHousePoultry.fromJson(e)).toList(),
json.map((e) => KillHousePoultry.fromJson(e)).toList(),
); );
return res.data; return res.data;
} }
@@ -237,60 +231,12 @@ class PoultryScienceRemoteDataSourceImpl
} }
@override @override
Future<void> deletePoultryOder({ Future<void> deletePoultryOder({required String token, required String orderId}) async {
required String token,
required String orderId,
}) async {
await _httpClient.delete( await _httpClient.delete(
'/Poultry_Request/$orderId/', '/Poultry_Request/$orderId/',
headers: {'Authorization': 'Bearer $token'}, 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 //endregion
} }

View File

@@ -1,15 +1,23 @@
import 'package:rasadyar_chicken/chicken.dart';
import 'package:rasadyar_chicken/data/common/dio_error_handler.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/data/data_source/local/chicken_local.dart';
import 'package:rasadyar_chicken/features/common/data/di/common_di.dart'; import 'package:rasadyar_chicken/data/data_source/local/chicken_local_imp.dart';
import 'package:rasadyar_chicken/features/poultry_science/data/di/poultry_science_di.dart'; import 'package:rasadyar_chicken/data/data_source/remote/auth/auth_remote.dart';
import 'package:rasadyar_chicken/features/steward/data/di/steward_di.dart'; import 'package:rasadyar_chicken/data/data_source/remote/auth/auth_remote_imp.dart';
import 'package:rasadyar_chicken/features/province_operator/data/di/province_operator_di.dart'; import 'package:rasadyar_chicken/data/data_source/remote/chicken/chicken_remote.dart';
import 'package:rasadyar_chicken/features/province_inspector/data/di/province_inspector_di.dart'; import 'package:rasadyar_chicken/data/data_source/remote/chicken/chicken_remote_imp.dart';
import 'package:rasadyar_chicken/features/city_jahad/data/di/city_jahad_di.dart'; import 'package:rasadyar_chicken/data/data_source/remote/kill_house/kill_house_remote.dart';
import 'package:rasadyar_chicken/features/vet_farm/data/di/vet_farm_di.dart'; import 'package:rasadyar_chicken/data/data_source/remote/kill_house/kill_house_remote_impl.dart';
import 'package:rasadyar_chicken/features/super_admin/data/di/super_admin_di.dart'; import 'package:rasadyar_chicken/data/data_source/remote/poultry_science/poultry_science_remote.dart';
import 'package:rasadyar_chicken/features/province_supervisor/data/di/province_supervisor_di.dart'; import 'package:rasadyar_chicken/data/data_source/remote/poultry_science/poultry_science_remote_imp.dart';
import 'package:rasadyar_chicken/features/jahad/data/di/jahad_di.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/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'; import 'package:rasadyar_core/core.dart';
GetIt diChicken = GetIt.asNewInstance(); GetIt diChicken = GetIt.asNewInstance();
@@ -32,7 +40,7 @@ Future<void> setupChickenDI() async {
}, },
clearTokenCallback: () async { clearTokenCallback: () async {
await tokenService.deleteModuleTokens(Module.chicken); await tokenService.deleteModuleTokens(Module.chicken);
Get.offAllNamed(CommonRoutes.auth, arguments: Module.chicken); Get.offAllNamed(ChickenRoutes.auth, arguments: Module.chicken);
}, },
), ),
instanceName: 'chickenInterceptor', instanceName: 'chickenInterceptor',
@@ -43,94 +51,105 @@ Future<void> setupChickenDI() async {
diChicken.registerLazySingleton<DioRemote>( diChicken.registerLazySingleton<DioRemote>(
() => DioRemote( () => DioRemote(
baseUrl: baseUrl, baseUrl: baseUrl,
interceptors: diChicken.get<AppInterceptor>( interceptors: diChicken.get<AppInterceptor>(instanceName: 'chickenInterceptor'),
instanceName: 'chickenInterceptor',
),
), ),
); );
final dioRemote = diChicken.get<DioRemote>(); final dioRemote = diChicken.get<DioRemote>();
await dioRemote.init(); await dioRemote.init();
// Setup common feature DI diChicken.registerLazySingleton<AuthRemoteDataSource>(() => AuthRemoteDataSourceImp(dioRemote));
await setupCommonDI(diChicken, dioRemote);
// Setup poultry_science feature DI diChicken.registerLazySingleton<AuthRepository>(
await setupPoultryScienceDI(diChicken, dioRemote); () => AuthRepositoryImpl(diChicken.get<AuthRemoteDataSource>()),
);
// Setup steward feature DI diChicken.registerLazySingleton<ChickenRemoteDatasource>(
await setupStewardDI(diChicken, dioRemote); () => ChickenRemoteDatasourceImp(diChicken.get<DioRemote>()),
);
// Setup province_operator feature DI diChicken.registerLazySingleton<ChickenLocalDataSource>(() => ChickenLocalDataSourceImp());
await setupProvinceOperatorDI(diChicken, dioRemote);
// Setup province_inspector feature DI diChicken.registerLazySingleton<ChickenRepository>(
await setupProvinceInspectorDI(diChicken, dioRemote); () => ChickenRepositoryImp(
remote: diChicken.get<ChickenRemoteDatasource>(),
local: diChicken.get<ChickenLocalDataSource>(),
),
);
// Setup city_jahad feature DI diChicken.registerLazySingleton<PoultryScienceRemoteDatasource>(
await setupCityJahadDI(diChicken, dioRemote); () => 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>(
() => KillHouseRemoteDataSourceImpl(diChicken.get<DioRemote>()),
);
diChicken.registerLazySingleton<KillHouseRepository>(
() => KillHouseRepositoryImpl(diChicken.get<KillHouseRemoteDataSource>()),
);
//endregion
} }
Future<void> newSetupAuthDI(String newUrl) async { Future<void> newSetupAuthDI(String newUrl) async {
var tokenService = Get.find<TokenStorageService>(); var tokenService = Get.find<TokenStorageService>();
// همیشه baseUrl جدید رو ذخیره کن
await tokenService.saveBaseUrl(Module.chicken, newUrl); await tokenService.saveBaseUrl(Module.chicken, newUrl);
// پاک‌سازی DI مخصوص ماژول مرغ // Re-register AppInterceptor
await diChicken.resetScope(); if (diChicken.isRegistered<AppInterceptor>(instanceName: 'chickenInterceptor')) {
diChicken.pushNewScope(); await diChicken.unregister<AppInterceptor>(instanceName: 'chickenInterceptor');
}
// --- Re-register AppInterceptor
diChicken.registerLazySingleton<AppInterceptor>( diChicken.registerLazySingleton<AppInterceptor>(
() => AppInterceptor( () => AppInterceptor(
refreshTokenCallback: () async => null, refreshTokenCallback: () async => null,
saveTokenCallback: (newToken) async {}, saveTokenCallback: (String newToken) async {
// await tokenService.saveAccessToken(newToken);
},
clearTokenCallback: () async { clearTokenCallback: () async {
await tokenService.deleteModuleTokens(Module.chicken); await tokenService.deleteModuleTokens(Module.chicken);
Get.offAllNamed(CommonRoutes.auth, arguments: Module.chicken); Get.offAllNamed(ChickenRoutes.auth, arguments: Module.chicken);
}, },
), ),
instanceName: 'chickenInterceptor', instanceName: 'chickenInterceptor',
); );
// --- Re-register DioRemote // Re-register DioRemote
if (diChicken.isRegistered<DioRemote>()) {
await diChicken.unregister<DioRemote>();
}
diChicken.registerLazySingleton<DioRemote>( diChicken.registerLazySingleton<DioRemote>(
() => DioRemote( () => DioRemote(
baseUrl: newUrl, baseUrl: newUrl,
interceptors: diChicken.get<AppInterceptor>( interceptors: diChicken.get<AppInterceptor>(instanceName: 'chickenInterceptor'),
instanceName: 'chickenInterceptor',
),
), ),
); );
final dioRemote = diChicken.get<DioRemote>(); final dioRemote = diChicken.get<DioRemote>();
await dioRemote.init(); await dioRemote.init();
// --- common, poultry_science, steward, and other features // Re-register dependent layers
await setupCommonDI(diChicken, dioRemote); await reRegister<AuthRemoteDataSource>(() => AuthRemoteDataSourceImp(dioRemote));
await setupPoultryScienceDI(diChicken, dioRemote); await reRegister<AuthRepository>(() => AuthRepositoryImpl(diChicken.get<AuthRemoteDataSource>()));
await setupStewardDI(diChicken, dioRemote); await reRegister<ChickenRemoteDatasource>(() => ChickenRemoteDatasourceImp(dioRemote));
await setupProvinceOperatorDI(diChicken, dioRemote); await reRegister<ChickenLocalDataSource>(() => ChickenLocalDataSourceImp());
await setupProvinceInspectorDI(diChicken, dioRemote); await reRegister<ChickenRepository>(
await setupCityJahadDI(diChicken, dioRemote); () => ChickenRepositoryImp(
await setupVetFarmDI(diChicken, dioRemote); remote: diChicken.get<ChickenRemoteDatasource>(),
await setupSuperAdminDI(diChicken, dioRemote); local: diChicken.get<ChickenLocalDataSource>(),
await setupProvinceSupervisorDI(diChicken, dioRemote); ),
await setupJahadDI(diChicken, dioRemote); );
await reRegister<PoultryScienceRemoteDatasource>(
() => PoultryScienceRemoteDatasourceImp(dioRemote),
);
await reRegister<PoultryScienceRepository>(
() => PoultryScienceRepositoryImp(diChicken.get<PoultryScienceRemoteDatasource>()),
);
} }
Future<void> reRegister<T extends Object>(T Function() factory) async { Future<void> reRegister<T extends Object>(T Function() factory) async {

View File

@@ -16,7 +16,6 @@ abstract class CreateStewardFreeBar with _$CreateStewardFreeBar {
int? numberOfCarcasses, int? numberOfCarcasses,
String? date, String? date,
String? barImage, String? barImage,
String? distributionType,
}) = _CreateStewardFreeBar; }) = _CreateStewardFreeBar;
factory CreateStewardFreeBar.fromJson(Map<String, dynamic> json) => factory CreateStewardFreeBar.fromJson(Map<String, dynamic> json) =>

View File

@@ -15,7 +15,7 @@ T _$identity<T>(T value) => value;
/// @nodoc /// @nodoc
mixin _$CreateStewardFreeBar { 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 /// Create a copy of CreateStewardFreeBar
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@@ -28,16 +28,16 @@ $CreateStewardFreeBarCopyWith<CreateStewardFreeBar> get copyWith => _$CreateStew
@override @override
bool operator ==(Object other) { 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) @JsonKey(includeFromJson: false, includeToJson: false)
@override @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 @override
String toString() { 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; factory $CreateStewardFreeBarCopyWith(CreateStewardFreeBar value, $Res Function(CreateStewardFreeBar) _then) = _$CreateStewardFreeBarCopyWithImpl;
@useResult @useResult
$Res call({ $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 /// Create a copy of CreateStewardFreeBar
/// with the given fields replaced by the non-null parameter values. /// 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( return _then(_self.copyWith(
productKey: freezed == productKey ? _self.productKey : productKey // ignore: cast_nullable_to_non_nullable 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 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?,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 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?,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?, 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) { switch (_that) {
case _CreateStewardFreeBar() when $default != null: 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(); 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) { switch (_that) {
case _CreateStewardFreeBar(): 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'); 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) { switch (_that) {
case _CreateStewardFreeBar() when $default != null: 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; return null;
} }
@@ -219,7 +218,7 @@ return $default(_that.productKey,_that.key,_that.killHouseName,_that.killHouseMo
@JsonSerializable() @JsonSerializable()
class _CreateStewardFreeBar implements CreateStewardFreeBar { 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); factory _CreateStewardFreeBar.fromJson(Map<String, dynamic> json) => _$CreateStewardFreeBarFromJson(json);
@override final String? productKey; @override final String? productKey;
@@ -232,7 +231,6 @@ class _CreateStewardFreeBar implements CreateStewardFreeBar {
@override final int? numberOfCarcasses; @override final int? numberOfCarcasses;
@override final String? date; @override final String? date;
@override final String? barImage; @override final String? barImage;
@override final String? distributionType;
/// Create a copy of CreateStewardFreeBar /// Create a copy of CreateStewardFreeBar
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@@ -247,16 +245,16 @@ Map<String, dynamic> toJson() {
@override @override
bool operator ==(Object other) { 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) @JsonKey(includeFromJson: false, includeToJson: false)
@override @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 @override
String toString() { 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; factory _$CreateStewardFreeBarCopyWith(_CreateStewardFreeBar value, $Res Function(_CreateStewardFreeBar) _then) = __$CreateStewardFreeBarCopyWithImpl;
@override @useResult @override @useResult
$Res call({ $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 /// Create a copy of CreateStewardFreeBar
/// with the given fields replaced by the non-null parameter values. /// 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( return _then(_CreateStewardFreeBar(
productKey: freezed == productKey ? _self.productKey : productKey // ignore: cast_nullable_to_non_nullable 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 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?,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 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?,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?, as String?,
)); ));
} }

View File

@@ -19,7 +19,6 @@ _CreateStewardFreeBar _$CreateStewardFreeBarFromJson(
numberOfCarcasses: (json['number_of_carcasses'] as num?)?.toInt(), numberOfCarcasses: (json['number_of_carcasses'] as num?)?.toInt(),
date: json['date'] as String?, date: json['date'] as String?,
barImage: json['bar_image'] as String?, barImage: json['bar_image'] as String?,
distributionType: json['distribution_type'] as String?,
); );
Map<String, dynamic> _$CreateStewardFreeBarToJson( Map<String, dynamic> _$CreateStewardFreeBarToJson(
@@ -35,5 +34,4 @@ Map<String, dynamic> _$CreateStewardFreeBarToJson(
'number_of_carcasses': instance.numberOfCarcasses, 'number_of_carcasses': instance.numberOfCarcasses,
'date': instance.date, 'date': instance.date,
'bar_image': instance.barImage, 'bar_image': instance.barImage,
'distribution_type': instance.distributionType,
}; };

View File

@@ -22,7 +22,6 @@ abstract class StewardFreeSaleBarRequest with _$StewardFreeSaleBarRequest {
String? quota, String? quota,
String? saleType, String? saleType,
String? productionDate, String? productionDate,
String? distributionType,
}) = _StewardFreeSaleBarRequest; }) = _StewardFreeSaleBarRequest;
factory StewardFreeSaleBarRequest.fromJson(Map<String, dynamic> json) => factory StewardFreeSaleBarRequest.fromJson(Map<String, dynamic> json) =>

View File

@@ -15,7 +15,7 @@ T _$identity<T>(T value) => value;
/// @nodoc /// @nodoc
mixin _$StewardFreeSaleBarRequest { 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 /// Create a copy of StewardFreeSaleBarRequest
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@@ -28,16 +28,16 @@ $StewardFreeSaleBarRequestCopyWith<StewardFreeSaleBarRequest> get copyWith => _$
@override @override
bool operator ==(Object other) { 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) @JsonKey(includeFromJson: false, includeToJson: false)
@override @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 @override
String toString() { 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; factory $StewardFreeSaleBarRequestCopyWith(StewardFreeSaleBarRequest value, $Res Function(StewardFreeSaleBarRequest) _then) = _$StewardFreeSaleBarRequestCopyWithImpl;
@useResult @useResult
$Res call({ $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 /// Create a copy of StewardFreeSaleBarRequest
/// with the given fields replaced by the non-null parameter values. /// 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( return _then(_self.copyWith(
buyerKey: freezed == buyerKey ? _self.buyerKey : buyerKey // ignore: cast_nullable_to_non_nullable 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 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?,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?,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?,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?, 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) { switch (_that) {
case _StewardFreeSaleBarRequest() when $default != null: 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(); 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) { switch (_that) {
case _StewardFreeSaleBarRequest(): 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'); 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) { switch (_that) {
case _StewardFreeSaleBarRequest() when $default != null: 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; return null;
} }
@@ -225,7 +224,7 @@ return $default(_that.buyerKey,_that.buyerMobile,_that.buyerName,_that.city,_tha
@JsonSerializable() @JsonSerializable()
class _StewardFreeSaleBarRequest implements StewardFreeSaleBarRequest { 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); factory _StewardFreeSaleBarRequest.fromJson(Map<String, dynamic> json) => _$StewardFreeSaleBarRequestFromJson(json);
@override final String? buyerKey; @override final String? buyerKey;
@@ -244,7 +243,6 @@ class _StewardFreeSaleBarRequest implements StewardFreeSaleBarRequest {
@override final String? quota; @override final String? quota;
@override final String? saleType; @override final String? saleType;
@override final String? productionDate; @override final String? productionDate;
@override final String? distributionType;
/// Create a copy of StewardFreeSaleBarRequest /// Create a copy of StewardFreeSaleBarRequest
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@@ -259,16 +257,16 @@ Map<String, dynamic> toJson() {
@override @override
bool operator ==(Object other) { 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) @JsonKey(includeFromJson: false, includeToJson: false)
@override @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 @override
String toString() { 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; factory _$StewardFreeSaleBarRequestCopyWith(_StewardFreeSaleBarRequest value, $Res Function(_StewardFreeSaleBarRequest) _then) = __$StewardFreeSaleBarRequestCopyWithImpl;
@override @useResult @override @useResult
$Res call({ $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 /// Create a copy of StewardFreeSaleBarRequest
/// with the given fields replaced by the non-null parameter values. /// 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( return _then(_StewardFreeSaleBarRequest(
buyerKey: freezed == buyerKey ? _self.buyerKey : buyerKey // ignore: cast_nullable_to_non_nullable 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 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?,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?,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?,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?, as String?,
)); ));
} }

View File

@@ -25,7 +25,6 @@ _StewardFreeSaleBarRequest _$StewardFreeSaleBarRequestFromJson(
quota: json['quota'] as String?, quota: json['quota'] as String?,
saleType: json['sale_type'] as String?, saleType: json['sale_type'] as String?,
productionDate: json['production_date'] as String?, productionDate: json['production_date'] as String?,
distributionType: json['distribution_type'] as String?,
); );
Map<String, dynamic> _$StewardFreeSaleBarRequestToJson( Map<String, dynamic> _$StewardFreeSaleBarRequestToJson(
@@ -47,5 +46,4 @@ Map<String, dynamic> _$StewardFreeSaleBarRequestToJson(
'quota': instance.quota, 'quota': instance.quota,
'sale_type': instance.saleType, 'sale_type': instance.saleType,
'production_date': instance.productionDate, 'production_date': instance.productionDate,
'distribution_type': instance.distributionType,
}; };

View File

@@ -21,7 +21,6 @@ abstract class SubmitStewardAllocation with _$SubmitStewardAllocation {
bool? approvedPriceStatus, bool? approvedPriceStatus,
String? productionDate, String? productionDate,
String? date, String? date,
String? distributionType,
}) = _SubmitStewardAllocation; }) = _SubmitStewardAllocation;
factory SubmitStewardAllocation.fromJson(Map<String, dynamic> json) => factory SubmitStewardAllocation.fromJson(Map<String, dynamic> json) =>

View File

@@ -15,7 +15,7 @@ T _$identity<T>(T value) => value;
/// @nodoc /// @nodoc
mixin _$SubmitStewardAllocation { 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 /// Create a copy of SubmitStewardAllocation
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@@ -28,16 +28,16 @@ $SubmitStewardAllocationCopyWith<SubmitStewardAllocation> get copyWith => _$Subm
@override @override
bool operator ==(Object other) { 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) @JsonKey(includeFromJson: false, includeToJson: false)
@override @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 @override
String toString() { 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; factory $SubmitStewardAllocationCopyWith(SubmitStewardAllocation value, $Res Function(SubmitStewardAllocation) _then) = _$SubmitStewardAllocationCopyWithImpl;
@useResult @useResult
$Res call({ $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 /// Create a copy of SubmitStewardAllocation
/// with the given fields replaced by the non-null parameter values. /// 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( return _then(_self.copyWith(
sellerType: freezed == sellerType ? _self.sellerType : sellerType // ignore: cast_nullable_to_non_nullable 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 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 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 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?,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?, 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) { switch (_that) {
case _SubmitStewardAllocation() when $default != null: 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(); 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) { switch (_that) {
case _SubmitStewardAllocation(): 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'); 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) { switch (_that) {
case _SubmitStewardAllocation() when $default != null: 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; return null;
} }
@@ -224,7 +223,7 @@ return $default(_that.sellerType,_that.buyerType,_that.guildKey,_that.productKey
@JsonSerializable() @JsonSerializable()
class _SubmitStewardAllocation implements SubmitStewardAllocation { 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); factory _SubmitStewardAllocation.fromJson(Map<String, dynamic> json) => _$SubmitStewardAllocationFromJson(json);
@override final String? sellerType; @override final String? sellerType;
@@ -242,7 +241,6 @@ class _SubmitStewardAllocation implements SubmitStewardAllocation {
@override final bool? approvedPriceStatus; @override final bool? approvedPriceStatus;
@override final String? productionDate; @override final String? productionDate;
@override final String? date; @override final String? date;
@override final String? distributionType;
/// Create a copy of SubmitStewardAllocation /// Create a copy of SubmitStewardAllocation
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@@ -257,16 +255,16 @@ Map<String, dynamic> toJson() {
@override @override
bool operator ==(Object other) { 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) @JsonKey(includeFromJson: false, includeToJson: false)
@override @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 @override
String toString() { 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; factory _$SubmitStewardAllocationCopyWith(_SubmitStewardAllocation value, $Res Function(_SubmitStewardAllocation) _then) = __$SubmitStewardAllocationCopyWithImpl;
@override @useResult @override @useResult
$Res call({ $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 /// Create a copy of SubmitStewardAllocation
/// with the given fields replaced by the non-null parameter values. /// 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( return _then(_SubmitStewardAllocation(
sellerType: freezed == sellerType ? _self.sellerType : sellerType // ignore: cast_nullable_to_non_nullable 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 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 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 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?,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?, as String?,
)); ));
} }

View File

@@ -24,7 +24,6 @@ _SubmitStewardAllocation _$SubmitStewardAllocationFromJson(
approvedPriceStatus: json['approved_price_status'] as bool?, approvedPriceStatus: json['approved_price_status'] as bool?,
productionDate: json['production_date'] as String?, productionDate: json['production_date'] as String?,
date: json['date'] as String?, date: json['date'] as String?,
distributionType: json['distribution_type'] as String?,
); );
Map<String, dynamic> _$SubmitStewardAllocationToJson( Map<String, dynamic> _$SubmitStewardAllocationToJson(
@@ -45,5 +44,4 @@ Map<String, dynamic> _$SubmitStewardAllocationToJson(
'approved_price_status': instance.approvedPriceStatus, 'approved_price_status': instance.approvedPriceStatus,
'production_date': instance.productionDate, 'production_date': instance.productionDate,
'date': instance.date, 'date': instance.date,
'distribution_type': instance.distributionType,
}; };

View File

@@ -4,7 +4,7 @@ part 'hatching_models.freezed.dart';
part 'hatching_models.g.dart'; part 'hatching_models.g.dart';
@freezed @freezed
abstract class HatchingModel with _$HatchingModel { abstract class HatchingModel with _$HatchingModel{
const factory HatchingModel({ const factory HatchingModel({
int? id, int? id,
Poultry? poultry, Poultry? poultry,
@@ -94,11 +94,6 @@ abstract class HatchingModel with _$HatchingModel {
String? outputArchiver, String? outputArchiver,
num? barDifferenceRequestWeight, num? barDifferenceRequestWeight,
num? barDifferenceRequestQuantity, num? barDifferenceRequestQuantity,
num? totalDiseaseLosses,
num? totalFlockDestruction,
num? totalNormalFlockLosses,
num? totalForceMajeureLosses,
num? totalFireLosses,
String? healthCertificate, String? healthCertificate,
num? samasatDischargePercentage, num? samasatDischargePercentage,
String? personTypeName, String? personTypeName,
@@ -112,13 +107,11 @@ abstract class HatchingModel with _$HatchingModel {
String? tenantCity, String? tenantCity,
bool? hasTenant, bool? hasTenant,
String? archiveDate, String? archiveDate,
bool? unknown,
String? createdBy, String? createdBy,
String? modifiedBy, String? modifiedBy,
}) = _HatchingModel; }) = _HatchingModel;
factory HatchingModel.fromJson(Map<String, dynamic> json) => factory HatchingModel.fromJson(Map<String, dynamic> json) => _$HatchingModelFromJson(json);
_$HatchingModelFromJson(json);
} }
@freezed @freezed
@@ -187,23 +180,24 @@ abstract class Poultry with _$Poultry {
num? realKillingLiveWeight, num? realKillingLiveWeight,
num? realKillingCarcassesWeight, num? realKillingCarcassesWeight,
num? realKillingLossWeightPercent, num? realKillingLossWeightPercent,
String? interestLicenseId, int? interestLicenseId,
bool? orderLimit, bool? orderLimit,
int? owner, int? owner,
int? userBankInfo, int? userBankInfo,
int? wallet, int? wallet,
}) = _Poultry; }) = _Poultry;
factory Poultry.fromJson(Map<String, dynamic> json) => factory Poultry.fromJson(Map<String, dynamic> json) => _$PoultryFromJson(json);
_$PoultryFromJson(json);
} }
@freezed @freezed
abstract class PoultryUser with _$PoultryUser { 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) => factory PoultryUser.fromJson(Map<String, dynamic> json) => _$PoultryUserFromJson(json);
_$PoultryUserFromJson(json);
} }
@freezed @freezed
@@ -215,24 +209,27 @@ abstract class PoultryAddress with _$PoultryAddress {
String? postalCode, String? postalCode,
}) = _PoultryAddress; }) = _PoultryAddress;
factory PoultryAddress.fromJson(Map<String, dynamic> json) => factory PoultryAddress.fromJson(Map<String, dynamic> json) => _$PoultryAddressFromJson(json);
_$PoultryAddressFromJson(json);
} }
@freezed @freezed
abstract class ProvinceRef with _$ProvinceRef { 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) => factory ProvinceRef.fromJson(Map<String, dynamic> json) => _$ProvinceRefFromJson(json);
_$ProvinceRefFromJson(json);
} }
@freezed @freezed
abstract class CityRef with _$CityRef { 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) => factory CityRef.fromJson(Map<String, dynamic> json) => _$CityRefFromJson(json);
_$CityRefFromJson(json);
} }
@freezed @freezed
@@ -250,8 +247,7 @@ abstract class ChainCompany with _$ChainCompany {
num? wallet, num? wallet,
}) = _ChainCompany; }) = _ChainCompany;
factory ChainCompany.fromJson(Map<String, dynamic> json) => factory ChainCompany.fromJson(Map<String, dynamic> json) => _$ChainCompanyFromJson(json);
_$ChainCompanyFromJson(json);
} }
@freezed @freezed
@@ -293,8 +289,7 @@ abstract class ChainUser with _$ChainUser {
String? unitAddress, String? unitAddress,
}) = _ChainUser; }) = _ChainUser;
factory ChainUser.fromJson(Map<String, dynamic> json) => factory ChainUser.fromJson(Map<String, dynamic> json) => _$ChainUserFromJson(json);
_$ChainUserFromJson(json);
} }
@freezed @freezed
@@ -311,26 +306,27 @@ abstract class ChainUserState with _$ChainUserState {
String? nationalCode, String? nationalCode,
}) = _ChainUserState; }) = _ChainUserState;
factory ChainUserState.fromJson(Map<String, dynamic> json) => factory ChainUserState.fromJson(Map<String, dynamic> json) => _$ChainUserStateFromJson(json);
_$ChainUserStateFromJson(json);
} }
@freezed @freezed
abstract class VetFarm with _$VetFarm { abstract class VetFarm with _$VetFarm {
const factory VetFarm({String? vetFarmFullName, String? vetFarmMobile}) = const factory VetFarm({
_VetFarm; String? vetFarmFullName,
String? vetFarmMobile,
}) = _VetFarm;
factory VetFarm.fromJson(Map<String, dynamic> json) => factory VetFarm.fromJson(Map<String, dynamic> json) => _$VetFarmFromJson(json);
_$VetFarmFromJson(json);
} }
@freezed @freezed
abstract class ActiveKill with _$ActiveKill { abstract class ActiveKill with _$ActiveKill {
const factory ActiveKill({bool? activeKill, num? countOfRequest}) = const factory ActiveKill({
_ActiveKill; bool? activeKill,
num? countOfRequest,
}) = _ActiveKill;
factory ActiveKill.fromJson(Map<String, dynamic> json) => factory ActiveKill.fromJson(Map<String, dynamic> json) => _$ActiveKillFromJson(json);
_$ActiveKillFromJson(json);
} }
@freezed @freezed
@@ -352,8 +348,7 @@ abstract class KillingInfo with _$KillingInfo {
num? wareHouseBarsWeightLose, num? wareHouseBarsWeightLose,
}) = _KillingInfo; }) = _KillingInfo;
factory KillingInfo.fromJson(Map<String, dynamic> json) => factory KillingInfo.fromJson(Map<String, dynamic> json) => _$KillingInfoFromJson(json);
_$KillingInfoFromJson(json);
} }
@freezed @freezed
@@ -366,16 +361,17 @@ abstract class FreeGovernmentalInfo with _$FreeGovernmentalInfo {
num? leftTotalFreeCommitmentQuantity, num? leftTotalFreeCommitmentQuantity,
}) = _FreeGovernmentalInfo; }) = _FreeGovernmentalInfo;
factory FreeGovernmentalInfo.fromJson(Map<String, dynamic> json) => factory FreeGovernmentalInfo.fromJson(Map<String, dynamic> json) => _$FreeGovernmentalInfoFromJson(json);
_$FreeGovernmentalInfoFromJson(json);
} }
@freezed @freezed
abstract class ReportInfo with _$ReportInfo { 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) => factory ReportInfo.fromJson(Map<String, dynamic> json) => _$ReportInfoFromJson(json);
_$ReportInfoFromJson(json);
} }
@freezed @freezed
@@ -386,17 +382,18 @@ abstract class LatestHatchingChange with _$LatestHatchingChange {
String? fullName, String? fullName,
}) = _LatestHatchingChange; }) = _LatestHatchingChange;
factory LatestHatchingChange.fromJson(Map<String, dynamic> json) => factory LatestHatchingChange.fromJson(Map<String, dynamic> json) => _$LatestHatchingChangeFromJson(json);
_$LatestHatchingChangeFromJson(json);
} }
@freezed @freezed
abstract class Registrar with _$Registrar { abstract class Registrar with _$Registrar {
const factory Registrar({String? date, String? role, String? fullname}) = const factory Registrar({
_Registrar; String? date,
String? role,
String? fullname,
}) = _Registrar;
factory Registrar.fromJson(Map<String, dynamic> json) => factory Registrar.fromJson(Map<String, dynamic> json) => _$RegistrarFromJson(json);
_$RegistrarFromJson(json);
} }
@freezed @freezed
@@ -408,8 +405,7 @@ abstract class LastChange with _$LastChange {
String? fullName, String? fullName,
}) = _LastChange; }) = _LastChange;
factory LastChange.fromJson(Map<String, dynamic> json) => factory LastChange.fromJson(Map<String, dynamic> json) => _$LastChangeFromJson(json);
_$LastChangeFromJson(json);
} }
@freezed @freezed
@@ -420,6 +416,6 @@ abstract class BreedItem with _$BreedItem {
num? remainQuantity, num? remainQuantity,
}) = _BreedItem; }) = _BreedItem;
factory BreedItem.fromJson(Map<String, dynamic> json) => factory BreedItem.fromJson(Map<String, dynamic> json) => _$BreedItemFromJson(json);
_$BreedItemFromJson(json);
} }

View File

@@ -126,11 +126,6 @@ _HatchingModel _$HatchingModelFromJson(
outputArchiver: json['output_archiver'] as String?, outputArchiver: json['output_archiver'] as String?,
barDifferenceRequestWeight: json['bar_difference_request_weight'] as num?, barDifferenceRequestWeight: json['bar_difference_request_weight'] as num?,
barDifferenceRequestQuantity: json['bar_difference_request_quantity'] 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?, healthCertificate: json['health_certificate'] as String?,
samasatDischargePercentage: json['samasat_discharge_percentage'] as num?, samasatDischargePercentage: json['samasat_discharge_percentage'] as num?,
personTypeName: json['person_type_name'] as String?, personTypeName: json['person_type_name'] as String?,
@@ -144,7 +139,6 @@ _HatchingModel _$HatchingModelFromJson(
tenantCity: json['tenant_city'] as String?, tenantCity: json['tenant_city'] as String?,
hasTenant: json['has_tenant'] as bool?, hasTenant: json['has_tenant'] as bool?,
archiveDate: json['archive_date'] as String?, archiveDate: json['archive_date'] as String?,
unknown: json['unknown'] as bool?,
createdBy: json['created_by'] as String?, createdBy: json['created_by'] as String?,
modifiedBy: json['modified_by'] as String?, modifiedBy: json['modified_by'] as String?,
); );
@@ -239,11 +233,6 @@ Map<String, dynamic> _$HatchingModelToJson(_HatchingModel instance) =>
'output_archiver': instance.outputArchiver, 'output_archiver': instance.outputArchiver,
'bar_difference_request_weight': instance.barDifferenceRequestWeight, 'bar_difference_request_weight': instance.barDifferenceRequestWeight,
'bar_difference_request_quantity': instance.barDifferenceRequestQuantity, '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, 'health_certificate': instance.healthCertificate,
'samasat_discharge_percentage': instance.samasatDischargePercentage, 'samasat_discharge_percentage': instance.samasatDischargePercentage,
'person_type_name': instance.personTypeName, 'person_type_name': instance.personTypeName,
@@ -257,7 +246,6 @@ Map<String, dynamic> _$HatchingModelToJson(_HatchingModel instance) =>
'tenant_city': instance.tenantCity, 'tenant_city': instance.tenantCity,
'has_tenant': instance.hasTenant, 'has_tenant': instance.hasTenant,
'archive_date': instance.archiveDate, 'archive_date': instance.archiveDate,
'unknown': instance.unknown,
'created_by': instance.createdBy, 'created_by': instance.createdBy,
'modified_by': instance.modifiedBy, 'modified_by': instance.modifiedBy,
}; };
@@ -331,7 +319,7 @@ _Poultry _$PoultryFromJson(Map<String, dynamic> json) => _Poultry(
realKillingCarcassesWeight: json['real_killing_carcasses_weight'] as num?, realKillingCarcassesWeight: json['real_killing_carcasses_weight'] as num?,
realKillingLossWeightPercent: realKillingLossWeightPercent:
json['real_killing_loss_weight_percent'] as num?, 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?, orderLimit: json['order_limit'] as bool?,
owner: (json['owner'] as num?)?.toInt(), owner: (json['owner'] as num?)?.toInt(),
userBankInfo: (json['user_bank_info'] 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