]> Dogcows Code - chaz/p5-DBIx-Class-ResultSet-RecursiveUpdate/blobdiff - t/lib/DBSchema/Result/User.pm
Initial
[chaz/p5-DBIx-Class-ResultSet-RecursiveUpdate] / t / lib / DBSchema / Result / User.pm
diff --git a/t/lib/DBSchema/Result/User.pm b/t/lib/DBSchema/Result/User.pm
new file mode 100644 (file)
index 0000000..b8f53a5
--- /dev/null
@@ -0,0 +1,42 @@
+package DBSchema::Result::User;
+
+# Created by DBIx::Class::Schema::Loader v0.03000 @ 2006-10-02 08:24:09
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class';
+#use overload '""' => sub {$_[0]->name}, fallback => 1;
+
+__PACKAGE__->load_components('Core');
+__PACKAGE__->table("usr");
+__PACKAGE__->add_columns(
+    "id" => {
+        data_type => 'integer',
+        is_auto_increment => 1,
+    },
+    "username" => {
+        data_type => 'varchar',
+        size      => '100',
+    },
+    "password" => {
+        data_type => 'varchar',
+        size      => '100',
+    },
+    "name" => {
+        data_type => 'varchar',
+        size      => '100',
+      },
+  );
+__PACKAGE__->set_primary_key("id");
+__PACKAGE__->has_many("user_roles", "UserRole", { "foreign.user" => "self.id" });
+__PACKAGE__->has_many("owned_dvds", "Dvd", { "foreign.owner" => "self.id" });
+__PACKAGE__->has_many(
+  "borrowed_dvds",
+  "Dvd",
+  { "foreign.current_borrower" => "self.id" },
+);
+__PACKAGE__->many_to_many('roles', 'user_roles' => 'role');
+
+1;
+
This page took 0.021144 seconds and 4 git commands to generate.