Pinto
view release on metacpan or search on metacpan
lib/Pinto/Schema/Result/Revision.pm view on Meta::CPAN
use utf8;
package Pinto::Schema::Result::Revision;
# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE
use strict;
use warnings;
use Moose;
use MooseX::NonMoose;
use MooseX::MarkAsMethods autoclean => 1;
extends 'DBIx::Class::Core';
__PACKAGE__->table("revision");
__PACKAGE__->add_columns(
"id", { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
"uuid", { data_type => "text", is_nullable => 0 },
"message", { data_type => "text", is_nullable => 0 },
"username", { data_type => "text", is_nullable => 0 },
"utc_time", { data_type => "integer", is_nullable => 0 },
"time_offset", { data_type => "integer", is_nullable => 0 },
"is_committed", { data_type => "boolean", is_nullable => 0 },
"has_changes", { data_type => "boolean", is_nullable => 0 },
);
__PACKAGE__->set_primary_key("id");
__PACKAGE__->add_unique_constraint( "uuid_unique", ["uuid"] );
__PACKAGE__->has_many(
"ancestry_children", "Pinto::Schema::Result::Ancestry",
{ "foreign.child" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 },
);
__PACKAGE__->has_many(
"ancestry_parents", "Pinto::Schema::Result::Ancestry",
{ "foreign.parent" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 },
);
__PACKAGE__->has_many(
"registrations", "Pinto::Schema::Result::Registration",
{ "foreign.revision" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 },
);
__PACKAGE__->has_many(
"stacks",
"Pinto::Schema::Result::Stack",
{ "foreign.head" => "self.id" },
{ cascade_copy => 0, cascade_delete => 0 },
);
with 'Pinto::Role::Schema::Result';
# Created by DBIx::Class::Schema::Loader v0.07033 @ 2013-03-07 12:56:52
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:u3EeZBioyg8H9+azCHQYNA
#------------------------------------------------------------------------------
# ABSTRACT: Represents a set of changes to a stack
#------------------------------------------------------------------------------
our $VERSION = '0.097'; # VERSION
#------------------------------------------------------------------------------
use MooseX::Types::Moose qw(Str Bool);
use DateTime;
use DateTime::TimeZone;
use DateTime::TimeZone::OffsetOnly;
use String::Format;
use Digest::SHA;
use Pinto::Util qw(:all);
use overload (
'""' => 'to_string',
'<=>' => 'numeric_compare',
'cmp' => 'numeric_compare',
'eq' => 'equals'
);
#------------------------------------------------------------------------------
has uuid_prefix => (
is => 'ro',
isa => Str,
default => sub { substr( $_[0]->uuid, 0, 8 ) },
init_arg => undef,
lazy => 1,
);
has message_title => (
is => 'ro',
isa => Str,
default => sub { trim_text( title_text( $_[0]->message ) ) },
init_arg => undef,
lazy => 1,
);
has message_body => (
is => 'ro',
isa => Str,
default => sub { trim_text( body_text( $_[0]->message ) ) },
init_arg => undef,
lazy => 1,
);
( run in 0.729 second using v1.01-cache-2.11-cpan-75ffa21a3d4 )