23 lines
704 B
Swift
23 lines
704 B
Swift
import Foundation
|
|
import GRDB
|
|
|
|
public struct SSLProxyingEntry: Codable, FetchableRecord, MutablePersistableRecord, Identifiable, Sendable {
|
|
public var id: Int64?
|
|
public var domainPattern: String
|
|
public var isInclude: Bool
|
|
public var createdAt: Double
|
|
|
|
public static let databaseTableName = "ssl_proxying_entries"
|
|
|
|
public mutating func didInsert(_ inserted: InsertionSuccess) {
|
|
id = inserted.rowID
|
|
}
|
|
|
|
public init(id: Int64? = nil, domainPattern: String, isInclude: Bool, createdAt: Double = Date().timeIntervalSince1970) {
|
|
self.id = id
|
|
self.domainPattern = domainPattern
|
|
self.isInclude = isInclude
|
|
self.createdAt = createdAt
|
|
}
|
|
}
|