사용자가 각 ProductType 개체에 "ProductTypeProperties"목록을 집계해야하며 각 ProductTypeProperty 개체에 "ProductType"개체가 있어야하는 "ProductType"개체를 만들 수 있어야하는 도메인이 있습니다. 집계 된 "ProductTypePropertyValues"목록도메인 모델링 도움말 : Product & ProductType & ProductyTypeProperties 및 ProductyTypePropertyValues
사용자는 "Product"개체를 만들고 거의 ProductTypes와 연결할 수 없습니다.
사용자가 Product를 몇 가지 ProductTypes와 연결할 때 사용자는 Product 개체에 대한 ProductTypeProperties 값을 지정할 수 있습니다. 나는 그런를 설계하는 방법을 잘 모르겠어요
을 "문자열/정수/소수점 입력"을 "다중 선택"및 "한 선택"
ProductTypeProperties처럼, 다른 선택 모드에 속하는 값을 가질 수있다 도메인 개체 모델. 특히 Product 객체의 ProductType 속성 값을 Product 객체에 적용하는 방법
저는 현재 SQL/Document/Object/Graph 데이터베이스를 자유롭게 선택할 수 있으므로 객체 도메인 모델에 대해서만이 시점에서 지속성에 대해 신경 쓰지 않습니다.
는 객체 구조는 이제 다음과 같습니다
이ProductType
List<ProductTypeProperty>
List<ProductTypePropertyValue>
Product
List<ProductType>
내가 지금 사용하는 C#을 클래스 정의는 다음과 같습니다
그것은 객체의 클래스/객체 구조를 적용하려고처럼 보인다public class Product {
public string Name { get; set; }
public List<ProductType> AssociatedProductTypes { get; set; }
// how to apply ProductType's property values to a Product object?
}
public class ProductType {
public string Name { get; set; }
public List<ProductTypeProperty> AggregatedProperties { get; set; }
}
public class ProductTypeProperty {
public string Name { get; set; }
public List<ProductTypePropertyValue> AggregatedAvailableValues { get; set; }
}
public class ProductTypePropertyValue {
public string Name { get; set; }
}
"ProductType"은 "클래스"이고 "Product"는 인스턴스 "ProductTypes"및 "Inherit"속성이 될 수있는 "개체"이며 연결된 각 제품 유형에서 사용 가능한 값입니다.
저는 이처럼 객체 모델을 사용하지 않으므로 올바르게 수행하는 방법이 매우 흥미 롭습니다. 아이디어와 제안을 보내 주셔서 감사합니다.
찾고있는 구조 (여러 제품 유형, 여러 속성이있는 제품 유형, 가능한 여러 값이있는 제품)를 올바르게 반영한 개체 모델이 이미있는 것으로 보입니다. 이미 모델링했다면, 그 질문은 무엇입니까? – edutesoy