mirror of
https://github.com/Kevsl/crypto-exchange-api.git
synced 2025-07-09 14:00:12 +02:00
added token sell to bank
This commit is contained in:
parent
e04bfc0e3d
commit
77f9f59251
@ -5,6 +5,9 @@
|
|||||||
"author": "",
|
"author": "",
|
||||||
"private": true,
|
"private": true,
|
||||||
"license": "UNLICENSED",
|
"license": "UNLICENSED",
|
||||||
|
"prisma": {
|
||||||
|
"seed": "ts-node ./prisma/seed.ts"
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "nest build",
|
"build": "nest build",
|
||||||
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
|
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
|
||||||
|
25
prisma/seed.ts
Normal file
25
prisma/seed.ts
Normal 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);
|
||||||
|
});
|
Loading…
x
Reference in New Issue
Block a user