2024-11-18 20:19:20 +01:00

48 lines
1.8 KiB
Swift

extension Post {
static var empty: Post {
.init(id: "empty",
isDraft: true,
createdDate: .now,
startDate: .now,
endDate: nil,
tags: [],
german: .init(content: "Text"),
english: .init(content: "Text"),
linkedPage: nil)
}
static var mock: Post {
Post(
id: "mock",
isDraft: false,
createdDate: .now,
startDate: .now,
endDate: nil,
tags: [.nature, .sports, .hiking],
german: .init(title: "Der Titel", content: "Sehr schöne und einsame Tour von Oberau zum Krottenkopf. Abwechslungsreich und stellenweise fordernd, aufgrund der Länge und der Höhenmeter auch anstrengend."),
english: .init(title: "The title", content: "Very nice and solitary hike from Oberau to Krottenkopf. Challenging and rewarding, due to the length and height")
)
}
static var fullMock: Post {
.init(
id: "full",
isDraft: true,
createdDate: .now,
startDate: .now.addingTimeInterval(-86400), endDate: .now,
tags: [.nature, .sports, .hiking, .mountains],
german: .init(
title: "Ein langer Titel",
content: "Sehr schöne und einsame Tour von Oberau zum Krottenkopf. Abwechslungsreich und stellenweise fordernd, aufgrund der Länge und der Höhenmeter auch anstrengend.",
images: MockImage.images),
english: .init(
title: "A longer title",
content: "Very nice and solitary hike from Oberau to Krottenkopf. Challenging and rewarding, due to the length and height.",
images: MockImage.images)
)
}
}