마스터 고객/제품/창고 테스트 및 UI 구현
This commit is contained in:
@@ -0,0 +1,94 @@
|
||||
class Warehouse {
|
||||
Warehouse({
|
||||
this.id,
|
||||
required this.warehouseCode,
|
||||
required this.warehouseName,
|
||||
this.zipcode,
|
||||
this.addressDetail,
|
||||
this.isActive = true,
|
||||
this.isDeleted = false,
|
||||
this.note,
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
});
|
||||
|
||||
final int? id;
|
||||
final String warehouseCode;
|
||||
final String warehouseName;
|
||||
final WarehouseZipcode? zipcode;
|
||||
final String? addressDetail;
|
||||
final bool isActive;
|
||||
final bool isDeleted;
|
||||
final String? note;
|
||||
final DateTime? createdAt;
|
||||
final DateTime? updatedAt;
|
||||
|
||||
Warehouse copyWith({
|
||||
int? id,
|
||||
String? warehouseCode,
|
||||
String? warehouseName,
|
||||
WarehouseZipcode? zipcode,
|
||||
String? addressDetail,
|
||||
bool? isActive,
|
||||
bool? isDeleted,
|
||||
String? note,
|
||||
DateTime? createdAt,
|
||||
DateTime? updatedAt,
|
||||
}) {
|
||||
return Warehouse(
|
||||
id: id ?? this.id,
|
||||
warehouseCode: warehouseCode ?? this.warehouseCode,
|
||||
warehouseName: warehouseName ?? this.warehouseName,
|
||||
zipcode: zipcode ?? this.zipcode,
|
||||
addressDetail: addressDetail ?? this.addressDetail,
|
||||
isActive: isActive ?? this.isActive,
|
||||
isDeleted: isDeleted ?? this.isDeleted,
|
||||
note: note ?? this.note,
|
||||
createdAt: createdAt ?? this.createdAt,
|
||||
updatedAt: updatedAt ?? this.updatedAt,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class WarehouseZipcode {
|
||||
WarehouseZipcode({
|
||||
required this.zipcode,
|
||||
this.sido,
|
||||
this.sigungu,
|
||||
this.roadName,
|
||||
});
|
||||
|
||||
final String zipcode;
|
||||
final String? sido;
|
||||
final String? sigungu;
|
||||
final String? roadName;
|
||||
}
|
||||
|
||||
class WarehouseInput {
|
||||
WarehouseInput({
|
||||
required this.warehouseCode,
|
||||
required this.warehouseName,
|
||||
this.zipcode,
|
||||
this.addressDetail,
|
||||
this.isActive = true,
|
||||
this.note,
|
||||
});
|
||||
|
||||
final String warehouseCode;
|
||||
final String warehouseName;
|
||||
final String? zipcode;
|
||||
final String? addressDetail;
|
||||
final bool isActive;
|
||||
final String? note;
|
||||
|
||||
Map<String, dynamic> toPayload() {
|
||||
return {
|
||||
'warehouse_code': warehouseCode,
|
||||
'warehouse_name': warehouseName,
|
||||
'zipcode': zipcode,
|
||||
'address_detail': addressDetail,
|
||||
'is_active': isActive,
|
||||
'note': note,
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user