This repository has been archived on 2023-08-16. You can view files and clone it, but cannot push or open issues or pull requests.
Foodloop-Server/lib/Pear/LocalLoop/Schema/Result/GbPostcode.pm

50 lines
855 B
Perl
Raw Permalink Normal View History

2017-09-21 14:48:25 +00:00
package Pear::LocalLoop::Schema::Result::GbPostcode;
use strict;
use warnings;
use base 'DBIx::Class::Core';
__PACKAGE__->table('gb_postcodes');
__PACKAGE__->add_columns(
outcode => {
data_type => 'char',
size => 4,
is_nullable => 0,
},
incode => {
data_type => 'char',
size => 3,
is_nullable => 0,
default_value => '',
},
latitude => {
data_type => 'decimal',
size => [7,5],
is_nullable => 1,
default_value => undef,
},
longitude => {
data_type => 'decimal',
size => [7,5],
is_nullable => 1,
default_value => undef,
},
ward_id => {
data_type => 'integer',
is_nullable => 1,
default_value => undef,
},
2017-09-21 14:48:25 +00:00
);
__PACKAGE__->set_primary_key(qw/ outcode incode /);
__PACKAGE__->belongs_to(
"ward",
"Pear::LocalLoop::Schema::Result::GbWard",
"ward_id",
);
2017-09-21 14:48:25 +00:00
1;