save
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
/// Request model for creating product warehouse (import/export)
|
||||
class CreateProductWarehouseRequest {
|
||||
final int typeId;
|
||||
final int productId;
|
||||
final int stageId;
|
||||
final int? orderId;
|
||||
final String recordDate;
|
||||
final double passedQuantityWeight;
|
||||
final int passedQuantity;
|
||||
final double issuedQuantityWeight;
|
||||
final int issuedQuantity;
|
||||
final int responsibleUserId;
|
||||
final String description;
|
||||
final String productName;
|
||||
final String productCode;
|
||||
final double stockPassedQuantityWeight;
|
||||
final int stockPassedQuantity;
|
||||
final int stockIssuedQuantity;
|
||||
final double stockIssuedQuantityWeight;
|
||||
final int receiverUserId;
|
||||
final int actionTypeId;
|
||||
final int wareHouseId;
|
||||
final int productStageId;
|
||||
final bool isConfirm;
|
||||
|
||||
CreateProductWarehouseRequest({
|
||||
required this.typeId,
|
||||
required this.productId,
|
||||
required this.stageId,
|
||||
this.orderId,
|
||||
required this.recordDate,
|
||||
required this.passedQuantityWeight,
|
||||
required this.passedQuantity,
|
||||
required this.issuedQuantityWeight,
|
||||
required this.issuedQuantity,
|
||||
required this.responsibleUserId,
|
||||
this.description = '',
|
||||
required this.productName,
|
||||
required this.productCode,
|
||||
this.stockPassedQuantityWeight = 0.0,
|
||||
this.stockPassedQuantity = 0,
|
||||
this.stockIssuedQuantity = 0,
|
||||
this.stockIssuedQuantityWeight = 0.0,
|
||||
required this.receiverUserId,
|
||||
required this.actionTypeId,
|
||||
required this.wareHouseId,
|
||||
required this.productStageId,
|
||||
this.isConfirm = true,
|
||||
});
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
return {
|
||||
'TypeId': typeId,
|
||||
'ProductId': productId,
|
||||
'StageId': stageId,
|
||||
'OrderId': orderId,
|
||||
'RecordDate': recordDate,
|
||||
'PassedQuantityWeight': passedQuantityWeight,
|
||||
'PassedQuantity': passedQuantity,
|
||||
'IssuedQuantityWeight': issuedQuantityWeight,
|
||||
'IssuedQuantity': issuedQuantity,
|
||||
'ResponsibleUserId': responsibleUserId,
|
||||
'Description': description,
|
||||
'ProductName': productName,
|
||||
'ProductCode': productCode,
|
||||
'StockPassedQuantityWeight': stockPassedQuantityWeight,
|
||||
'StockPassedQuantity': stockPassedQuantity,
|
||||
'StockIssuedQuantity': stockIssuedQuantity,
|
||||
'StockIssuedQuantityWeight': stockIssuedQuantityWeight,
|
||||
'ReceiverUserId': receiverUserId,
|
||||
'ActionTypeId': actionTypeId,
|
||||
'WareHouseId': wareHouseId,
|
||||
'ProductStageId': productStageId,
|
||||
'IsConfirm': isConfirm,
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,9 @@ class ProductStageModel extends ProductStageEntity {
|
||||
required super.passedQuantityWeight,
|
||||
required super.stageName,
|
||||
required super.createdDate,
|
||||
super.productName,
|
||||
super.productCode,
|
||||
super.stageId,
|
||||
});
|
||||
|
||||
/// Create ProductStageModel from JSON
|
||||
@@ -27,6 +30,9 @@ class ProductStageModel extends ProductStageEntity {
|
||||
passedQuantityWeight: (json['PassedQuantityWeight'] as num).toDouble(),
|
||||
stageName: json['StageName'] as String?,
|
||||
createdDate: json['CreatedDate'] as String,
|
||||
productName: json['ProductName'] as String? ?? '',
|
||||
productCode: json['ProductCode'] as String? ?? '',
|
||||
stageId: json['StageId'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -42,6 +48,9 @@ class ProductStageModel extends ProductStageEntity {
|
||||
'PassedQuantityWeight': passedQuantityWeight,
|
||||
'StageName': stageName,
|
||||
'CreatedDate': createdDate,
|
||||
'ProductName': productName,
|
||||
'ProductCode': productCode,
|
||||
'StageId': stageId,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -57,6 +66,9 @@ class ProductStageModel extends ProductStageEntity {
|
||||
passedQuantityWeight: passedQuantityWeight,
|
||||
stageName: stageName,
|
||||
createdDate: createdDate,
|
||||
productName: productName,
|
||||
productCode: productCode,
|
||||
stageId: stageId,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user