mirror of
https://github.com/metabolist/metatext.git
synced 2024-06-02 21:49:36 +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 index: Int
|
|
}
|
|
|
|
extension StatusAncestorJoin {
|
|
enum Columns {
|
|
static let parentId = Column(CodingKeys.parentId)
|
|
static let statusId = Column(CodingKeys.statusId)
|
|
static let index = Column(CodingKeys.index)
|
|
}
|
|
|
|
static let status = belongsTo(StatusRecord.self, using: ForeignKey([Columns.statusId]))
|
|
}
|