From 39d72767292803d62bd4ab01c4fcc4827a7f89d5 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Tue, 1 Feb 2022 17:02:17 -0400 Subject: art tag data --- src/thing/art-tag.js | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/thing/art-tag.js (limited to 'src/thing/art-tag.js') diff --git a/src/thing/art-tag.js b/src/thing/art-tag.js new file mode 100644 index 00000000..4b09d885 --- /dev/null +++ b/src/thing/art-tag.js @@ -0,0 +1,37 @@ +import Thing from './thing.js'; + +import { + isBoolean, + isColor, + isDirectory, + isName, +} from './validators.js'; + +export default class ArtTag extends Thing { + static [Thing.referenceType] = 'tag'; + + static propertyDescriptors = { + // Update & expose + + name: { + flags: {update: true, expose: true}, + update: {validate: isName} + }, + + directory: { + flags: {update: true, expose: true}, + update: {validate: isDirectory}, + expose: Thing.directoryExpose + }, + + color: { + flags: {update: true, expose: true}, + update: {validate: isColor} + }, + + isContentWarning: { + flags: {update: true, expose: true}, + update: {validate: isBoolean, default: false} + }, + }; +} -- cgit 1.3.0-6-gf8a5