Skip to content

Commit

Permalink
Add JSON-LD to a couple of classes
Browse files Browse the repository at this point in the history
  • Loading branch information
davorg committed Apr 25, 2019
1 parent c93ab9b commit 28b6629
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion lib/Literature/Schema/Result/Actor.pm
Expand Up @@ -132,10 +132,16 @@ __PACKAGE__->has_many(
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2019-04-19 15:09:14
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:INL0Qo42zMtlg0o8evBMoA

with 'Literature::Role::HasSlug';
with 'Literature::Role::HasSlug', 'MooX::Role::JSON_LD';

sub slug_cols { return qw[name]; }

sub json_ld_type { 'Person' }

sub json_ld_fields {
[ qw[ name ] ]
}

# You can replace this text with custom code or comments, and it will be preserved on regeneration
__PACKAGE__->meta->make_immutable;
1;
8 changes: 7 additions & 1 deletion lib/Literature/Schema/Result/Author.pm
Expand Up @@ -142,10 +142,16 @@ __PACKAGE__->many_to_many("works", "author_works", "work");
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2019-04-19 15:09:14
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:niNTrnT/xawzB/3DfXxSCQ

with 'Literature::Role::HasSlug';
with 'Literature::Role::HasSlug', 'MooX::Role::JSON_LD';

sub slug_cols { return qw[name]; }

sub json_ld_type { 'Person' }

sub json_ld_fields {
[ qw[ name ] ]
}

# You can replace this text with custom code or comments, and it will be preserved on regeneration
__PACKAGE__->meta->make_immutable;
1;

0 comments on commit 28b6629

Please sign in to comment.