81 lines
1.8 KiB
TypeScript
81 lines
1.8 KiB
TypeScript
import { Aufnahme, BedarfsausweisGewerbe, BedarfsausweisWohnen, Bild, GEGNachweisGewerbe, GEGNachweisWohnen, Objekt, prisma, Unterlage, VerbrauchsausweisGewerbe, VerbrauchsausweisWohnen } from "./prisma.js";
|
|
|
|
export async function getVerbrauchsausweisWohnen(id: string): Promise<VerbrauchsausweisWohnen | null> {
|
|
return await prisma.verbrauchsausweisWohnen.findUnique({
|
|
where: {
|
|
id
|
|
}
|
|
})
|
|
}
|
|
|
|
export async function getVerbrauchsausweisGewerbe(id: string): Promise<VerbrauchsausweisGewerbe | null> {
|
|
return await prisma.verbrauchsausweisGewerbe.findUnique({
|
|
where: {
|
|
id
|
|
}
|
|
})
|
|
}
|
|
|
|
export async function getBedarfsausweisWohnen(id: string): Promise<BedarfsausweisWohnen | null> {
|
|
return await prisma.bedarfsausweisWohnen.findUnique({
|
|
where: {
|
|
id
|
|
}
|
|
})
|
|
}
|
|
|
|
export async function getBedarfsausweisGewerbe(id: string): Promise<BedarfsausweisGewerbe | null> {
|
|
return await prisma.bedarfsausweisGewerbe.findUnique({
|
|
where: {
|
|
id
|
|
}
|
|
})
|
|
}
|
|
|
|
export async function getGEGNachweisWohnen(id: string): Promise<GEGNachweisWohnen | null> {
|
|
return await prisma.gEGNachweisWohnen.findUnique({
|
|
where: {
|
|
id
|
|
}
|
|
})
|
|
}
|
|
|
|
export async function getGEGNachweisGewerbe(id: string): Promise<GEGNachweisGewerbe | null> {
|
|
return await prisma.gEGNachweisGewerbe.findUnique({
|
|
where: {
|
|
id
|
|
}
|
|
})
|
|
}
|
|
|
|
export async function getAufnahme(id: string): Promise<Aufnahme | null> {
|
|
return await prisma.aufnahme.findUnique({
|
|
where: {
|
|
id
|
|
}
|
|
})
|
|
}
|
|
|
|
export async function getObjekt(id: string): Promise<Objekt | null> {
|
|
return await prisma.objekt.findUnique({
|
|
where: {
|
|
id
|
|
}
|
|
})
|
|
}
|
|
|
|
export async function getBilder(aufnahme_id: string): Promise<Bild[]> {
|
|
return await prisma.bild.findMany({
|
|
where: {
|
|
aufnahme_id
|
|
}
|
|
})
|
|
}
|
|
|
|
export async function getUnterlagen(aufnahme_id: string): Promise<Unterlage[]> {
|
|
return await prisma.unterlage.findMany({
|
|
where: {
|
|
aufnahme_id
|
|
}
|
|
})
|
|
} |