From 98c2012c0c6233fe3f70ba215c19f6d39d7e1e34 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sat, 20 Jan 2024 17:23:37 -0400 Subject: data: tidy things folder & imports, nicer fields yaml spec --- src/data/things/group.js | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'src/data/things/group.js') diff --git a/src/data/things/group.js b/src/data/things/group.js index a9708fb4..fe04dfaa 100644 --- a/src/data/things/group.js +++ b/src/data/things/group.js @@ -1,5 +1,6 @@ import {input} from '#composite'; import find from '#find'; +import Thing from '#thing'; import { color, @@ -11,8 +12,6 @@ import { wikiData, } from '#composite/wiki-properties'; -import Thing from './thing.js'; - export class Group extends Thing { static [Thing.referenceType] = 'group'; @@ -87,13 +86,13 @@ export class Group extends Thing { }); static [Thing.yamlDocumentSpec] = { - propertyFieldMapping: { - name: 'Group', - directory: 'Directory', - description: 'Description', - urls: 'URLs', + fields: { + 'Group': {property: 'name'}, + 'Directory': {property: 'directory'}, + 'Description': {property: 'description'}, + 'URLs': {property: 'urls'}, - featuredAlbums: 'Featured Albums', + 'Featured Albums': {property: 'featuredAlbums'}, }, ignoredFields: ['Review Points'], @@ -126,9 +125,9 @@ export class GroupCategory extends Thing { }); static [Thing.yamlDocumentSpec] = { - propertyFieldMapping: { - name: 'Category', - color: 'Color', + fields: { + 'Category': {property: 'name'}, + 'Color': {property: 'color'}, }, }; } -- cgit 1.3.0-6-gf8a5