번호 자동 부여 대응 및 API 공통 처리 보강
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
/// 재고 트랜잭션 생성 입력 모델.
|
||||
class StockTransactionCreateInput {
|
||||
StockTransactionCreateInput({
|
||||
this.transactionNo,
|
||||
required this.transactionTypeId,
|
||||
required this.transactionStatusId,
|
||||
required this.warehouseId,
|
||||
@@ -14,7 +13,6 @@ class StockTransactionCreateInput {
|
||||
this.approval,
|
||||
});
|
||||
|
||||
final String? transactionNo;
|
||||
final int transactionTypeId;
|
||||
final int transactionStatusId;
|
||||
final int warehouseId;
|
||||
@@ -29,8 +27,6 @@ class StockTransactionCreateInput {
|
||||
Map<String, dynamic> toPayload() {
|
||||
final sanitizedNote = note?.trim();
|
||||
return {
|
||||
if (transactionNo != null && transactionNo!.trim().isNotEmpty)
|
||||
'transaction_no': transactionNo,
|
||||
'transaction_type_id': transactionTypeId,
|
||||
'transaction_status_id': transactionStatusId,
|
||||
'warehouse_id': warehouseId,
|
||||
@@ -213,23 +209,21 @@ class StockTransactionListFilter {
|
||||
/// 재고 트랜잭션 생성 시 결재(Approval) 정보를 담는 입력 모델.
|
||||
class StockTransactionApprovalInput {
|
||||
StockTransactionApprovalInput({
|
||||
required this.approvalNo,
|
||||
required this.requestedById,
|
||||
this.approvalStatusId,
|
||||
this.note,
|
||||
});
|
||||
|
||||
final String approvalNo;
|
||||
final int requestedById;
|
||||
final int? approvalStatusId;
|
||||
final String? note;
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final trimmedNote = note?.trim();
|
||||
return {
|
||||
'approval_no': approvalNo,
|
||||
if (approvalStatusId != null) 'approval_status_id': approvalStatusId,
|
||||
'requested_by_id': requestedById,
|
||||
'note': note?.trim(),
|
||||
if (trimmedNote != null && trimmedNote.isNotEmpty) 'note': trimmedNote,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user