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;
#-------------------------------------------------------------------------------
+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;
#-------------------------------------------------------------------------------
+ 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');
+
+ #-------------------------------------------------------------------------------
+
}
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
);