Files
TREK/server/src/db/entities/GooglePlacePhotoMeta.entity.ts
T
2026-09-20 20:05:18 +02:00

23 lines
671 B
TypeScript

import { PrimaryKeyProp, defineEntity, p, EntityRepository } from '@mikro-orm/core';
export class GooglePlacePhotoMeta {
[PrimaryKeyProp]?: 'placeId';
placeId?: string | null;
attribution?: string | null;
fetchedAt!: number;
errorAt?: number | null;
}
export class GooglePlacePhotoMetaRepository extends EntityRepository<GooglePlacePhotoMeta> {}
export const GooglePlacePhotoMetaSchema = defineEntity({
class: GooglePlacePhotoMeta,
repository: () => GooglePlacePhotoMetaRepository,
properties: {
placeId: p.text().primary().nullable(),
attribution: p.text().nullable(),
fetchedAt: p.integer(),
errorAt: p.integer().nullable(),
},
});