package Common::DB::Schema::Report::DAwsHost;

use strict;
use warnings;

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

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

## columns
__PACKAGE__->add_columns(qw/
    d_aws_host_id
    instance_id
    hostname
    instance_type
    image_id
    zone
    ip
    private_ip
    vpc_id
    subnet
    security_groups
    state
    server_type
    is_production
    check_disk_space
    check_cpu_usage
    created_at
    updated_at
/);

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

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


## relationships

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


1;
