주석화 진행상황 정리하고 핵심 모듈에 한글 주석 추가
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
/// 제품(Product) 도메인 엔티티.
|
||||
class Product {
|
||||
Product({
|
||||
this.id,
|
||||
@@ -23,6 +24,7 @@ class Product {
|
||||
final DateTime? createdAt;
|
||||
final DateTime? updatedAt;
|
||||
|
||||
/// 일부 속성을 변경한 새 인스턴스를 반환한다.
|
||||
Product copyWith({
|
||||
int? id,
|
||||
String? productCode,
|
||||
@@ -50,6 +52,7 @@ class Product {
|
||||
}
|
||||
}
|
||||
|
||||
/// 제품에 연결된 공급업체 정보.
|
||||
class ProductVendor {
|
||||
ProductVendor({
|
||||
required this.id,
|
||||
@@ -62,6 +65,7 @@ class ProductVendor {
|
||||
final String vendorName;
|
||||
}
|
||||
|
||||
/// 제품의 단위(UOM) 정보.
|
||||
class ProductUom {
|
||||
ProductUom({required this.id, required this.uomName});
|
||||
|
||||
@@ -69,6 +73,7 @@ class ProductUom {
|
||||
final String uomName;
|
||||
}
|
||||
|
||||
/// 제품 생성/수정에 사용하는 입력 모델.
|
||||
class ProductInput {
|
||||
ProductInput({
|
||||
required this.productCode,
|
||||
@@ -86,6 +91,7 @@ class ProductInput {
|
||||
final bool isActive;
|
||||
final String? note;
|
||||
|
||||
/// API 요청 바디로 직렬화한다.
|
||||
Map<String, dynamic> toPayload() {
|
||||
return {
|
||||
'product_code': productCode,
|
||||
|
||||
@@ -2,7 +2,9 @@ import 'package:superport_v2/core/common/models/paginated_result.dart';
|
||||
|
||||
import '../entities/product.dart';
|
||||
|
||||
/// 제품 데이터를 다루는 도메인 저장소 인터페이스.
|
||||
abstract class ProductRepository {
|
||||
/// 제품 목록을 조회한다.
|
||||
Future<PaginatedResult<Product>> list({
|
||||
int page = 1,
|
||||
int pageSize = 20,
|
||||
@@ -12,11 +14,15 @@ abstract class ProductRepository {
|
||||
bool? isActive,
|
||||
});
|
||||
|
||||
/// 제품을 생성한다.
|
||||
Future<Product> create(ProductInput input);
|
||||
|
||||
/// 제품을 수정한다.
|
||||
Future<Product> update(int id, ProductInput input);
|
||||
|
||||
/// 제품을 삭제한다.
|
||||
Future<void> delete(int id);
|
||||
|
||||
/// 삭제된 제품을 복구한다.
|
||||
Future<Product> restore(int id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user