47 lines
1.0 KiB
Dart
47 lines
1.0 KiB
Dart
import '/core/api/models/requests/stock_out_request_dto.dart';
|
|
import '/features/stock/domain/models/base_wms_request.dart';
|
|
|
|
class StockOutRequest extends BaseWmsRequest {
|
|
final int outType;
|
|
final String? goodsId;
|
|
final String vehicleId;
|
|
final int needNum;
|
|
final String destination;
|
|
final String? reason;
|
|
|
|
StockOutRequest({
|
|
required this.outType,
|
|
this.goodsId,
|
|
required this.vehicleId,
|
|
required this.needNum,
|
|
required this.destination,
|
|
this.reason,
|
|
required super.standId,
|
|
});
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return {
|
|
"outType": outType,
|
|
"goodsId": goodsId ?? "0",
|
|
"vehicleId": vehicleId,
|
|
"needNum": needNum,
|
|
"destination": destination,
|
|
"reason": reason ?? "empty",
|
|
"standId": standId,
|
|
};
|
|
}
|
|
|
|
StockOutRequestDto toDto() {
|
|
return StockOutRequestDto(
|
|
outType: outType,
|
|
goodsId: goodsId,
|
|
vehicleId: vehicleId,
|
|
needNum: needNum,
|
|
destination: destination,
|
|
reason: reason,
|
|
standId: standId,
|
|
);
|
|
}
|
|
}
|