mirror of
https://github.com/aditama-labs/nest-autocrud.git
synced 2025-05-04 20:39:53 +00:00
23 lines
454 B
TypeScript
23 lines
454 B
TypeScript
import { CreateProcess } from '@aditama-labs/nest-autocrud/skeleton';
|
|
import { PrismaProcess } from './prisma.process';
|
|
|
|
export class PrismaCreateProcess
|
|
extends PrismaProcess
|
|
implements CreateProcess
|
|
{
|
|
private dataInsert;
|
|
private dataResult;
|
|
|
|
setData(data) {
|
|
this.dataInsert = data;
|
|
}
|
|
|
|
async process(): Promise<any> {
|
|
this.dataResult = await this.getDelegate().create(this.dataInsert);
|
|
}
|
|
|
|
result() {
|
|
this.dataResult;
|
|
}
|
|
}
|