mirror of
https://github.com/metabolist/metatext.git
synced 2024-11-10 10:39:30 +00:00
21 lines
554 B
Swift
21 lines
554 B
Swift
// Copyright © 2020 Metabolist. All rights reserved.
|
|
|
|
import Foundation
|
|
import GRDB
|
|
import Mastodon
|
|
|
|
struct StatusDescendantJoin: ContentDatabaseRecord {
|
|
let parentId: Status.Id
|
|
let statusId: Status.Id
|
|
let order: Int
|
|
}
|
|
|
|
extension StatusDescendantJoin {
|
|
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]))
|
|
}
|