36 lines
709 B
Perl
36 lines
709 B
Perl
package LasTres::Schema::Result::InventoryItem;
|
|
|
|
use v5.36.0;
|
|
|
|
use strict;
|
|
use warnings;
|
|
|
|
use parent 'DBIx::Class::Core';
|
|
|
|
__PACKAGE__->table('inventory_items');
|
|
|
|
__PACKAGE__->add_columns(
|
|
uuid => {
|
|
data_type => 'uuid',
|
|
is_nullable => 0,
|
|
default_value => \'uuid_generate_v4()',
|
|
},
|
|
inventory => {
|
|
data_type => 'uuid',
|
|
is_nullable => 0,
|
|
is_foreign_key => 1,
|
|
},
|
|
identifier => {
|
|
data_type => 'text',
|
|
is_nullable => 0,
|
|
},
|
|
quantity => {
|
|
data_type => 'Integer',
|
|
is_nullable => 0,
|
|
},
|
|
);
|
|
|
|
__PACKAGE__->set_primary_key('uuid');
|
|
__PACKAGE__->belongs_to('inventory', 'LasTres::Schema::Result::Inventory');
|
|
1;
|