[Bast-commits] r3327 - trunk/Anything/lib/DB
castaway at dev.catalyst.perl.org
castaway at dev.catalyst.perl.org
Fri May 18 23:21:41 GMT 2007
Author: castaway
Date: 2007-05-18 23:21:40 +0100 (Fri, 18 May 2007)
New Revision: 3327
Modified:
trunk/Anything/lib/DB/Anything.pm
Log:
Initial reactionising
Modified: trunk/Anything/lib/DB/Anything.pm
===================================================================
--- trunk/Anything/lib/DB/Anything.pm 2007-05-18 22:15:17 UTC (rev 3326)
+++ trunk/Anything/lib/DB/Anything.pm 2007-05-18 22:21:40 UTC (rev 3327)
@@ -3,7 +3,20 @@
use base 'DBIx::Class';
use strict;
use warnings;
+use Reaction::Class;
+use Reaction::Types::DateTime;
+has 'ID' => ( isa => 'Int', is => 'ro', required => 1 );
+has 'Name' => ( isa => 'NonEmptySimpleStr', is => 'rw', required => 1 );
+has 'Description' =>( isa => 'NonEmptyStr', is => 'rw', required => 0 );
+has 'ParentID'=>( isa => 'DB::Anything::Type', is => 'rw', required => 1 );
+has 'System' =>( isa => 'Int', is => 'ro', required => 1, default => sub { 1; } );
+
+sub display_name
+{
+ return shift->Name;
+}
+
__PACKAGE__->load_components(qw/ PK::Auto WebForm Core/);
__PACKAGE__->table('Type');
@@ -111,7 +124,17 @@
use base 'DBIx::Class';
use strict;
use warnings;
+use Reaction::Class;
+use Reaction::Types::DateTime;
+has 'ID' => ( isa => 'Int', is => 'ro', required => 1 );
+has 'TypeID' => ( isa => 'DB::Anything::Type', is => 'rw', required => 1 );
+has 'Created' =>( isa => 'DateTime', is => 'ro', required => 1 );
+has 'Modified'=>( isa => 'DateTime', is => 'rw', required => 1 );
+has 'Name' => ( isa => 'NonEmptySimpleStr', is => 'rw', required => 1 );
+has 'Description' =>( isa => 'NonEmptyStr', is => 'rw', required => 0 );
+
+
__PACKAGE__->load_components(qw/ PK::Auto WebForm Core/);
__PACKAGE__->table('Items');
More information about the Bast-commits
mailing list