| 1 | package WWW::Hashbang::Pastebin::Schema::Result::Paste; | ||
| 2 | 11 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 11 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 11 | ▶ | use base qw/DBIx::Class::Core/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 11 | our $VERSION = '0.004'; # VERSION | |
| 6 | # ABSTRACT: represents a paste in the pastebin | ||
| 7 | |||
| 8 | 11 | __PACKAGE__->table('paste'); | |
| 9 | 11 | __PACKAGE__->load_components( qw/InflateColumn::DateTime/ ); | |
| 10 | 11 | __PACKAGE__->add_columns( | |
| 11 | 'paste_id' => { | ||
| 12 | data_type => 'bigint', | ||
| 13 | is_auto_increment => 1, | ||
| 14 | is_numeric => 1, | ||
| 15 | accessor => 'id', | ||
| 16 | }, | ||
| 17 | 'paste_content' => { | ||
| 18 | data_type => 'text', | ||
| 19 | accessor => 'content', | ||
| 20 | }, | ||
| 21 | 'paste_deleted' => { | ||
| 22 | data_type => 'boolean', | ||
| 23 | default_value => 0, | ||
| 24 | accessor => 'deleted', | ||
| 25 | }, | ||
| 26 | 'paste_date' => { | ||
| 27 | data_type => 'datetime', | ||
| 28 | accessor => 'date', | ||
| 29 | } | ||
| 30 | ); | ||
| 31 | |||
| 32 | 11 | __PACKAGE__->set_primary_key('paste_id'); | |
| 33 | |||
| 34 | 11 | 1; | |
| 35 | |||
| 36 | __END__ | ||