mirror of
https://github.com/metabolist/metatext.git
synced 2024-06-02 05:42:42 +00:00
22 lines
550 B
Swift
22 lines
550 B
Swift
// Copyright © 2020 Metabolist. All rights reserved.
|
|
|
|
import Foundation
|
|
import GRDB
|
|
import Mastodon
|
|
|
|
struct StatusAncestorJoin: ContentDatabaseRecord {
|
|
let parentId: Status.Id
|
|
let statusId: Status.Id
|
|
let order: Int
|
|
}
|
|
|
|
extension StatusAncestorJoin {
|
|
enum Columns {
|
|
static let parentId = Column(CodingKeys.parentId)
|
|
static let statusId = Column(CodingKeys.statusId)
|
|
static let order = Column(CodingKeys.order)
|
|
}
|
|
|
|
static let status = belongsTo(StatusRecord.self, using: ForeignKey([Columns.statusId]))
|
|
}
|