package MG::Countrygroup;

use strict;

use base qw(MG::DB::Object::AutoBase1);

__PACKAGE__->meta->setup(
    table   => 'countrygroups',

    columns => [
        uid         => { type => 'integer', not_null => 1 },
        RegionUID   => { type => 'integer', default => '0', not_null => 1 },
        CountryCode => { type => 'character', default => '', length => 2, not_null => 1 },
    ],

    primary_key_columns => [ 'uid' ],

    relationships => [
        countryname => {
            class      => 'MG::Country',
            column_map => {'CountryCode' => 'CountryCode' },
            type       => 'one to one',
        },
    ],
	error_mode => 'return'
);

1;

