feat: 최근 들은 콘텐츠 로컬 DB 추가
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// PersistenceController.swift
|
||||
// SodaLive
|
||||
//
|
||||
// Created by klaus on 7/28/25.
|
||||
//
|
||||
|
||||
import CoreData
|
||||
|
||||
struct PersistenceController {
|
||||
static let shared = PersistenceController()
|
||||
|
||||
let container: NSPersistentContainer
|
||||
|
||||
init() {
|
||||
container = NSPersistentContainer(name: "DataModel")
|
||||
container.loadPersistentStores { description, error in
|
||||
if let error = error {
|
||||
fatalError("Error loading Core Data stores: \(error)")
|
||||
}
|
||||
}
|
||||
container.viewContext.mergePolicy = NSMergeByPropertyObjectTrumpMergePolicy
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user