added token sell to bank

This commit is contained in:
Kevsl
2024-06-14 15:35:01 +02:00
parent e04bfc0e3d
commit 77f9f59251
2 changed files with 28 additions and 0 deletions

25
prisma/seed.ts Normal file
View File

@@ -0,0 +1,25 @@
import { PrismaClient } from '@prisma/client';
const prisma = new PrismaClient();
async function main() {
await this.prisma.role.create({
name: 'user',
});
await this.prisma.role.create({
name: 'admin',
});
await this.prisma.promoCode.create({
name: 'PROMO1000',
});
}
main()
.then(async () => {
await prisma.$disconnect();
})
.catch(async (e) => {
console.error(e);
await prisma.$disconnect();
process.exit(1);
});