feat : chicken root page , inventory , sale in province

This commit is contained in:
MrM
2025-06-05 23:26:44 +03:30
parent 5849466e3b
commit 1cfcf9fa8f
68 changed files with 16615 additions and 126 deletions

View File

@@ -0,0 +1,56 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'inventory_model.freezed.dart';
part 'inventory_model.g.dart';
@freezed
abstract class InventoryModel with _$InventoryModel {
const factory InventoryModel({
int? id,
String? key,
String? createDate,
String? modifyDate,
bool? trash,
String? name,
int? provinceGovernmentalCarcassesQuantity,
int? provinceGovernmentalCarcassesWeight,
int? provinceFreeCarcassesQuantity,
int? provinceFreeCarcassesWeight,
int? receiveGovernmentalCarcassesQuantity,
int? receiveGovernmentalCarcassesWeight,
int? receiveFreeCarcassesQuantity,
int? receiveFreeCarcassesWeight,
int? freeBuyingCarcassesQuantity,
int? freeBuyingCarcassesWeight,
int? totalGovernmentalCarcassesQuantity,
int? totalGovernmentalCarcassesWeight,
int? totalFreeBarsCarcassesQuantity,
int? totalFreeBarsCarcassesWeight,
double? weightAverage,
int? totalCarcassesQuantity,
int? totalCarcassesWeight,
int? freezingQuantity,
int? freezingWeight,
int? lossWeight,
int? outProvinceAllocatedQuantity,
int? outProvinceAllocatedWeight,
int? provinceAllocatedQuantity,
int? provinceAllocatedWeight,
int? realAllocatedQuantity,
int? realAllocatedWeight,
int? coldHouseAllocatedWeight,
int? posAllocatedWeight,
int? segmentationWeight,
int? totalRemainQuantity,
int? totalRemainWeight,
int? freePrice,
int? approvedPrice,
bool? approvedPriceStatus,
int? parentProduct,
int? killHouse,
int? guild,
}) = _InventoryModel; // Changed to _InventoryModel
factory InventoryModel.fromJson(Map<String, dynamic> json) =>
_$InventoryModelFromJson(json);
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,127 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'inventory_model.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_InventoryModel _$InventoryModelFromJson(
Map<String, dynamic> json,
) => _InventoryModel(
id: (json['id'] as num?)?.toInt(),
key: json['key'] as String?,
createDate: json['create_date'] as String?,
modifyDate: json['modify_date'] as String?,
trash: json['trash'] as bool?,
name: json['name'] as String?,
provinceGovernmentalCarcassesQuantity:
(json['province_governmental_carcasses_quantity'] as num?)?.toInt(),
provinceGovernmentalCarcassesWeight:
(json['province_governmental_carcasses_weight'] as num?)?.toInt(),
provinceFreeCarcassesQuantity:
(json['province_free_carcasses_quantity'] as num?)?.toInt(),
provinceFreeCarcassesWeight: (json['province_free_carcasses_weight'] as num?)
?.toInt(),
receiveGovernmentalCarcassesQuantity:
(json['receive_governmental_carcasses_quantity'] as num?)?.toInt(),
receiveGovernmentalCarcassesWeight:
(json['receive_governmental_carcasses_weight'] as num?)?.toInt(),
receiveFreeCarcassesQuantity:
(json['receive_free_carcasses_quantity'] as num?)?.toInt(),
receiveFreeCarcassesWeight: (json['receive_free_carcasses_weight'] as num?)
?.toInt(),
freeBuyingCarcassesQuantity: (json['free_buying_carcasses_quantity'] as num?)
?.toInt(),
freeBuyingCarcassesWeight: (json['free_buying_carcasses_weight'] as num?)
?.toInt(),
totalGovernmentalCarcassesQuantity:
(json['total_governmental_carcasses_quantity'] as num?)?.toInt(),
totalGovernmentalCarcassesWeight:
(json['total_governmental_carcasses_weight'] as num?)?.toInt(),
totalFreeBarsCarcassesQuantity:
(json['total_free_bars_carcasses_quantity'] as num?)?.toInt(),
totalFreeBarsCarcassesWeight:
(json['total_free_bars_carcasses_weight'] as num?)?.toInt(),
weightAverage: (json['weight_average'] as num?)?.toDouble(),
totalCarcassesQuantity: (json['total_carcasses_quantity'] as num?)?.toInt(),
totalCarcassesWeight: (json['total_carcasses_weight'] as num?)?.toInt(),
freezingQuantity: (json['freezing_quantity'] as num?)?.toInt(),
freezingWeight: (json['freezing_weight'] as num?)?.toInt(),
lossWeight: (json['loss_weight'] as num?)?.toInt(),
outProvinceAllocatedQuantity:
(json['out_province_allocated_quantity'] as num?)?.toInt(),
outProvinceAllocatedWeight: (json['out_province_allocated_weight'] as num?)
?.toInt(),
provinceAllocatedQuantity: (json['province_allocated_quantity'] as num?)
?.toInt(),
provinceAllocatedWeight: (json['province_allocated_weight'] as num?)?.toInt(),
realAllocatedQuantity: (json['real_allocated_quantity'] as num?)?.toInt(),
realAllocatedWeight: (json['real_allocated_weight'] as num?)?.toInt(),
coldHouseAllocatedWeight: (json['cold_house_allocated_weight'] as num?)
?.toInt(),
posAllocatedWeight: (json['pos_allocated_weight'] as num?)?.toInt(),
segmentationWeight: (json['segmentation_weight'] as num?)?.toInt(),
totalRemainQuantity: (json['total_remain_quantity'] as num?)?.toInt(),
totalRemainWeight: (json['total_remain_weight'] as num?)?.toInt(),
freePrice: (json['free_price'] as num?)?.toInt(),
approvedPrice: (json['approved_price'] as num?)?.toInt(),
approvedPriceStatus: json['approved_price_status'] as bool?,
parentProduct: (json['parent_product'] as num?)?.toInt(),
killHouse: (json['kill_house'] as num?)?.toInt(),
guild: (json['guild'] as num?)?.toInt(),
);
Map<String, dynamic> _$InventoryModelToJson(
_InventoryModel instance,
) => <String, dynamic>{
'id': instance.id,
'key': instance.key,
'create_date': instance.createDate,
'modify_date': instance.modifyDate,
'trash': instance.trash,
'name': instance.name,
'province_governmental_carcasses_quantity':
instance.provinceGovernmentalCarcassesQuantity,
'province_governmental_carcasses_weight':
instance.provinceGovernmentalCarcassesWeight,
'province_free_carcasses_quantity': instance.provinceFreeCarcassesQuantity,
'province_free_carcasses_weight': instance.provinceFreeCarcassesWeight,
'receive_governmental_carcasses_quantity':
instance.receiveGovernmentalCarcassesQuantity,
'receive_governmental_carcasses_weight':
instance.receiveGovernmentalCarcassesWeight,
'receive_free_carcasses_quantity': instance.receiveFreeCarcassesQuantity,
'receive_free_carcasses_weight': instance.receiveFreeCarcassesWeight,
'free_buying_carcasses_quantity': instance.freeBuyingCarcassesQuantity,
'free_buying_carcasses_weight': instance.freeBuyingCarcassesWeight,
'total_governmental_carcasses_quantity':
instance.totalGovernmentalCarcassesQuantity,
'total_governmental_carcasses_weight':
instance.totalGovernmentalCarcassesWeight,
'total_free_bars_carcasses_quantity': instance.totalFreeBarsCarcassesQuantity,
'total_free_bars_carcasses_weight': instance.totalFreeBarsCarcassesWeight,
'weight_average': instance.weightAverage,
'total_carcasses_quantity': instance.totalCarcassesQuantity,
'total_carcasses_weight': instance.totalCarcassesWeight,
'freezing_quantity': instance.freezingQuantity,
'freezing_weight': instance.freezingWeight,
'loss_weight': instance.lossWeight,
'out_province_allocated_quantity': instance.outProvinceAllocatedQuantity,
'out_province_allocated_weight': instance.outProvinceAllocatedWeight,
'province_allocated_quantity': instance.provinceAllocatedQuantity,
'province_allocated_weight': instance.provinceAllocatedWeight,
'real_allocated_quantity': instance.realAllocatedQuantity,
'real_allocated_weight': instance.realAllocatedWeight,
'cold_house_allocated_weight': instance.coldHouseAllocatedWeight,
'pos_allocated_weight': instance.posAllocatedWeight,
'segmentation_weight': instance.segmentationWeight,
'total_remain_quantity': instance.totalRemainQuantity,
'total_remain_weight': instance.totalRemainWeight,
'free_price': instance.freePrice,
'approved_price': instance.approvedPrice,
'approved_price_status': instance.approvedPriceStatus,
'parent_product': instance.parentProduct,
'kill_house': instance.killHouse,
'guild': instance.guild,
};