forked from boostcampwm-2024/iOS06-molio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: CoreData의 Playlist Entity 추가 (boostcampwm-2024#39)
- MusicKit에 Playlist라는 클래스가 이미 존재하여 MolioPlaylist로 이름을 설정했다.
- Loading branch information
Showing
5 changed files
with
56 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...cdatamodeld/Playlist.xcdatamodel/contents → ...atamodeld/MolioModel.xcdatamodel/contents
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
Molio/Source/Data/Model/DataModel/MolioPlaylist+CoreDataClass.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import Foundation | ||
import CoreData | ||
|
||
@objc(MolioPlaylist) | ||
public class MolioPlaylist: NSManagedObject { | ||
|
||
} |
21 changes: 21 additions & 0 deletions
21
Molio/Source/Data/Model/DataModel/MolioPlaylist+CoreDataProperties.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import Foundation | ||
import CoreData | ||
|
||
|
||
extension MolioPlaylist { | ||
|
||
@nonobjc public class func fetchRequest() -> NSFetchRequest<MolioPlaylist> { | ||
return NSFetchRequest<MolioPlaylist>(entityName: "MolioPlaylist") | ||
} | ||
|
||
@NSManaged public var id: UUID? | ||
@NSManaged public var name: String? | ||
@NSManaged public var filters: NSObject? | ||
@NSManaged public var createdAt: Date? | ||
@NSManaged public var musics: NSObject? | ||
|
||
} | ||
|
||
extension MolioPlaylist : Identifiable { | ||
|
||
} |
10 changes: 10 additions & 0 deletions
10
Molio/Source/Data/Model/DataModel/PlaylistModel.xcdatamodeld/Playlist.xcdatamodel/contents
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="22758" systemVersion="23C71" minimumToolsVersion="Automatic" sourceLanguage="Swift" usedWithSwiftData="YES" userDefinedModelVersionIdentifier=""> | ||
<entity name="MolioPlaylist" representedClassName="MolioPlaylist" syncable="YES" codeGenerationType="class"> | ||
<attribute name="createdAt" optional="YES" attributeType="Date" usesScalarValueType="NO"/> | ||
<attribute name="filters" optional="YES" attributeType="Transformable"/> | ||
<attribute name="id" optional="YES" attributeType="UUID" usesScalarValueType="NO"/> | ||
<attribute name="musics" optional="YES" attributeType="Transformable"/> | ||
<attribute name="name" optional="YES" attributeType="String"/> | ||
</entity> | ||
</model> |