1use utf8;
2package App::Netdisco::DB::Result::DeviceModule;
3
4
5use strict;
6use warnings;
7
8use base 'App::Netdisco::DB::Result';
9__PACKAGE__->table("device_module");
10__PACKAGE__->add_columns(
11  "ip",
12  { data_type => "inet", is_nullable => 0 },
13  "index",
14  { data_type => "integer", is_nullable => 0 },
15  "description",
16  { data_type => "text", is_nullable => 1 },
17  "type",
18  { data_type => "text", is_nullable => 1 },
19  "parent",
20  { data_type => "integer", is_nullable => 1 },
21  "name",
22  { data_type => "text", is_nullable => 1 },
23  "class",
24  { data_type => "text", is_nullable => 1 },
25  "pos",
26  { data_type => "integer", is_nullable => 1 },
27  "hw_ver",
28  { data_type => "text", is_nullable => 1 },
29  "fw_ver",
30  { data_type => "text", is_nullable => 1 },
31  "sw_ver",
32  { data_type => "text", is_nullable => 1 },
33  "serial",
34  { data_type => "text", is_nullable => 1 },
35  "model",
36  { data_type => "text", is_nullable => 1 },
37  "fru",
38  { data_type => "boolean", is_nullable => 1 },
39  "creation",
40  {
41    data_type     => "timestamp",
42    default_value => \"current_timestamp",
43    is_nullable   => 1,
44    original      => { default_value => \"now()" },
45  },
46  "last_discover",
47  { data_type => "timestamp", is_nullable => 1 },
48);
49__PACKAGE__->set_primary_key("ip", "index");
50
51
52
53=head1 RELATIONSHIPS
54
55=head2 device
56
57Returns the entry from the C<device> table on which this VLAN entry was discovered.
58
59=cut
60
61__PACKAGE__->belongs_to( device => 'App::Netdisco::DB::Result::Device', 'ip' );
62
631;
64