PoorBooru/lib/PoorBooru/Schema/Result/MediaTag.pm

100 lines
1.6 KiB
Perl

use utf8;
package PoorBooru::Schema::Result::MediaTag;
# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE
=head1 NAME
PoorBooru::Schema::Result::MediaTag
=cut
use strict;
use warnings;
use base 'DBIx::Class::Core';
=head1 TABLE: C<media_tags>
=cut
__PACKAGE__->table("media_tags");
=head1 ACCESSORS
=head2 media_id
data_type: 'integer'
is_foreign_key: 1
is_nullable: 0
=head2 tag_id
data_type: 'integer'
is_foreign_key: 1
is_nullable: 0
=cut
__PACKAGE__->add_columns(
"media_id",
{ data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
"tag_id",
{ data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
);
=head1 PRIMARY KEY
=over 4
=item * L</media_id>
=item * L</tag_id>
=back
=cut
__PACKAGE__->set_primary_key("media_id", "tag_id");
=head1 RELATIONS
=head2 media
Type: belongs_to
Related object: L<PoorBooru::Schema::Result::Media>
=cut
__PACKAGE__->belongs_to(
"media",
"PoorBooru::Schema::Result::Media",
{ media_id => "media_id" },
{ is_deferrable => 0, on_delete => "CASCADE", on_update => "NO ACTION" },
);
=head2 tag
Type: belongs_to
Related object: L<PoorBooru::Schema::Result::Tag>
=cut
__PACKAGE__->belongs_to(
"tag",
"PoorBooru::Schema::Result::Tag",
{ tag_id => "tag_id" },
{ is_deferrable => 0, on_delete => "CASCADE", on_update => "NO ACTION" },
);
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-02-18 09:09:31
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CaXiI8+eaCoDbot368Hjyw
# You can replace this text with custom code or comments, and it will be preserved on regeneration
1;