{ cascade_copy => 0, cascade_delete => 0 },
);
+=head2 messages
+
+Type: has_many
+
+Related object: L<Koha::Schema::Result::Message>
+
+=cut
+
+__PACKAGE__->has_many(
+ "messages",
+ "Koha::Schema::Result::Message",
+ { "foreign.manager_id" => "self.borrowernumber" },
+ { cascade_copy => 0, cascade_delete => 0 },
+);
+
=head2 old_issues
Type: has_many
__PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber");
-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-10-24 13:56:21
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:3x6ma9Zw8B5BOg89weoy8g
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-10-31 10:39:35
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Lc6GQ2E7d+tyzTk3v2sWjQ
__PACKAGE__->belongs_to(
"guarantor",
default_value: current_timestamp
is_nullable: 0
+=head2 manager_id
+
+ data_type: 'integer'
+ is_foreign_key: 1
+ is_nullable: 1
+
=cut
__PACKAGE__->add_columns(
default_value => \"current_timestamp",
is_nullable => 0,
},
+ "manager_id",
+ { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
);
=head1 PRIMARY KEY
__PACKAGE__->set_primary_key("message_id");
+=head1 RELATIONS
+
+=head2 manager
+
+Type: belongs_to
+
+Related object: L<Koha::Schema::Result::Borrower>
+
+=cut
+
+__PACKAGE__->belongs_to(
+ "manager",
+ "Koha::Schema::Result::Borrower",
+ { borrowernumber => "manager_id" },
+ {
+ is_deferrable => 1,
+ join_type => "LEFT",
+ on_delete => "SET NULL",
+ on_update => "RESTRICT",
+ },
+);
+
-# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:iq+Uo9eMnkDgUQsRR6VFUA
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-10-31 10:39:36
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Lmkl/u8Lr1cQumfZvn5D4A
# You can replace this text with custom content, and it will be preserved on regeneration