@@ -0,0 +1,15 @@
|
||||
//
|
||||
// Interface+CoreDataClass.swift
|
||||
//
|
||||
//
|
||||
// Created by Jeroen Leenarts on 23-05-18.
|
||||
//
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import CoreData
|
||||
|
||||
@objc(Interface)
|
||||
public class Interface: NSManagedObject {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// Interface+CoreDataProperties.swift
|
||||
//
|
||||
//
|
||||
// Created by Jeroen Leenarts on 23-05-18.
|
||||
//
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import CoreData
|
||||
|
||||
extension Interface {
|
||||
|
||||
@nonobjc public class func fetchRequest() -> NSFetchRequest<Interface> {
|
||||
return NSFetchRequest<Interface>(entityName: "Interface")
|
||||
}
|
||||
|
||||
@NSManaged public var privateKey: String?
|
||||
@NSManaged public var listenPort: Int16
|
||||
@NSManaged public var fwMark: Int32
|
||||
@NSManaged public var profile: Profile?
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// Peer+CoreDataClass.swift
|
||||
//
|
||||
//
|
||||
// Created by Jeroen Leenarts on 23-05-18.
|
||||
//
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import CoreData
|
||||
|
||||
@objc(Peer)
|
||||
public class Peer: NSManagedObject {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// Peer+CoreDataProperties.swift
|
||||
//
|
||||
//
|
||||
// Created by Jeroen Leenarts on 23-05-18.
|
||||
//
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import CoreData
|
||||
|
||||
extension Peer {
|
||||
|
||||
@nonobjc public class func fetchRequest() -> NSFetchRequest<Peer> {
|
||||
return NSFetchRequest<Peer>(entityName: "Peer")
|
||||
}
|
||||
|
||||
@NSManaged public var publicKey: String?
|
||||
@NSManaged public var presharedKey: String?
|
||||
@NSManaged public var allowedIPs: String?
|
||||
@NSManaged public var endpoint: String?
|
||||
@NSManaged public var persistentKeepalive: Int16
|
||||
@NSManaged public var profile: Profile?
|
||||
|
||||
}
|
||||
@@ -10,10 +10,32 @@
|
||||
import Foundation
|
||||
import CoreData
|
||||
|
||||
|
||||
extension Profile {
|
||||
|
||||
@nonobjc public class func fetchRequest() -> NSFetchRequest<Profile> {
|
||||
return NSFetchRequest<Profile>(entityName: "Profile")
|
||||
}
|
||||
|
||||
@NSManaged public var title: String?
|
||||
@NSManaged public var peers: NSSet?
|
||||
@NSManaged public var interface: Interface?
|
||||
|
||||
}
|
||||
|
||||
// MARK: Generated accessors for peers
|
||||
extension Profile {
|
||||
|
||||
@objc(addPeersObject:)
|
||||
@NSManaged public func addToPeers(_ value: Peer)
|
||||
|
||||
@objc(removePeersObject:)
|
||||
@NSManaged public func removeFromPeers(_ value: Peer)
|
||||
|
||||
@objc(addPeers:)
|
||||
@NSManaged public func addToPeers(_ values: NSSet)
|
||||
|
||||
@objc(removePeers:)
|
||||
@NSManaged public func removeFromPeers(_ values: NSSet)
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="14133" systemVersion="17E202" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier="">
|
||||
<entity name="Profile" representedClassName="Profile" syncable="YES"/>
|
||||
<entity name="Interface" representedClassName="Interface" syncable="YES">
|
||||
<attribute name="fwMark" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
|
||||
<attribute name="listenPort" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
|
||||
<attribute name="privateKey" attributeType="String" syncable="YES"/>
|
||||
<relationship name="profile" maxCount="1" deletionRule="Nullify" destinationEntity="Profile" inverseName="interface" inverseEntity="Profile" syncable="YES"/>
|
||||
</entity>
|
||||
<entity name="Peer" representedClassName="Peer" syncable="YES">
|
||||
<attribute name="allowedIPs" attributeType="String" syncable="YES"/>
|
||||
<attribute name="endpoint" optional="YES" attributeType="String" syncable="YES"/>
|
||||
<attribute name="persistentKeepalive" attributeType="Integer 16" minValueString="0" maxValueString="65535" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
|
||||
<attribute name="presharedKey" optional="YES" attributeType="String" syncable="YES"/>
|
||||
<attribute name="publicKey" attributeType="String" syncable="YES"/>
|
||||
<relationship name="profile" maxCount="1" deletionRule="Nullify" destinationEntity="Profile" inverseName="peers" inverseEntity="Profile" syncable="YES"/>
|
||||
</entity>
|
||||
<entity name="Profile" representedClassName="Profile" syncable="YES">
|
||||
<attribute name="title" optional="YES" attributeType="String" syncable="YES"/>
|
||||
<relationship name="interface" maxCount="1" deletionRule="Cascade" destinationEntity="Interface" inverseName="profile" inverseEntity="Interface" syncable="YES"/>
|
||||
<relationship name="peers" toMany="YES" minCount="1" deletionRule="Cascade" destinationEntity="Peer" inverseName="profile" inverseEntity="Peer" syncable="YES"/>
|
||||
</entity>
|
||||
<elements>
|
||||
<element name="Profile" positionX="-63" positionY="-18" width="128" height="45"/>
|
||||
<element name="Profile" positionX="-63" positionY="-18" width="128" height="90"/>
|
||||
<element name="Interface" positionX="-54" positionY="-9" width="128" height="105"/>
|
||||
<element name="Peer" positionX="-36" positionY="9" width="128" height="135"/>
|
||||
</elements>
|
||||
</model>
|
||||
Reference in New Issue
Block a user