30 lines
746 B
TypeScript
30 lines
746 B
TypeScript
import Prisma, { PrismaClient } from "../generated/prisma";
|
|
|
|
const client = new PrismaClient();
|
|
|
|
async function createManyFeeds() {
|
|
const records: any = { data: [] };
|
|
|
|
for (let i = 0; i < 35; i++) {
|
|
records.data.push(<Prisma.Prisma.FeedCreateInput>{
|
|
name: `News Network ${i}`,
|
|
url: `https://news-network-${i}.com/rss`,
|
|
guild_id: "1204426362794811453",
|
|
active: true
|
|
});
|
|
}
|
|
|
|
await client.feed.createMany(records);
|
|
}
|
|
|
|
async function main() {
|
|
await createManyFeeds();
|
|
}
|
|
|
|
main()
|
|
.then(async () => { await client.$disconnect() })
|
|
.catch(async (error: unknown) => {
|
|
console.log(error);
|
|
await client.$disconnect();
|
|
process.exit(1);
|
|
}); |