57 lines
1.2 KiB
Perl
57 lines
1.2 KiB
Perl
|
package BurguillosInfo::Schema::Result::ConquerNode;
|
||
|
|
||
|
use v5.36.0;
|
||
|
|
||
|
use strict;
|
||
|
use warnings;
|
||
|
|
||
|
use parent 'DBIx::Class::Core';
|
||
|
|
||
|
use feature 'signatures';
|
||
|
|
||
|
__PACKAGE__->table('conquer_node');
|
||
|
__PACKAGE__->load_components("TimeStamp");
|
||
|
|
||
|
__PACKAGE__->add_columns(
|
||
|
uuid => {
|
||
|
data_type => 'uuid',
|
||
|
is_nullable => 0,
|
||
|
},
|
||
|
name => {
|
||
|
data_type => 'text',
|
||
|
is_nullable => 0,
|
||
|
default_value => \'0',
|
||
|
},
|
||
|
coordinate_1 => {
|
||
|
data_type => 'real',
|
||
|
is_nullable => 0,
|
||
|
},
|
||
|
coordinate_2 => {
|
||
|
data_type => 'real',
|
||
|
is_nullable => 0,
|
||
|
},
|
||
|
type => {
|
||
|
data_type => 'text',
|
||
|
is_nullable => 0,
|
||
|
},
|
||
|
description => {
|
||
|
data_type => 'text',
|
||
|
is_nullable => 0,
|
||
|
}
|
||
|
);
|
||
|
|
||
|
sub serialize ($self) {
|
||
|
$self = $self->get_from_storage();
|
||
|
return {
|
||
|
kind => 'ConquerNode',
|
||
|
uuid => $self->uuid,
|
||
|
name => $self->name,
|
||
|
description => $self->description,
|
||
|
type => $self->type,
|
||
|
coordinate_1 => $self->coordinate_1,
|
||
|
coordinate_2 => $self->coordinate_2,
|
||
|
};
|
||
|
}
|
||
|
__PACKAGE__->set_primary_key('uuid');
|
||
|
1;
|