package Orchard::DB::Schema::RoyaltyAccounting::AbacusEvent;

use strict;
use warnings;

use lib '/var/app/orchard/collab/jgetter/perllib';
use base 'Orchard::DB::DBIxCore';

## table
__PACKAGE__->table('royalty_accounting.abacus_event');

## columns
__PACKAGE__->add_columns(
    'abacus_event_id' => {'is_auto_increment'=>1,'data_type'=>'mediumint','is_nullable'=>0},
    'statement_period_id' => {'data_type'=>'mediumint','is_nullable'=>1},
    'event_name' => {'data_type'=>'varchar','is_nullable'=>0},
    'target_type' => {'data_type'=>'varchar','is_nullable'=>0},
    'target_id' => {'data_type'=>'mediumint','is_nullable'=>0},
    'event_date' => {'data_type'=>'datetime','is_nullable'=>0},
    'previous_abacus_event_id' => {'data_type'=>'mediumint','is_nullable'=>1},
    'rolled_back_at' => {'data_type'=>'datetime','is_nullable'=>1},
    'created_by' => {'data_type'=>'varchar','is_nullable'=>0}
);

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

1;
