41 lines
760 B
Perl
41 lines
760 B
Perl
package LasTres::Schema::Result::PJVar;
|
|
|
|
use v5.36.0;
|
|
use strict;
|
|
use warnings;
|
|
|
|
use feature 'signatures';
|
|
|
|
use parent 'DBIx::Class::Core';
|
|
|
|
use Data::Dumper;
|
|
|
|
use Moo;
|
|
|
|
__PACKAGE__->table('player_pjs_vars');
|
|
|
|
__PACKAGE__->add_columns(
|
|
name => {
|
|
data_type => 'text',
|
|
is_nullable => 0,
|
|
},
|
|
owner => {
|
|
data_type => 'uuid',
|
|
is_nullable => 0,
|
|
is_foreign_key => 1,
|
|
},
|
|
value => {
|
|
data_type => 'text',
|
|
is_nullable => 0,
|
|
},
|
|
);
|
|
|
|
__PACKAGE__->set_primary_key( 'owner', 'name' );
|
|
|
|
__PACKAGE__->belongs_to( 'owner', 'LasTres::Schema::Result::PJ' );
|
|
|
|
sub sqlt_deploy_hook ( $self, $sqlt_table ) {
|
|
$sqlt_table->add_index( name => 'index_var', fields => [qw/owner name/] );
|
|
}
|
|
1;
|