« blib/lib/DBIx/Class/Schema/AuditLog/Structure/Change.pm
↑ Summary
blib/lib/DBIx/Class/Schema/AuditLog/Structure/Field.pm »
| 1 | package DBIx::Class::Schema::AuditLog::Structure::Changeset; | ||
| 2 | 12 | $DBIx::Class::Schema::AuditLog::Structure::Changeset::VERSION = '0.6.2'; | |
| 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__->load_components(qw< TimeStamp >); | |
| 9 | |||
| 10 | 12 | __PACKAGE__->table('audit_log_changeset'); | |
| 11 | |||
| 12 | 12 | __PACKAGE__->add_columns( | |
| 13 | 'id' => { | ||
| 14 | 'data_type' => 'integer', | ||
| 15 | 'is_auto_increment' => 1, | ||
| 16 | 'is_nullable' => 0, | ||
| 17 | }, | ||
| 18 | 'description' => { | ||
| 19 | 'data_type' => 'varchar', | ||
| 20 | 'is_nullable' => 1, | ||
| 21 | 'size' => 255, | ||
| 22 | }, | ||
| 23 | 'created_on' => { | ||
| 24 | 'data_type' => 'timestamp', | ||
| 25 | 'set_on_create' => 1, | ||
| 26 | 'is_nullable' => 0, | ||
| 27 | }, | ||
| 28 | 'user_id' => { | ||
| 29 | 'data_type' => 'integer', | ||
| 30 | 'is_nullable' => 1, | ||
| 31 | }, | ||
| 32 | ); | ||
| 33 | |||
| 34 | 12 | __PACKAGE__->set_primary_key('id'); | |
| 35 | |||
| 36 | 12 | __PACKAGE__->belongs_to( | |
| 37 | 'User', | ||
| 38 | 'DBIx::Class::Schema::AuditLog::Structure::User', | ||
| 39 | { 'foreign.id' => 'self.user_id' }, | ||
| 40 | { join_type => 'left' }, | ||
| 41 | ); | ||
| 42 | |||
| 43 | 12 | __PACKAGE__->has_many( | |
| 44 | 'Action', | ||
| 45 | 'DBIx::Class::Schema::AuditLog::Structure::Action', | ||
| 46 | { 'foreign.changeset_id' => 'self.id' }, | ||
| 47 | ); | ||
| 48 | |||
| 49 | 12 | 1; | |
| 50 | |||
| 51 | __END__ | ||
| 52 | |||
| 53 | =pod | ||
| 54 | |||
| 55 | =encoding UTF-8 | ||
| 56 | |||
| 57 | =head1 NAME | ||
| 58 | |||
| 59 | DBIx::Class::Schema::AuditLog::Structure::Changeset | ||
| 60 | |||
| 61 | =head1 VERSION | ||
| 62 | |||
| 63 | version 0.6.2 | ||
| 64 | |||
| 65 | =head1 AUTHOR | ||
| 66 | |||
| 67 | Mark Jubenville <ioncache@cpan.org> | ||
| 68 | |||
| 69 | =head1 COPYRIGHT AND LICENSE | ||
| 70 | |||
| 71 | This software is copyright (c) 2012 by Mark Jubenville. | ||
| 72 | |||
| 73 | This is free software; you can redistribute it and/or modify it under | ||
| 74 | the same terms as the Perl 5 programming language system itself. | ||
| 75 | |||
| 76 | =cut | ||