| 1 | package DBIx::Class::Schema::AuditLog::Structure::Action; | ||
| 2 | 12 | $DBIx::Class::Schema::AuditLog::Structure::Action::VERSION = '0.6.4'; | |
| 3 | 12 | ▶ | use base 'DBIx::Class::Schema::AuditLog::Structure::Base'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | |||
| 5 | 12 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 12 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 12 | __PACKAGE__->table('audit_log_action'); | |
| 9 | |||
| 10 | 12 | __PACKAGE__->add_columns( | |
| 11 | 'id' => { | ||
| 12 | 'data_type' => 'integer', | ||
| 13 | 'is_auto_increment' => 1, | ||
| 14 | 'is_nullable' => 0, | ||
| 15 | }, | ||
| 16 | 'changeset_id' => { | ||
| 17 | 'data_type' => 'integer', | ||
| 18 | 'is_nullable' => 0, | ||
| 19 | }, | ||
| 20 | 'audited_table_id' => { | ||
| 21 | 'data_type' => 'integer', | ||
| 22 | 'is_nullable' => 0, | ||
| 23 | }, | ||
| 24 | 'audited_row' => { | ||
| 25 | 'data_type' => 'varchar', | ||
| 26 | 'is_nullable' => 0, | ||
| 27 | 'size' => 255, | ||
| 28 | }, | ||
| 29 | 'action_type' => { | ||
| 30 | 'data_type' => 'varchar', | ||
| 31 | 'is_nullable' => 0, | ||
| 32 | 'size' => 10, | ||
| 33 | }, | ||
| 34 | ); | ||
| 35 | |||
| 36 | 12 | __PACKAGE__->set_primary_key('id'); | |
| 37 | |||
| 38 | 12 | __PACKAGE__->belongs_to( | |
| 39 | 'Changeset', | ||
| 40 | 'DBIx::Class::Schema::AuditLog::Structure::Changeset', | ||
| 41 | { 'foreign.id' => 'self.changeset_id' }, | ||
| 42 | ); | ||
| 43 | |||
| 44 | 12 | __PACKAGE__->belongs_to( | |
| 45 | 'AuditedTable', | ||
| 46 | 'DBIx::Class::Schema::AuditLog::Structure::AuditedTable', | ||
| 47 | { 'foreign.id' => 'self.audited_table_id' }, | ||
| 48 | ); | ||
| 49 | |||
| 50 | 12 | __PACKAGE__->has_many( | |
| 51 | 'Change', | ||
| 52 | 'DBIx::Class::Schema::AuditLog::Structure::Change', | ||
| 53 | { 'foreign.action_id' => 'self.id' }, | ||
| 54 | ); | ||
| 55 | |||
| 56 | 12 | 1; | |
| 57 | |||
| 58 | __END__ | ||