106 lines
		
	
	
	
		
			1.5 KiB
		
	
	
	
		
			Perl
		
	
	
	
	
	
			
		
		
	
	
			106 lines
		
	
	
	
		
			1.5 KiB
		
	
	
	
		
			Perl
		
	
	
	
	
	
| use utf8;
 | |
| package PoorBooru::Schema::Result::Tag;
 | |
| 
 | |
| # Created by DBIx::Class::Schema::Loader
 | |
| # DO NOT MODIFY THE FIRST PART OF THIS FILE
 | |
| 
 | |
| =head1 NAME
 | |
| 
 | |
| PoorBooru::Schema::Result::Tag
 | |
| 
 | |
| =cut
 | |
| 
 | |
| use strict;
 | |
| use warnings;
 | |
| 
 | |
| use base 'DBIx::Class::Core';
 | |
| 
 | |
| =head1 TABLE: C<tags>
 | |
| 
 | |
| =cut
 | |
| 
 | |
| __PACKAGE__->table("tags");
 | |
| 
 | |
| =head1 ACCESSORS
 | |
| 
 | |
| =head2 tag_id
 | |
| 
 | |
|   data_type: 'integer'
 | |
|   is_auto_increment: 1
 | |
|   is_nullable: 0
 | |
| 
 | |
| =head2 name
 | |
| 
 | |
|   data_type: 'text'
 | |
|   is_nullable: 0
 | |
|   size: 255
 | |
| 
 | |
| =cut
 | |
| 
 | |
| __PACKAGE__->add_columns(
 | |
|   "tag_id",
 | |
|   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
 | |
|   "name",
 | |
|   { data_type => "text", is_nullable => 0, size => 255 },
 | |
| );
 | |
| 
 | |
| =head1 PRIMARY KEY
 | |
| 
 | |
| =over 4
 | |
| 
 | |
| =item * L</tag_id>
 | |
| 
 | |
| =back
 | |
| 
 | |
| =cut
 | |
| 
 | |
| __PACKAGE__->set_primary_key("tag_id");
 | |
| 
 | |
| =head1 UNIQUE CONSTRAINTS
 | |
| 
 | |
| =head2 C<name_unique>
 | |
| 
 | |
| =over 4
 | |
| 
 | |
| =item * L</name>
 | |
| 
 | |
| =back
 | |
| 
 | |
| =cut
 | |
| 
 | |
| __PACKAGE__->add_unique_constraint("name_unique", ["name"]);
 | |
| 
 | |
| =head1 RELATIONS
 | |
| 
 | |
| =head2 media_tags
 | |
| 
 | |
| Type: has_many
 | |
| 
 | |
| Related object: L<PoorBooru::Schema::Result::MediaTag>
 | |
| 
 | |
| =cut
 | |
| 
 | |
| __PACKAGE__->has_many(
 | |
|   "media_tags",
 | |
|   "PoorBooru::Schema::Result::MediaTag",
 | |
|   { "foreign.tag_id" => "self.tag_id" },
 | |
|   { cascade_copy => 0, cascade_delete => 0 },
 | |
| );
 | |
| 
 | |
| =head2 medias
 | |
| 
 | |
| Type: many_to_many
 | |
| 
 | |
| Composing rels: L</media_tags> -> media
 | |
| 
 | |
| =cut
 | |
| 
 | |
| __PACKAGE__->many_to_many("medias", "media_tags", "media");
 | |
| 
 | |
| 
 | |
| # Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-02-18 09:09:31
 | |
| # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:tlbIFVg6S6LAWWiR0ioHFw
 | |
| 
 | |
| 
 | |
| # You can replace this text with custom code or comments, and it will be preserved on regeneration
 | |
| 1;
 |