Add series data structure

This commit is contained in:
Nathan McCarty 2025-02-09 01:50:37 -05:00
parent 49502df416
commit 0571a16dab
3 changed files with 38 additions and 1 deletions

15
lib/DB/Series.rakumod Normal file
View file

@ -0,0 +1,15 @@
use v6.e.PREVIEW;
use JSON::Class:auth<zef:vrurg>;
#| A plain markdown post
unit class Series is json(:pretty);
#| The title of a series
has Str:D $.title is required;
#| The description of a series
has Str:D $.desc is required;
#| The ids of the posts in the series, in series order
has Int:D @.post-ids = [];