deliver Hongfa Laundry M1 desktop release

This commit is contained in:
manpengan
2026-04-23 16:50:24 +08:00
parent 20595a7545
commit 7deea00495
66 changed files with 19586 additions and 69 deletions

18
src/main/ipc/photos.ts Normal file
View File

@@ -0,0 +1,18 @@
import { SavePhotoSchema } from "../../shared/schemas";
import { getDb, schema } from "../db";
import { PhotoService } from "../services/photoService";
import { registerIpcHandler } from "./helpers";
export function registerPhotoIpc(): void {
registerIpcHandler("photos:save", SavePhotoSchema, (input) => {
const fileName = PhotoService.savePhoto(input.orderId, input.base64Data);
return getDb()
.insert(schema.orderPhotos)
.values({
orderId: input.orderId,
filePath: fileName,
})
.returning()
.get();
});
}