2020-02-10 17:30:11 -08:00
|
|
|
//
|
|
|
|
|
// AppID.swift
|
|
|
|
|
// AltStore
|
|
|
|
|
//
|
|
|
|
|
// Created by Riley Testut on 1/27/20.
|
|
|
|
|
// Copyright © 2020 Riley Testut. All rights reserved.
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
import Foundation
|
|
|
|
|
import CoreData
|
|
|
|
|
|
|
|
|
|
import AltSign
|
|
|
|
|
|
|
|
|
|
@objc(AppID)
|
2025-02-08 04:45:22 +05:30
|
|
|
public class AppID: BaseEntity
|
2020-02-10 17:30:11 -08:00
|
|
|
{
|
|
|
|
|
/* Properties */
|
2020-09-03 16:39:08 -07:00
|
|
|
@NSManaged public var name: String
|
|
|
|
|
@NSManaged public var identifier: String
|
|
|
|
|
@NSManaged public var bundleIdentifier: String
|
|
|
|
|
@NSManaged public var features: [ALTFeature: Any]
|
|
|
|
|
@NSManaged public var expirationDate: Date?
|
2020-02-10 17:30:11 -08:00
|
|
|
|
|
|
|
|
/* Relationships */
|
2020-09-03 16:39:08 -07:00
|
|
|
@NSManaged public private(set) var team: Team?
|
2020-02-10 17:30:11 -08:00
|
|
|
|
|
|
|
|
private override init(entity: NSEntityDescription, insertInto context: NSManagedObjectContext?)
|
|
|
|
|
{
|
|
|
|
|
super.init(entity: entity, insertInto: context)
|
|
|
|
|
}
|
|
|
|
|
|
2020-09-03 16:39:08 -07:00
|
|
|
public init(_ appID: ALTAppID, team: Team, context: NSManagedObjectContext)
|
2020-02-10 17:30:11 -08:00
|
|
|
{
|
|
|
|
|
super.init(entity: AppID.entity(), insertInto: context)
|
|
|
|
|
|
|
|
|
|
self.name = appID.name
|
|
|
|
|
self.identifier = appID.identifier
|
|
|
|
|
self.bundleIdentifier = appID.bundleIdentifier
|
|
|
|
|
self.features = appID.features
|
|
|
|
|
self.expirationDate = appID.expirationDate
|
|
|
|
|
|
|
|
|
|
self.team = team
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-09-03 16:39:08 -07:00
|
|
|
public extension AppID
|
2020-02-10 17:30:11 -08:00
|
|
|
{
|
|
|
|
|
@nonobjc class func fetchRequest() -> NSFetchRequest<AppID>
|
|
|
|
|
{
|
|
|
|
|
return NSFetchRequest<AppID>(entityName: "AppID")
|
|
|
|
|
}
|
|
|
|
|
}
|