fixing money::user_circulation_summary view class
[Evergreen.git] / Open-ILS / src / perlmods / OpenILS / Application / Storage / Driver / Pg / dbi.pm
1 {
2         #---------------------------------------------------------------------
3         package money::billable_transaction;
4         
5         money::billable_transaction->table( 'money.billable_xact' );
6         money::billable_transaction->sequence( 'money.billable_xact_id_seq' );
7
8         #---------------------------------------------------------------------
9         package money::billing;
10         
11         money::billing->table( 'money.billing' );
12         money::billing->sequence( 'money.billing_id_seq' );
13
14         #---------------------------------------------------------------------
15         package money::payment;
16         
17         money::payment->table( 'money.payment_view' );
18
19         #---------------------------------------------------------------------
20         package money::cash_payment;
21         
22         money::cash_payment->table( 'money.cash_payment' );
23         money::cash_payment->sequence( 'money.payment_id_seq' );
24
25         #---------------------------------------------------------------------
26         package money::check_payment;
27         
28         money::check_payment->table( 'money.check_payment' );
29         money::check_payment->sequence( 'money.payment_id_seq' );
30
31         #---------------------------------------------------------------------
32         package money::credit_payment;
33         
34         money::credit_payment->table( 'money.credit_payment' );
35         money::credit_payment->sequence( 'money.payment_id_seq' );
36
37         #---------------------------------------------------------------------
38         package money::credit_card_payment;
39         
40         money::credit_card_payment->table( 'money.credit_card_payment' );
41         money::credit_card_payment->sequence( 'money.payment_id_seq' );
42
43         #---------------------------------------------------------------------
44         package money::work_payment;
45         
46         money::work_payment->table( 'money.work_payment' );
47         money::work_payment->sequence( 'money.payment_id_seq' );
48
49         #---------------------------------------------------------------------
50         package money::forgive_payment;
51         
52         money::forgive_payment->table( 'money.forgive_payment' );
53         money::forgive_payment->sequence( 'money.payment_id_seq' );
54
55         #---------------------------------------------------------------------
56         package money::billable_transaction_summary;
57         
58         money::billable_transaction_summary->table( 'money.billable_xact_summary' );
59
60         #---------------------------------------------------------------------
61         package money::user_summary;
62         
63         money::user_summary->table( 'money.usr_summary' );
64
65         #---------------------------------------------------------------------
66         package money::user_circulation_summary;
67         
68         money::user_circulation_summary->table( 'money.usr_circulation_summary' );
69
70         #---------------------------------------------------------------------
71         package action::circulation;
72         
73         action::circulation->table( 'action.circulation' );
74         action::circulation->sequence( 'money.billable_xact_id_seq' );
75
76         #---------------------------------------------------------------------
77         package action::open_circulation;
78         
79         action::open_circulation->table( 'action.open_circulation' );
80
81         #---------------------------------------------------------------------
82         package action::survey;
83         
84         action::survey->table( 'action.survey' );
85         action::survey->sequence( 'action.survey_id_seq' );
86         
87         #---------------------------------------------------------------------
88         package action::survey_question;
89         
90         action::survey_question->table( 'action.survey_question' );
91         action::survey_question->sequence( 'action.survey_question_id_seq' );
92         
93         #---------------------------------------------------------------------
94         package action::survey_answer;
95         
96         action::survey_answer->table( 'action.survey_answer' );
97         action::survey_answer->sequence( 'action.survey_answer_id_seq' );
98         
99         #---------------------------------------------------------------------
100         package action::survey_response;
101         
102         action::survey_response->table( 'action.survey_response' );
103         action::survey_response->sequence( 'action.survey_response_id_seq' );
104         
105         #---------------------------------------------------------------------
106         package config::copy_status;
107         
108         config::copy_status->table( 'config.copy_status' );
109         config::copy_status->sequence( 'config.copy_status_id_seq' );
110
111         #---------------------------------------------------------------------
112         package config::rules::circ_duration;
113         
114         config::rules::circ_duration->table( 'config.rule_circ_duration' );
115         config::rules::circ_duration->sequence( 'config.rule_circ_duration_id_seq' );
116         
117         #---------------------------------------------------------------------
118         package config::rules::age_hold_protect;
119         
120         config::rules::age_hold_protect->table( 'config.rule_age_hold_protect' );
121         config::rules::age_hold_protect->sequence( 'config.rule_age_hold_protect_id_seq' );
122         
123         #---------------------------------------------------------------------
124         package config::rules::max_fine;
125         
126         config::rules::max_fine->table( 'config.rule_max_fine' );
127         config::rules::max_fine->sequence( 'config.rule_max_fine_id_seq' );
128         
129         #---------------------------------------------------------------------
130         package config::rules::recuring_fine;
131         
132         config::rules::recuring_fine->table( 'config.rule_recuring_fine' );
133         config::rules::recuring_fine->sequence( 'config.rule_recuring_fine_id_seq' );
134         
135         #---------------------------------------------------------------------
136         package config::net_access_level;
137         
138         config::net_access_level->table( 'config.net_access_level' );
139         config::net_access_level->sequence( 'config.net_access_level_id_seq' );
140         
141         #---------------------------------------------------------------------
142         package config::standing;
143         
144         config::standing->table( 'config.standing' );
145         config::standing->sequence( 'config.standing_id_seq' );
146         
147         #---------------------------------------------------------------------
148         package config::metabib_field;
149         
150         config::metabib_field->table( 'config.metabib_field' );
151         config::metabib_field->sequence( 'config.metabib_field_id_seq' );
152         
153         #---------------------------------------------------------------------
154         package config::bib_source;
155         
156         config::bib_source->table( 'config.bib_source' );
157         config::bib_source->sequence( 'config.bib_source_id_seq' );
158         
159         #---------------------------------------------------------------------
160         package config::identification_type;
161         
162         config::identification_type->table( 'config.identification_type' );
163         config::identification_type->sequence( 'config.identification_type_id_seq' );
164         
165         #---------------------------------------------------------------------
166         package asset::call_number_note;
167         
168         asset::call_number_note->table( 'asset.call_number_note' );
169         asset::call_number_note->sequence( 'asset.call_number_note_id_seq' );
170         
171         #---------------------------------------------------------------------
172         package asset::copy_note;
173         
174         asset::copy_note->table( 'asset.copy_note' );
175         asset::copy_note->sequence( 'asset.copy_note_id_seq' );
176
177         #---------------------------------------------------------------------
178         package asset::call_number;
179         
180         asset::call_number->table( 'asset.call_number' );
181         asset::call_number->sequence( 'asset.call_number_id_seq' );
182         
183         #---------------------------------------------------------------------
184         package asset::copy_location;
185         
186         asset::copy_location->table( 'asset.copy_location' );
187         asset::copy_location->sequence( 'asset.copy_location_id_seq' );
188
189         #---------------------------------------------------------------------
190         package asset::copy;
191         
192         asset::copy->table( 'asset.copy' );
193         asset::copy->sequence( 'asset.copy_id_seq' );
194
195         #---------------------------------------------------------------------
196         package asset::stat_cat;
197         
198         asset::stat_cat->table( 'asset.stat_cat' );
199         asset::stat_cat->sequence( 'asset.stat_cat_id_seq' );
200         
201         #---------------------------------------------------------------------
202         package asset::stat_cat_entry;
203         
204         asset::stat_cat_entry->table( 'asset.stat_cat_entry' );
205         asset::stat_cat_entry->sequence( 'asset.stat_cat_entry_id_seq' );
206         
207         #---------------------------------------------------------------------
208         package asset::stat_cat_entry_copy_map;
209         
210         asset::stat_cat_entry_copy_map->table( 'asset.stat_cat_entry_copy_map' );
211         asset::stat_cat_entry_copy_map->sequence( 'asset.stat_cat_entry_copy_map_id_seq' );
212         
213         #---------------------------------------------------------------------
214         package authority::record_entry;
215         
216         authority::record_entry->table( 'authority.record_entry' );
217         authority::record_entry->sequence( 'authority.record_entry_id_seq' );
218
219         #---------------------------------------------------------------------
220         package biblio::record_entry;
221         
222         biblio::record_entry->table( 'biblio.record_entry' );
223         biblio::record_entry->sequence( 'biblio.record_entry_id_seq' );
224
225         #---------------------------------------------------------------------
226         #package biblio::record_marc;
227         #
228         #biblio::record_marc->table( 'biblio.record_marc' );
229         #biblio::record_marc->sequence( 'biblio.record_marc_id_seq' );
230         #
231         #---------------------------------------------------------------------
232         package authority::record_note;
233         
234         authority::record_note->table( 'authority.record_note' );
235         authority::record_note->sequence( 'authority.record_note_id_seq' );
236
237         #---------------------------------------------------------------------
238         package biblio::record_note;
239         
240         biblio::record_note->table( 'biblio.record_note' );
241         biblio::record_note->sequence( 'biblio.record_note_id_seq' );
242         
243         #---------------------------------------------------------------------
244         package actor::user;
245         
246         actor::user->table( 'actor.usr' );
247         actor::user->sequence( 'actor.usr_id_seq' );
248
249         #---------------------------------------------------------------------
250         package actor::org_unit_setting;
251         
252         actor::org_unit_setting->table( 'actor.org_unit_setting' );
253         actor::org_unit_setting->sequence( 'actor.org_unit_setting_id_seq' );
254
255         #---------------------------------------------------------------------
256         package actor::user_setting;
257         
258         actor::user_setting->table( 'actor.usr_setting' );
259         actor::user_setting->sequence( 'actor.usr_setting_id_seq' );
260
261         #---------------------------------------------------------------------
262         package actor::user_address;
263         
264         actor::user_address->table( 'actor.usr_address' );
265         actor::user_address->sequence( 'actor.usr_address_id_seq' );
266
267         #---------------------------------------------------------------------
268         package actor::org_address;
269         
270         actor::org_address->table( 'actor.org_address' );
271         actor::org_address->sequence( 'actor.org_address_id_seq' );
272         
273         #---------------------------------------------------------------------
274         package actor::profile;
275         
276         actor::profile->table( 'actor.profile' );
277         actor::profile->sequence( 'actor.profile_id_seq' );
278         
279         #---------------------------------------------------------------------
280         package actor::org_unit_type;
281         
282         actor::org_unit_type->table( 'actor.org_unit_type' );
283         actor::org_unit_type->sequence( 'actor.org_unit_type_id_seq' );
284
285         #---------------------------------------------------------------------
286         package actor::org_unit;
287         
288         actor::org_unit->table( 'actor.org_unit' );
289         actor::org_unit->sequence( 'actor.org_unit_id_seq' );
290
291         #---------------------------------------------------------------------
292         package actor::stat_cat;
293         
294         actor::stat_cat->table( 'actor.stat_cat' );
295         actor::stat_cat->sequence( 'actor.stat_cat_id_seq' );
296         
297         #---------------------------------------------------------------------
298         package actor::stat_cat_entry;
299         
300         actor::stat_cat_entry->table( 'actor.stat_cat_entry' );
301         actor::stat_cat_entry->sequence( 'actor.stat_cat_entry_id_seq' );
302         
303         #---------------------------------------------------------------------
304         package actor::stat_cat_entry_user_map;
305         
306         actor::stat_cat_entry_user_map->table( 'actor.stat_cat_entry_usr_map' );
307         actor::stat_cat_entry_user_map->sequence( 'actor.stat_cat_entry_usr_map_id_seq' );
308         
309         #---------------------------------------------------------------------
310         package actor::card;
311         
312         actor::card->table( 'actor.card' );
313         actor::card->sequence( 'actor.card_id_seq' );
314
315         #---------------------------------------------------------------------
316
317         #-------------------------------------------------------------------------------
318         package metabib::metarecord;
319
320         metabib::metarecord->table( 'metabib.metarecord' );
321         metabib::metarecord->sequence( 'metabib.metarecord_id_seq' );
322
323         OpenILS::Application::Storage->register_method(
324                 api_name        => 'open-ils.storage.direct.metabib.metarecord.batch.create',
325                 method          => 'copy_create',
326                 api_level       => 1,
327                 'package'       => 'OpenILS::Application::Storage',
328                 cdbi            => 'metabib::metarecord',
329         );
330
331
332         #-------------------------------------------------------------------------------
333
334         #-------------------------------------------------------------------------------
335         package metabib::title_field_entry;
336
337         metabib::title_field_entry->table( 'metabib.title_field_entry' );
338         metabib::title_field_entry->sequence( 'metabib.title_field_entry_id_seq' );
339         metabib::title_field_entry->columns( 'FTS' => 'index_vector' );
340
341 #       metabib::title_field_entry->add_trigger(
342 #               before_create => \&OpenILS::Application::Storage::Driver::Pg::tsearch2_trigger
343 #       );
344 #       metabib::title_field_entry->add_trigger(
345 #               before_update => \&OpenILS::Application::Storage::Driver::Pg::tsearch2_trigger
346 #       );
347
348         OpenILS::Application::Storage->register_method(
349                 api_name        => 'open-ils.storage.direct.metabib.title_field_entry.batch.create',
350                 method          => 'copy_create',
351                 api_level       => 1,
352                 'package'       => 'OpenILS::Application::Storage',
353                 cdbi            => 'metabib::title_field_entry',
354         );
355
356         #-------------------------------------------------------------------------------
357
358         #-------------------------------------------------------------------------------
359         package metabib::author_field_entry;
360
361         metabib::author_field_entry->table( 'metabib.author_field_entry' );
362         metabib::author_field_entry->sequence( 'metabib.author_field_entry_id_seq' );
363         metabib::author_field_entry->columns( 'FTS' => 'index_vector' );
364
365         OpenILS::Application::Storage->register_method(
366                 api_name        => 'open-ils.storage.direct.metabib.author_field_entry.batch.create',
367                 method          => 'copy_create',
368                 api_level       => 1,
369                 'package'       => 'OpenILS::Application::Storage',
370                 cdbi            => 'metabib::author_field_entry',
371         );
372
373         #-------------------------------------------------------------------------------
374
375         #-------------------------------------------------------------------------------
376         package metabib::subject_field_entry;
377
378         metabib::subject_field_entry->table( 'metabib.subject_field_entry' );
379         metabib::subject_field_entry->sequence( 'metabib.subject_field_entry_id_seq' );
380         metabib::subject_field_entry->columns( 'FTS' => 'index_vector' );
381
382         OpenILS::Application::Storage->register_method(
383                 api_name        => 'open-ils.storage.direct.metabib.subject_field_entry.batch.create',
384                 method          => 'copy_create',
385                 api_level       => 1,
386                 'package'       => 'OpenILS::Application::Storage',
387                 cdbi            => 'metabib::subject_field_entry',
388         );
389
390         #-------------------------------------------------------------------------------
391
392         #-------------------------------------------------------------------------------
393         package metabib::keyword_field_entry;
394
395         metabib::keyword_field_entry->table( 'metabib.keyword_field_entry' );
396         metabib::keyword_field_entry->sequence( 'metabib.keyword_field_entry_id_seq' );
397         metabib::keyword_field_entry->columns( 'FTS' => 'index_vector' );
398
399         OpenILS::Application::Storage->register_method(
400                 api_name        => 'open-ils.storage.direct.metabib.keyword_field_entry.batch.create',
401                 method          => 'copy_create',
402                 api_level       => 1,
403                 'package'       => 'OpenILS::Application::Storage',
404                 cdbi            => 'metabib::keyword_field_entry',
405         );
406
407         #-------------------------------------------------------------------------------
408         package metabib::series_field_entry;
409
410         metabib::series_field_entry->table( 'metabib.series_field_entry' );
411         metabib::series_field_entry->sequence( 'metabib.series_field_entry_id_seq' );
412         metabib::series_field_entry->columns( 'FTS' => 'index_vector' );
413
414         OpenILS::Application::Storage->register_method(
415                 api_name        => 'open-ils.storage.direct.metabib.series_field_entry.batch.create',
416                 method          => 'copy_create',
417                 api_level       => 1,
418                 'package'       => 'OpenILS::Application::Storage',
419                 cdbi            => 'metabib::series_field_entry',
420         );
421
422         #-------------------------------------------------------------------------------
423
424         #-------------------------------------------------------------------------------
425         #package metabib::title_field_entry_source_map;
426
427         #metabib::title_field_entry_source_map->table( 'metabib.title_field_entry_source_map' );
428
429         #-------------------------------------------------------------------------------
430
431         #-------------------------------------------------------------------------------
432         #package metabib::author_field_entry_source_map;
433
434         #metabib::author_field_entry_source_map->table( 'metabib.author_field_entry_source_map' );
435
436         #-------------------------------------------------------------------------------
437
438         #-------------------------------------------------------------------------------
439         #package metabib::subject_field_entry_source_map;
440
441         #metabib::subject_field_entry_source_map->table( 'metabib.subject_field_entry_source_map' );
442
443         #-------------------------------------------------------------------------------
444
445         #-------------------------------------------------------------------------------
446         #package metabib::keyword_field_entry_source_map;
447
448         #metabib::keyword_field_entry_source_map->table( 'metabib.keyword_field_entry_source_map' );
449
450         #-------------------------------------------------------------------------------
451
452         #-------------------------------------------------------------------------------
453         package metabib::metarecord_source_map;
454
455         metabib::metarecord_source_map->table( 'metabib.metarecord_source_map' );
456         OpenILS::Application::Storage->register_method(
457                 api_name        => 'open-ils.storage.direct.metabib.metarecord_source_map.batch.create',
458                 method          => 'copy_create',
459                 api_level       => 1,
460                 'package'       => 'OpenILS::Application::Storage',
461                 cdbi            => 'metabib::metarecord_source_map',
462         );
463
464
465         #-------------------------------------------------------------------------------
466         package authority::record_descriptor;
467
468         authority::record_descriptor->table( 'authority.rec_descriptor' );
469         authority::record_descriptor->sequence( 'authority.rec_descriptor_id_seq' );
470
471         OpenILS::Application::Storage->register_method(
472                 api_name        => 'open-ils.storage.direct.authority.record_descriptor.batch.create',
473                 method          => 'copy_create',
474                 api_level       => 1,
475                 'package'       => 'OpenILS::Application::Storage',
476                 cdbi            => 'authority::record_descriptor',
477         );
478
479         #-------------------------------------------------------------------------------
480         package metabib::record_descriptor;
481
482         metabib::record_descriptor->table( 'metabib.rec_descriptor' );
483         metabib::record_descriptor->sequence( 'metabib.rec_descriptor_id_seq' );
484
485         OpenILS::Application::Storage->register_method(
486                 api_name        => 'open-ils.storage.direct.metabib.record_descriptor.batch.create',
487                 method          => 'copy_create',
488                 api_level       => 1,
489                 'package'       => 'OpenILS::Application::Storage',
490                 cdbi            => 'metabib::record_descriptor',
491         );
492
493         #-------------------------------------------------------------------------------
494
495
496         #-------------------------------------------------------------------------------
497         package authority::full_rec;
498
499         authority::full_rec->table( 'authority.full_rec' );
500         authority::full_rec->sequence( 'authority.full_rec_id_seq' );
501         authority::full_rec->columns( 'FTS' => 'index_vector' );
502
503         OpenILS::Application::Storage->register_method(
504                 api_name        => 'open-ils.storage.direct.authority.full_rec.batch.create',
505                 method          => 'copy_create',
506                 api_level       => 1,
507                 'package'       => 'OpenILS::Application::Storage',
508                 cdbi            => 'authority::full_rec',
509         );
510
511
512         #-------------------------------------------------------------------------------
513         package metabib::full_rec;
514
515         metabib::full_rec->table( 'metabib.full_rec' );
516         metabib::full_rec->sequence( 'metabib.full_rec_id_seq' );
517         metabib::full_rec->columns( 'FTS' => 'index_vector' );
518
519         OpenILS::Application::Storage->register_method(
520                 api_name        => 'open-ils.storage.direct.metabib.full_rec.batch.create',
521                 method          => 'copy_create',
522                 api_level       => 1,
523                 'package'       => 'OpenILS::Application::Storage',
524                 cdbi            => 'metabib::full_rec',
525         );
526
527
528         #-------------------------------------------------------------------------------
529
530         package permission::perm_list;
531
532         permission::perm_list->sequence( 'permission.perm_list_id_seq' );
533         permission::perm_list->table('permission.perm_list');
534
535         #-------------------------------------------------------------------------------
536
537         package permission::grp_tree;
538
539         permission::grp_tree->sequence( 'permission.grp_tree_id_seq' );
540         permission::grp_tree->table('permission.grp_tree');
541
542         #-------------------------------------------------------------------------------
543
544         package permission::usr_grp_map;
545
546         permission::usr_grp_map->sequence( 'permission.usr_grp_map_id_seq' );
547         permission::usr_grp_map->table('permission.usr_grp_map');
548
549         #-------------------------------------------------------------------------------
550
551         package permission::usr_perm_map;
552
553         permission::usr_perm_map->sequence( 'permission.usr_perm_map_id_seq' );
554         permission::usr_perm_map->table('permission.usr_perm_map');
555
556         #-------------------------------------------------------------------------------
557
558         package permission::grp_perm_map;
559
560         permission::grp_perm_map->sequence( 'permission.grp_perm_map_id_seq' );
561         permission::grp_perm_map->table('permission.grp_perm_map');
562
563         #-------------------------------------------------------------------------------
564
565         package action::hold_request;
566
567         action::hold_request->sequence( 'action.hold_request_id_seq' );
568         action::hold_request->table('action.hold_request');
569
570         #-------------------------------------------------------------------------------
571
572         package action::hold_notification;
573
574         action::hold_notification->sequence( 'action.hold_notification_id_seq' );
575         action::hold_notification->table('action.hold_notification');
576
577         #-------------------------------------------------------------------------------
578
579         package action::hold_copy_map;
580
581         action::hold_copy_map->sequence( 'action.hold_copy_map_id_seq' );
582         action::hold_copy_map->table('action.hold_copy_map');
583
584         #-------------------------------------------------------------------------------
585
586         package action::hold_transit_copy;
587
588         action::hold_transit_copy->sequence( 'action.transit_copy_id_seq' );
589         action::hold_transit_copy->table('action.hold_transit_copy');
590
591         #-------------------------------------------------------------------------------
592
593         package action::transit_copy;
594
595         action::transit_copy->sequence( 'action.transit_copy_id_seq' );
596         action::transit_copy->table('action.transit_copy');
597
598         #-------------------------------------------------------------------------------
599
600         package action::unfulfilled_hold_list;
601
602         action::unfulfilled_hold_list->sequence( 'action.unfulfilled_hold_list_id_seq' );
603         action::unfulfilled_hold_list->table('action.unfulfilled_hold_list');
604
605         #-------------------------------------------------------------------------------
606
607
608 }
609
610 1;