Add memes & meme-editing views

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2023-07-22 17:13:16 +03:00
parent fa0a89f324
commit e44ee7de34
16 changed files with 298 additions and 101 deletions

View File

@@ -21,13 +21,12 @@ const memeTypePlural = {
class Meme extends Object<Meme> {
id!: BSON.UUID;
type!: MEME_TYPE;
uri!: string[];
hash!: string[];
uri!: string;
size!: number;
title!: string;
description?: string;
description!: string;
isFavorite!: boolean;
tags!: Tag[] | Set<Tag>;
tags!: Tag[] | Realm.Set<Tag>;
tagsLength!: number;
dateCreated!: Date;
dateModified!: Date;
@@ -40,11 +39,10 @@ class Meme extends Object<Meme> {
properties: {
id: { type: 'uuid', default: () => new BSON.UUID() },
type: { type: 'string', indexed: true },
uri: 'string[]',
hash: 'string[]',
uri: 'string',
size: 'int',
title: 'string',
description: 'string?',
description: { type: 'string', default: '' },
isFavorite: { type: 'bool', indexed: true, default: false },
tags: { type: 'set', objectType: 'Tag', default: [] },
tagsLength: { type: 'int', default: 0 },