package Common::DB::Schema::Report::DDbHost;

use strict;
use warnings;

use lib '/app/tools/common/lib';
use base 'Common::DB::DBIxCore';

## table
__PACKAGE__->table('report.d_db_host');

## columns
__PACKAGE__->add_columns(qw/
    d_db_host_id
    d_aws_host_id
/);

## primary key
__PACKAGE__->set_primary_key('d_db_host_id');

## unique key (d_aws_host_id)
__PACKAGE__->add_unique_constraint('uidx_aws_host_id' => [qw/d_aws_host_id/]);


## relationships

## FK DAwsHost
__PACKAGE__->has_one(
	'aws_host',
	'Common::DB::Schema::Report::DAwsHost',
	{
		'foreign.d_aws_host_id' => 'self.d_aws_host_id',
	},
	{'cascade_delete' => 0, 'cascade_update' => 0, 'cascade_copy' => 0}
);

## FK DDb
__PACKAGE__->has_many(
	'databases',
	'Common::DB::Schema::Report::DDb',
	{
		'foreign.d_db_host_id' => 'self.d_db_host_id',
	},
	{'cascade_delete' => 0, 'cascade_update' => 0, 'cascade_copy' => 0}
);


1;
