NetNewsWire/Frameworks/ArticlesDatabase/Constants.swift

76 lines
1.8 KiB
Swift
Raw Normal View History

2017-07-04 00:04:31 +02:00
//
// Keys.swift
// NetNewsWire
2017-07-04 00:04:31 +02:00
//
// Created by Brent Simmons on 7/3/17.
// Copyright © 2017 Ranchero Software. All rights reserved.
//
import Foundation
// MARK: - Database structure
struct DatabaseTableName {
2017-07-04 00:04:31 +02:00
static let articles = "articles"
2017-08-04 06:10:01 +02:00
static let authors = "authors"
static let authorsLookup = "authorsLookup"
2017-07-04 00:04:31 +02:00
static let statuses = "statuses"
static let attachments = "attachments"
static let attachmentsLookup = "attachmentsLookup"
2017-07-04 00:04:31 +02:00
}
struct DatabaseKey {
2017-07-04 00:04:31 +02:00
// Shared
2017-07-04 00:04:31 +02:00
static let articleID = "articleID"
static let url = "url"
static let title = "title"
// Article
static let feedID = "feedID"
static let uniqueID = "uniqueID"
static let contentHTML = "contentHTML"
static let contentText = "contentText"
static let externalURL = "externalURL"
static let summary = "summary"
static let imageURL = "imageURL"
static let bannerImageURL = "bannerImageURL"
static let datePublished = "datePublished"
static let dateModified = "dateModified"
static let authors = "authors"
static let attachments = "attachments"
2019-02-25 00:34:10 +01:00
static let searchRowID = "searchRowID"
2017-07-04 00:04:31 +02:00
// ArticleStatus
static let read = "read"
static let starred = "starred"
static let userDeleted = "userDeleted"
static let dateArrived = "dateArrived"
2017-07-11 05:54:00 +02:00
// Attachment
static let attachmentID = "attachmentID"
static let mimeType = "mimeType"
static let sizeInBytes = "sizeInBytes"
static let durationInSeconds = "durationInSeconds"
2017-07-11 05:54:00 +02:00
// Tag
static let tagName = "tagName"
// Author
2017-08-06 21:37:47 +02:00
static let authorID = "authorID"
static let name = "name"
static let avatarURL = "avatarURL"
static let emailAddress = "emailAddress"
2019-02-25 00:34:10 +01:00
// Search
static let body = "body"
static let rowID = "rowid"
2017-07-04 00:04:31 +02:00
}
struct RelationshipName {
2017-08-21 00:56:58 +02:00
static let authors = "authors"
static let attachments = "attachments"
2017-08-21 00:56:58 +02:00
}