100 lines
2.4 KiB
Perl
100 lines
2.4 KiB
Perl
package LasTres::Schema::Result::PJ;
|
|
|
|
use v5.36.0;
|
|
|
|
use strict;
|
|
use warnings;
|
|
|
|
use parent 'DBIx::Class::Core';
|
|
|
|
__PACKAGE__->table('player_pjs');
|
|
|
|
__PACKAGE__->add_columns(
|
|
uuid => {
|
|
data_type => 'uuid',
|
|
default_value => \'uuid_generate_v4()',
|
|
is_nullable => 0,
|
|
},
|
|
owner => {
|
|
data_type => 'uuid',
|
|
is_nullable => 0,
|
|
is_foreign_key => 1,
|
|
},
|
|
full_name => {
|
|
data_type => 'text',
|
|
is_nullable => 0,
|
|
},
|
|
short_name => {
|
|
data_type => 'text',
|
|
is_nullable => 0,
|
|
},
|
|
nick => {
|
|
data_type => 'text',
|
|
is_nullable => 0,
|
|
},
|
|
race => {
|
|
data_type => 'text',
|
|
is_nullable => 0,
|
|
},
|
|
team => {
|
|
data_type => 'uuid',
|
|
is_nullable => 0,
|
|
},
|
|
creation_date => {
|
|
data_type => 'timestamp',
|
|
default_value => \'NOW()',
|
|
is_nullable => 0,
|
|
},
|
|
last_activity => {
|
|
data_type => 'timestamp',
|
|
default_value => \'NOW()',
|
|
is_nullable => 0,
|
|
},
|
|
level => {
|
|
data_type => 'integer',
|
|
default_value => \'1',
|
|
is_nullable => 0,
|
|
},
|
|
exp => {
|
|
data_type => 'integer',
|
|
default_value => \'1',
|
|
is_nullable => 0,
|
|
},
|
|
equipment => {
|
|
data_type => 'uuid',
|
|
is_nullable => 0,
|
|
is_foreign_key => 1,
|
|
},
|
|
stats => {
|
|
data_type => 'uuid',
|
|
is_foreign_key => 1,
|
|
is_nullable => 0,
|
|
},
|
|
skills => {
|
|
data_type => 'uuid',
|
|
is_nullable => 0,
|
|
is_foreign_key => 1,
|
|
},
|
|
spells => {
|
|
data_type => 'uuid',
|
|
is_nullable => 0,
|
|
is_foreign_key => 1,
|
|
},
|
|
inventory => {
|
|
data_type => 'uuid',
|
|
is_nullable => 0,
|
|
}
|
|
|
|
);
|
|
__PACKAGE__->set_primary_key('uuid');
|
|
|
|
__PACKAGE__->has_many('npcs', 'LasTres::Schema::Result::CompanionNPC', 'owner');
|
|
__PACKAGE__->belongs_to('stats', 'LasTres::Schema::Result::Stats');
|
|
__PACKAGE__->belongs_to('inventory', 'LasTres::Schema::Result::Inventory');
|
|
__PACKAGE__->belongs_to('skills', 'LasTres::Schema::Result::SkillLikeList');
|
|
__PACKAGE__->belongs_to('spells', 'LasTres::Schema::Result::SkillLikeList');
|
|
__PACKAGE__->belongs_to('equipment', 'LasTres::Schema::Result::Equipment');
|
|
__PACKAGE__->belongs_to('team', 'LasTres::Schema::Result::Team');
|
|
__PACKAGE__->belongs_to('owner', 'LasTres::Schema::Result::Player');
|
|
1;
|