Про ПП помню, механизм один
Templates: [{
TemplateId: Guid,
TemplateTitle: string,
SubscriptionsGroups: [{
Type: GroupType,
Subscriptions: [Subscription]
}]
}]
GroupType: Choose | Required | Optional
+ customizationsSubscription: {
SubscriptionId: Guid,
SubscriptionTitle: string,
ServicesGroups: [{
Type: GroupType,
Services: [Service]
}]
}
GroupType: Choose | Required | Optional
+ customizationsService: {
ServiceId: Guid,
ServiceTitle: string,
ResourcesGroups: [{
Type: GroupType,
Resources: [Resource]
}]
}
GroupType: Choose | Required | Optional
+ customizationsResource: {
ResourceId: Guid,
ResourceTitle: string,
Price: decimal
}Resource: {
ResourceId: Guid,
ResourceTitle: string,
Price: decimal
SubResourceGroups: [{
Type: GroupType,
Resources: [Resource]
}]
}
GroupType: Choose | Required | Optional
+ customizations// back → front
Templates: [Guid1, Guid2]
TemplatesModels: {
Guid1: {},
Guid2: {}
}
SubscriptionsGroups: {
Guid3: {}
}
Subscriptions: {
Guid4: {}
},
ServicesGroups: {
Guid5: {}
},
Services: {
Guid6: {}
},
ResourcesGroups: {
Guid7: {}
},
Resources: {
Guid8: {}
}// front → back1. Возвращать ту же модель
2. Схлапывать вложенность
3. Собирать минимальную