reglas: plato fijo por dia y comida (ej. tortilla los viernes de cena)
- Dish.fixedDayOfWeek/fixedMealType (opcionales, aditivos para CloudKit) - Toggle + pickers de dia/comida en el formulario de plato - AutocompleteEngine: pre-pasada que asigna los platos fijos a su hueco antes del bucle MRV, de modo que cuentan para el resto de reglas - Evento analytics dish_fixed_slot_set; strings en 6 idiomas Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013H6bXqGX1ygwib1Dm3n3UG
This commit is contained in:
@@ -20,6 +20,12 @@ final class Dish {
|
||||
/// CloudKit-friendly.
|
||||
@Attribute(.externalStorage) var photoData: Data?
|
||||
|
||||
/// Fixed-slot rule ("tortilla every Friday dinner"): when both are set,
|
||||
/// autocomplete pins this dish to that weekday+meal before filling the
|
||||
/// rest of the week. 0=Monday … 6=Sunday, matching `MealSlot.dayOfWeek`.
|
||||
var fixedDayOfWeek: Int?
|
||||
var fixedMealType: String?
|
||||
|
||||
init(
|
||||
id: UUID = UUID(),
|
||||
name: String,
|
||||
@@ -28,7 +34,9 @@ final class Dish {
|
||||
createdAt: Date = Date(),
|
||||
isPriority: Bool = false,
|
||||
ingredients: [String] = [],
|
||||
photoData: Data? = nil
|
||||
photoData: Data? = nil,
|
||||
fixedDayOfWeek: Int? = nil,
|
||||
fixedMealType: String? = nil
|
||||
) {
|
||||
self.id = id
|
||||
self.name = name
|
||||
@@ -38,6 +46,8 @@ final class Dish {
|
||||
self.isPriority = isPriority
|
||||
self.ingredients = ingredients
|
||||
self.photoData = photoData
|
||||
self.fixedDayOfWeek = fixedDayOfWeek
|
||||
self.fixedMealType = fixedMealType
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user