Initial project setup - Phases 1-3 complete

This commit is contained in:
Trey t
2026-04-06 11:28:40 -05:00
commit c77e506db5
293 changed files with 14233 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
import Foundation
import GRDB
public struct BreakpointRule: Codable, FetchableRecord, MutablePersistableRecord, Identifiable, Sendable {
public var id: Int64?
public var name: String?
public var urlPattern: String
public var method: String
public var interceptRequest: Bool
public var interceptResponse: Bool
public var isEnabled: Bool
public var createdAt: Double
public static let databaseTableName = "breakpoint_rules"
public mutating func didInsert(_ inserted: InsertionSuccess) {
id = inserted.rowID
}
public init(
id: Int64? = nil,
name: String? = nil,
urlPattern: String,
method: String = "ANY",
interceptRequest: Bool = true,
interceptResponse: Bool = true,
isEnabled: Bool = true,
createdAt: Double = Date().timeIntervalSince1970
) {
self.id = id
self.name = name
self.urlPattern = urlPattern
self.method = method
self.interceptRequest = interceptRequest
self.interceptResponse = interceptResponse
self.isEnabled = isEnabled
self.createdAt = createdAt
}
}