(llm-first): context budget, validation, and eval harness, orchestration general-prompt
This commit is contained in:
35
server/src/modules/price-list/price-list.service.ts
Normal file
35
server/src/modules/price-list/price-list.service.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { PrismaService } from '../../prisma/prisma.service';
|
||||
import { mapPriceList } from '../shared/record-mappers';
|
||||
|
||||
@Injectable()
|
||||
export class PriceListService {
|
||||
constructor(private readonly prisma: PrismaService) {}
|
||||
|
||||
async getRecord() {
|
||||
const [employee, part] = await Promise.all([
|
||||
this.prisma.employee.findFirst({
|
||||
where: {
|
||||
price: {
|
||||
not: null,
|
||||
},
|
||||
},
|
||||
orderBy: {
|
||||
code: 'asc',
|
||||
},
|
||||
}),
|
||||
this.prisma.part.findFirst({
|
||||
where: {
|
||||
price: {
|
||||
not: null,
|
||||
},
|
||||
},
|
||||
orderBy: {
|
||||
name: 'asc',
|
||||
},
|
||||
}),
|
||||
]);
|
||||
|
||||
return mapPriceList(employee?.price, part?.price);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user