The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.
package Tag;

use strict;
use warnings;

use base 'TestDB';

__PACKAGE__->schema(
    table          => 'tag',
    columns        => [qw/id name/],
    primary_keys   => ['id'],
    auto_increment => 'id',
    unique_keys    => ['name'],

    relationships => {
        articles => {
            type      => 'many to many',
            map_class => 'ArticleTagMap',
            map_from  => 'tag',
            map_to    => 'article'
        }
    }
);

1;