[Bast-commits] r7157 - in ironman/plagger/lib: . IronMan
IronMan/Schema IronMan/Schema/Result
castaway at dev.catalyst.perl.org
castaway at dev.catalyst.perl.org
Thu Jul 30 21:39:31 GMT 2009
Author: castaway
Date: 2009-07-30 21:39:31 +0000 (Thu, 30 Jul 2009)
New Revision: 7157
Added:
ironman/plagger/lib/IronMan/
ironman/plagger/lib/IronMan/Schema.pm
ironman/plagger/lib/IronMan/Schema/
ironman/plagger/lib/IronMan/Schema/Result/
ironman/plagger/lib/IronMan/Schema/Result/Feed.pm
ironman/plagger/lib/IronMan/Schema/Result/FeedTagMap.pm
ironman/plagger/lib/IronMan/Schema/Result/Tag.pm
Log:
Ironman feed schema
Added: ironman/plagger/lib/IronMan/Schema/Result/Feed.pm
===================================================================
--- ironman/plagger/lib/IronMan/Schema/Result/Feed.pm (rev 0)
+++ ironman/plagger/lib/IronMan/Schema/Result/Feed.pm 2009-07-30 21:39:31 UTC (rev 7157)
@@ -0,0 +1,37 @@
+package IronMan::Schema::Result::Feed;
+use strict;
+use warnings;
+use base qw/DBIx::Class/;
+
+__PACKAGE__->load_components(qw/Core/);
+
+__PACKAGE__->table('feed');
+__PACKAGE__->add_columns(
+ id => {
+ data_type => 'varchar',
+ size => 255,
+ },
+ url => {
+ data_type => 'varchar',
+ size => 1024,
+ is_nullable => 1,
+ },
+ link => {
+ data_type => 'varchar',
+ size => 1024,
+ is_nullable => 1,
+ },
+ title => {
+ data_type => 'varchar',
+ size => 1024,
+ is_nullable => 1,
+ },
+ owner => {
+ data_type => 'varchar',
+ size => 255,
+ },
+ );
+__PACKAGE__->set_primary_key(qw/id/);
+__PACKAGE__->add_unique_constraint(url => ['url']);
+
+1;
Added: ironman/plagger/lib/IronMan/Schema/Result/FeedTagMap.pm
===================================================================
--- ironman/plagger/lib/IronMan/Schema/Result/FeedTagMap.pm (rev 0)
+++ ironman/plagger/lib/IronMan/Schema/Result/FeedTagMap.pm 2009-07-30 21:39:31 UTC (rev 7157)
@@ -0,0 +1,24 @@
+package IronMan::Schema::Result::FeedTagMap;
+
+use strict;
+use warnings;
+use base qw/DBIx::Class/;
+
+__PACKAGE__->load_components(qw/Core/);
+
+__PACKAGE__->table('feed_tag_map');
+__PACKAGE__->add_columns(
+ feed => {
+ data_type => 'integer',
+ },
+ tag => {
+ data_type => 'integer',
+ }
+ );
+
+__PACKAGE__->set_primary_key(qw/feed tag/);
+
+__PACKAGE__->belongs_to( feed => 'IronMan::Schema::Result::Feed' );
+__PACKAGE__->belongs_to( tag => 'IronMan::Schema::Result::Tag' );
+
+1;
Added: ironman/plagger/lib/IronMan/Schema/Result/Tag.pm
===================================================================
--- ironman/plagger/lib/IronMan/Schema/Result/Tag.pm (rev 0)
+++ ironman/plagger/lib/IronMan/Schema/Result/Tag.pm 2009-07-30 21:39:31 UTC (rev 7157)
@@ -0,0 +1,24 @@
+package IronMan::Schema::Result::Tag;
+use strict;
+use warnings;
+use base qw/DBIx::Class/;
+
+__PACKAGE__->load_components(qw/Core/);
+
+__PACKAGE__->table('tag');
+__PACKAGE__->add_columns(
+ id => {
+ data_type => 'integer',
+ is_auto_increment => 1,
+ },
+ name => {
+ data_type => 'varchar',
+ size => 1024,
+ },
+ );
+__PACKAGE__->set_primary_key(qw/id/);
+
+__PACKAGE__->has_many( feed_tag_map => 'IronMan::Schema::Result::FeedTagMap', 'tag' );
+__PACKAGE__->many_to_many( feeds => feed_tag_map => 'feed' );
+
+1;
Added: ironman/plagger/lib/IronMan/Schema.pm
===================================================================
--- ironman/plagger/lib/IronMan/Schema.pm (rev 0)
+++ ironman/plagger/lib/IronMan/Schema.pm 2009-07-30 21:39:31 UTC (rev 7157)
@@ -0,0 +1,10 @@
+package IronMan::Schema;
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class::Schema';
+
+__PACKAGE__->load_namespaces();
+
+1;
More information about the Bast-commits
mailing list