mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-24 16:03:02 +00:00
feat(ferratas): keep loaded via ferratas in a tile cache on server and device, group segments, own look and count badge
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import { EntityRepositoryType, PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core';
|
||||
import { FerrataTilesRepository } from '../repositories/FerrataTiles.repository';
|
||||
|
||||
export class FerrataTiles {
|
||||
[EntityRepositoryType]?: FerrataTilesRepository;
|
||||
[PrimaryKeyProp]?: 'tile_key';
|
||||
tile_key!: string;
|
||||
payload!: string;
|
||||
fetched_at!: number;
|
||||
}
|
||||
|
||||
export const FerrataTilesSchema = defineEntity({
|
||||
class: FerrataTiles,
|
||||
repository: () => FerrataTilesRepository,
|
||||
properties: {
|
||||
tile_key: p.text().primary(),
|
||||
payload: p.text(),
|
||||
fetched_at: p.integer(),
|
||||
},
|
||||
});
|
||||
@@ -31,6 +31,7 @@ import { DocumentConnectionsSchema } from './DocumentConnections.entity';
|
||||
import { DocumentProviderFieldsSchema } from './DocumentProviderFields.entity';
|
||||
import { DocumentProvidersSchema } from './DocumentProviders.entity';
|
||||
import { DocumentSyncItemsSchema } from './DocumentSyncItems.entity';
|
||||
import { FerrataTilesSchema } from './FerrataTiles.entity';
|
||||
import { FileLinksSchema } from './FileLinks.entity';
|
||||
import { GoogleApiUsageSchema } from './GoogleApiUsage.entity';
|
||||
import { GooglePlacePhotoMetaSchema } from './GooglePlacePhotoMeta.entity';
|
||||
@@ -165,6 +166,7 @@ export const ALL_ENTITIES: readonly EntitySchema[] = [
|
||||
DocumentProviderFieldsSchema,
|
||||
DocumentProvidersSchema,
|
||||
DocumentSyncItemsSchema,
|
||||
FerrataTilesSchema,
|
||||
FileLinksSchema,
|
||||
GoogleApiUsageSchema,
|
||||
GooglePlacePhotoMetaSchema,
|
||||
|
||||
Reference in New Issue
Block a user