hold stuff
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 23 Jun 2005 19:36:23 +0000 (19:36 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 23 Jun 2005 19:36:23 +0000 (19:36 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@915 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI.pm
Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/action.pm
Open-ILS/src/perlmods/OpenILS/Application/Storage/Driver/Pg/dbi.pm
Open-ILS/src/sql/Postgres/090.schema.action.sql

index e8756bd..10be2c1 100644 (file)
@@ -441,4 +441,13 @@ sub modify_from_fieldmapper {
        permission::usr_grp_map->has_a(  usr => 'actor::user' );
        permission::usr_grp_map->has_a(  grp => 'permission::grp_tree' );
 
+       action::hold_notification->has_a(  hold => 'action::hold_request' );
+       
+       action::hold_request->has_a(  current_copy => 'asset::copy' );
+       action::hold_request->has_a(  requestor => 'actor::user' );
+       action::hold_request->has_a(  usr => 'actor::user' );
+       action::hold_request->has_a(  pickup_lib => 'actor::org_unit' );
+
+       action::hold_request->has_many(  notifications => 'action::hold_notification' );
+
 1;
index 5ffee88..e025d4e 100644 (file)
@@ -49,5 +49,24 @@ __PACKAGE__->columns(Essential => qw/xact_start usr target_copy circ_lib
 
 #-------------------------------------------------------------------------------
 
+package action::hold_request;
+use base qw/action/;
+__PACKAGE__->table('action_hold_request');
+__PACKAGE__->columns(Primary => 'id');
+__PACKAGE__->columns(Essential => qw/request_time capture_time fulfillment_time
+                                    prev_check_time expire_time requestor usr
+                                    hold_type holdable_formats target
+                                    selection_depth pickup_lib current_copy/);
+
+#-------------------------------------------------------------------------------
+
+package action::hold_notification;
+use base qw/action/;
+__PACKAGE__->table('action_hold_notification');
+__PACKAGE__->columns(Primary => 'id');
+__PACKAGE__->columns(Essential => qw/hold method notify_time note/);
+
+#-------------------------------------------------------------------------------
+
 1;
 
index c095eec..a3d7c4a 100644 (file)
 
        #-------------------------------------------------------------------------------
 
+       package action::hold_request;
+
+       action::hold_request->sequence( 'action.hold_request_id_seq' );
+       action::hold_request->table('action.hold_request');
+
+       #-------------------------------------------------------------------------------
+
+       package action::hold_notification;
+
+       action::hold_notification->sequence( 'action.hold_notification_id_seq' );
+       action::hold_notification->table('action.hold_notification');
+
+       #-------------------------------------------------------------------------------
+
 
 }
 
index d6a3dda..7fabc74 100644 (file)
@@ -90,10 +90,10 @@ CREATE TABLE action.hold_request (
 
 
 CREATE TABLE action.hold_notification (
-       id              SERIAL          PRIMARY KEY,
-       hold            INT             NOT NULL REFERENCES action.hold_request (id),
-       method          TEXT            NOT NULL, -- eh...
-       notify_time     TIMESTAMP       NOT NULL DEFAULT NOW(),
+       id              SERIAL                          PRIMARY KEY,
+       hold            INT                             NOT NULL REFERENCES action.hold_request (id),
+       method          TEXT                            NOT NULL, -- eh...
+       notify_time     TIMESTAMP WITH TIME ZONE        NOT NULL DEFAULT NOW(),
        note            TEXT
 );