Full generation, file type cleanup

This commit is contained in:
Christoph Hagen
2024-12-25 18:06:05 +01:00
parent 41887a1401
commit 1e4682dad1
56 changed files with 1577 additions and 1103 deletions

View File

@ -1,11 +1,6 @@
import Foundation
final class Post: ObservableObject {
unowned let content: Content
@Published
var id: String
final class Post: Item {
@Published
var isDraft: Bool
@ -45,8 +40,6 @@ final class Post: ObservableObject {
german: LocalizedPost,
english: LocalizedPost,
linkedPage: Page? = nil) {
self.content = content
self.id = id
self.isDraft = isDraft
self.createdDate = createdDate
self.startDate = startDate
@ -56,6 +49,7 @@ final class Post: ObservableObject {
self.german = german
self.english = english
self.linkedPage = linkedPage
super.init(content: content, id: id)
}
func localized(in language: ContentLanguage) -> LocalizedPost {
@ -82,24 +76,6 @@ final class Post: ObservableObject {
}
}
extension Post: Identifiable {
}
extension Post: Equatable {
static func == (lhs: Post, rhs: Post) -> Bool {
lhs.id == rhs.id
}
}
extension Post: Hashable {
func hash(into hasher: inout Hasher) {
hasher.combine(id)
}
}
extension Post: DateItem {
}