package LasTres::Schema::Result::CompanionNPC;

use v5.36.0;

use strict;
use warnings;

use parent 'DBIx::Class::Core';

__PACKAGE__->table('player_companion_npcs');

__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,
    },
    identifier => {
        data_type => 'text',
        is_nullable => 0,
    },
    nick => {
        data_type => 'text',
        is_nullable => 1,
    },
    race => {
        data_type => 'text',
        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_nullable => 0,
        is_foreign_key => 1,
    },
    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__->belongs_to('stats', 'LasTres::Schema::Result::Stats');
__PACKAGE__->belongs_to('inventory', 'LasTres::Schema::Result::Inventory');
__PACKAGE__->belongs_to('equipment', 'LasTres::Schema::Result::Equipment');
__PACKAGE__->belongs_to('skills', 'LasTres::Schema::Result::SkillLikeList');
__PACKAGE__->belongs_to('spells', 'LasTres::Schema::Result::SkillLikeList');
__PACKAGE__->belongs_to('owner', 'LasTres::Schema::Result::PJ');
1;
