mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-14 17:23:25 +01:00
[AltStore] Revises authentication flow with better UI
This commit is contained in:
52
AltStore/Model/Team.swift
Normal file
52
AltStore/Model/Team.swift
Normal file
@@ -0,0 +1,52 @@
|
||||
//
|
||||
// Team.swift
|
||||
// AltStore
|
||||
//
|
||||
// Created by Riley Testut on 5/31/19.
|
||||
// Copyright © 2019 Riley Testut. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import CoreData
|
||||
|
||||
import AltSign
|
||||
|
||||
@objc(Team)
|
||||
class Team: NSManagedObject
|
||||
{
|
||||
/* Properties */
|
||||
@NSManaged var name: String
|
||||
@NSManaged var identifier: String
|
||||
@NSManaged var type: ALTTeamType
|
||||
|
||||
/* Relationships */
|
||||
@NSManaged private(set) var account: Account!
|
||||
|
||||
var altTeam: ALTTeam?
|
||||
|
||||
private override init(entity: NSEntityDescription, insertInto context: NSManagedObjectContext?)
|
||||
{
|
||||
super.init(entity: entity, insertInto: context)
|
||||
}
|
||||
|
||||
init(_ team: ALTTeam, account: Account, context: NSManagedObjectContext)
|
||||
{
|
||||
super.init(entity: Team.entity(), insertInto: context)
|
||||
|
||||
self.altTeam = team
|
||||
|
||||
self.name = team.name
|
||||
self.identifier = team.identifier
|
||||
self.type = team.type
|
||||
|
||||
self.account = account
|
||||
}
|
||||
}
|
||||
|
||||
extension Team
|
||||
{
|
||||
@nonobjc class func fetchRequest() -> NSFetchRequest<Team>
|
||||
{
|
||||
return NSFetchRequest<Team>(entityName: "Team")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user