mirror of
https://github.com/otaviocc/Triton.git
synced 2026-01-29 19:54:27 +00:00
31 lines
688 B
Swift
31 lines
688 B
Swift
#if DEBUG
|
|
|
|
import PastebinPersistenceService
|
|
import SwiftData
|
|
|
|
extension Paste {
|
|
|
|
// MARK: - Public
|
|
|
|
@MainActor
|
|
static func makePaste(
|
|
count: Int,
|
|
in container: ModelContainer
|
|
) {
|
|
for index in 0..<count {
|
|
let paste = Paste(
|
|
title: "paste\(index).md",
|
|
content: "hello, world!",
|
|
timestamp: 123_123_123,
|
|
address: "otaviocc",
|
|
listed: index % 2 == 0
|
|
)
|
|
|
|
container.mainContext.insert(
|
|
paste
|
|
)
|
|
}
|
|
}
|
|
}
|
|
|
|
#endif
|