Initial project setup - Phases 1-3 complete
This commit is contained in:
22
ProxyCore/Sources/DataLayer/Models/SSLProxyingEntry.swift
Normal file
22
ProxyCore/Sources/DataLayer/Models/SSLProxyingEntry.swift
Normal file
@@ -0,0 +1,22 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user