Add series data structure
This commit is contained in:
parent
49502df416
commit
0571a16dab
3 changed files with 38 additions and 1 deletions
15
lib/DB/Series.rakumod
Normal file
15
lib/DB/Series.rakumod
Normal 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 = [];
|
Loading…
Add table
Add a link
Reference in a new issue