[Catalyst-commits] r7654 - / trunk/examples/NewAuthApp/lib trunk/examples/NewAuthApp/lib/Schema

zarquon at dev.catalyst.perl.org zarquon at dev.catalyst.perl.org
Wed Apr 30 11:42:47 BST 2008


Author: zarquon
Date: 2008-04-30 11:42:47 +0100 (Wed, 30 Apr 2008)
New Revision: 7654

Added:
   trunk/examples/NewAuthApp/lib/Schema.pm
   trunk/examples/NewAuthApp/lib/Schema/
   trunk/examples/NewAuthApp/lib/Schema/Role.pm
   trunk/examples/NewAuthApp/lib/Schema/User.pm
   trunk/examples/NewAuthApp/lib/Schema/UserRole.pm
Modified:
   /
Log:
 r12999 at zaphod:  kd | 2008-04-30 14:29:03 +1000
 stealing the test schema from catalyst-authentication-store-dbic-schema



Property changes on: 
___________________________________________________________________
Name: svk:merge
   - 1b129c88-ebf4-0310-add9-f09427935aba:/local/catalyst:4278
1c72fc7c-9ce4-42af-bf25-3bfe470ff1e8:/local/Catalyst:12998
3b9770f9-e80c-0410-a7de-cd203d167417:/local/catalyst:3514
dd8ad9ea-0304-0410-a433-df5f223e7bc0:/local/Catalyst:6909
   + 1b129c88-ebf4-0310-add9-f09427935aba:/local/catalyst:4278
1c72fc7c-9ce4-42af-bf25-3bfe470ff1e8:/local/Catalyst:12999
3b9770f9-e80c-0410-a7de-cd203d167417:/local/catalyst:3514
dd8ad9ea-0304-0410-a433-df5f223e7bc0:/local/Catalyst:6909

Added: trunk/examples/NewAuthApp/lib/Schema/Role.pm
===================================================================
--- trunk/examples/NewAuthApp/lib/Schema/Role.pm	                        (rev 0)
+++ trunk/examples/NewAuthApp/lib/Schema/Role.pm	2008-04-30 10:42:47 UTC (rev 7654)
@@ -0,0 +1,15 @@
+package TestApp::Schema::Role;
+
+use strict;
+use warnings;
+use base 'DBIx::Class';
+
+__PACKAGE__->load_components(qw/ Core /);
+
+__PACKAGE__->table( 'role' );
+__PACKAGE__->add_columns( qw/id role/ );
+__PACKAGE__->set_primary_key( 'id' );
+
+#__PACKAGE__->has_many( map_user_role => 'TestApp::Schema::UserRole' => 'roleid' );
+
+1;

Added: trunk/examples/NewAuthApp/lib/Schema/User.pm
===================================================================
--- trunk/examples/NewAuthApp/lib/Schema/User.pm	                        (rev 0)
+++ trunk/examples/NewAuthApp/lib/Schema/User.pm	2008-04-30 10:42:47 UTC (rev 7654)
@@ -0,0 +1,17 @@
+package TestApp::Schema::User;
+
+use strict;
+use warnings;
+use base 'DBIx::Class';
+
+__PACKAGE__->load_components(qw/ Core /);
+
+__PACKAGE__->table( 'user' );
+__PACKAGE__->add_columns( qw/id username email password status role_text session_data/ );
+__PACKAGE__->set_primary_key( 'id' );
+
+__PACKAGE__->has_many( 'map_user_role' => 'TestApp::Schema::UserRole' => 'user' );
+
+__PACKAGE__->many_to_many( roles => 'map_user_role', 'role');
+
+1;

Added: trunk/examples/NewAuthApp/lib/Schema/UserRole.pm
===================================================================
--- trunk/examples/NewAuthApp/lib/Schema/UserRole.pm	                        (rev 0)
+++ trunk/examples/NewAuthApp/lib/Schema/UserRole.pm	2008-04-30 10:42:47 UTC (rev 7654)
@@ -0,0 +1,15 @@
+package TestApp::Schema::UserRole;
+
+use strict;
+use warnings;
+use base 'DBIx::Class';
+
+__PACKAGE__->load_components(qw/ Core /);
+
+__PACKAGE__->table( 'user_role' );
+__PACKAGE__->add_columns( qw/id user roleid/ );
+__PACKAGE__->set_primary_key( qw/id/ );
+
+__PACKAGE__->belongs_to('role', 'TestApp::Schema::Role', { 'foreign.id' => 'self.roleid'});
+
+1;

Added: trunk/examples/NewAuthApp/lib/Schema.pm
===================================================================
--- trunk/examples/NewAuthApp/lib/Schema.pm	                        (rev 0)
+++ trunk/examples/NewAuthApp/lib/Schema.pm	2008-04-30 10:42:47 UTC (rev 7654)
@@ -0,0 +1,12 @@
+package TestApp::Schema;
+
+# Created by DBIx::Class::Schema::Loader v0.03007 @ 2006-10-18 12:38:33
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class::Schema';
+
+__PACKAGE__->load_classes;
+
+1;
\ No newline at end of file




More information about the Catalyst-commits mailing list