Full generation, file type cleanup
This commit is contained in:
@ -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 {
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user