]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
Mostly, new function(s) for bib matching based on SVF and tag+subfield; also, goodly...
[working/Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 -->
23
24 <IDL xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:idl="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
25
26         <!-- Virtual classes -->
27         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
28                 <fields>
29                         <field name="usr" oils_persist:virtual="true" />
30                         <field name="forgive_payment" oils_persist:virtual="true" />
31                         <field name="work_payment" oils_persist:virtual="true" />
32                         <field name="credit_payment" oils_persist:virtual="true" />
33                         <field name="goods_payment" oils_persist:virtual="true" />
34                 </fields>
35                 <links>
36                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
37                 </links>
38         </class>
39
40         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
41                 <fields>
42                         <field name="workstation" oils_persist:virtual="true" />
43                         <field name="cash_payment" oils_persist:virtual="true" />
44                         <field name="check_payment" oils_persist:virtual="true" />
45                         <field name="credit_card_payment" oils_persist:virtual="true" />
46                 </fields>
47                 <links>
48                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
49                 </links>
50         </class>
51
52         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
53                 <fields>
54                         <field name="id" oils_persist:virtual="true" />
55                         <field name="children" oils_persist:virtual="true" />
56                         <field name="owner_doc" oils_persist:virtual="true" />
57                         <field name="intra_doc_id" oils_persist:virtual="true" />
58                         <field name="parent_node" oils_persist:virtual="true" />
59                         <field name="node_type" oils_persist:virtual="true" />
60                         <field name="namespace_uri" oils_persist:virtual="true" />
61                         <field name="name" oils_persist:virtual="true" />
62                         <field name="value" oils_persist:virtual="true" />
63                 </fields>
64         </class>
65
66         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
67                 <fields>
68                         <field name="title" oils_persist:virtual="true" />
69                         <field name="author" oils_persist:virtual="true" />
70                         <field name="doc_id" oils_persist:virtual="true" />
71                         <field name="doc_type" oils_persist:virtual="true" />
72                         <field name="pubdate" oils_persist:virtual="true" />
73                         <field name="isbn" oils_persist:virtual="true" />
74                         <field name="publisher" oils_persist:virtual="true" />
75                         <field name="tcn" oils_persist:virtual="true" />
76                         <field name="subject" oils_persist:virtual="true" />
77                         <field name="types_of_resource" oils_persist:virtual="true" />
78                         <field name="call_numbers" oils_persist:virtual="true" />
79                         <field name="edition" oils_persist:virtual="true" />
80                         <field name="online_loc" oils_persist:virtual="true" />
81                         <field name="synopsis" oils_persist:virtual="true" />
82                         <field name="physical_description" oils_persist:virtual="true" />
83                         <field name="toc" oils_persist:virtual="true" />
84                         <field name="copy_count" oils_persist:virtual="true" />
85                         <field name="series" oils_persist:virtual="true" />
86                         <field name="serials" oils_persist:virtual="true" />
87                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
88                 </fields>
89         </class>
90
91         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
92                 <fields>
93                         <field name="err_msg" oils_persist:virtual="true" />
94                         <field name="type" oils_persist:virtual="true" />
95                 </fields>
96         </class>
97
98         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
99                 <fields>
100                         <field name="err_msg" oils_persist:virtual="true" />
101                         <field name="type" oils_persist:virtual="true" />
102                 </fields>
103         </class>
104
105         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
106                 <fields oils_persist:primary="matchpoint">
107                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
108                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
109                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
110                 </fields>
111                 <links>
112                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
113                 </links>
114         </class>
115
116         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
117         <!-- when the time is right, turn me into a view.  -->
118                 <fields>
119             <field reporter:label="Total Circs" name="num_circs" datatype="int"/>
120             <field reporter:label="Start Time" name="start_time" datatype="timestamp"/>
121             <field reporter:label="Checkout Workstation" name="checkout_workstation" datatype="text"/>
122             <field reporter:label="Last Renewal Time" name="last_renewal_time" datatype="timestamp"/>
123             <field reporter:label="Last Stop Fines" name="last_stop_fines" datatype="text"/>
124             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" datatype="timestamp"/>
125             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" datatype="text"/>
126             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" datatype="text"/>
127             <field reporter:label="Last Checkin Time" name="last_checkin_time" datatype="timestamp"/>
128             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" datatype="timestamp"/>
129                 </fields>
130         </class>
131
132         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
133                 <fields>
134                         <field name="public_name" oils_persist:virtual="true" />
135                         <field name="target_url" oils_persist:virtual="true" />
136                         <field name="target_coverage" oils_persist:virtual="true" />
137                         <field name="target_embargo" oils_persist:virtual="true" />
138                 </fields>
139         </class>
140
141         <!-- Actually in the DB -->
142         <class id="vmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::merge_profile" oils_persist:tablename="vandelay.merge_profile" reporter:label="Bib Import Merge Profile">
143                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
144                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
145                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
146                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
147                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
148                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
149                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
150                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
151                 </fields>
152                 <links>
153                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
154                 </links>
155                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
156                         <actions>
157                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
158                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
159                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
160                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
161                         </actions>
162                 </permacrud>
163         </class>
164
165         <class id="vibtf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_bib_trash_fields" oils_persist:tablename="vandelay.import_bib_trash_fields" reporter:label="Import/Overlay Fields for Removal">
166                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
167                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
168                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
169                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
170                 </fields>
171                 <links>
172                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
173                 </links>
174                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
175                         <actions>
176                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
177                                 <retrieve permission="CREATE_IMPORT_TRASH_FIELD UPDATE_IMPORT_TRASH_FIELD DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
178                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
179                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
180                         </actions>
181                 </permacrud>
182         </class>
183
184         <class id="vii" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item" oils_persist:tablename="vandelay.import_item" reporter:label="Import Item">
185                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
186                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
187                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
188                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
189                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
190                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
191                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
192                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
193                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
194                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
195                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
196                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
197                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
198                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
199                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
200                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
201                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
202                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
203                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
204                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
205                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
206                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
207                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
208                 </fields>
209                 <links>
210                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
211                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
212                 </links>
213                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
214                         <actions>
215                                 <create permission="CREATE_IMPORT_ITEM">
216                     <context link="definition" field="owner"/>
217                                 </create>
218                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
219                     <context link="definition" field="owner"/>
220                                 </retrieve>
221                                 <update permission="UPDATE_IMPORT_ITEM">
222                     <context link="definition" field="owner"/>
223                                 </update>
224                                 <delete permission="DELETE_IMPORT_ITEM">
225                     <context link="definition" field="owner"/>
226                                 </delete>
227                         </actions>
228                 </permacrud>
229         </class>
230
231         <class id="viiad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item_attr_definition" oils_persist:tablename="vandelay.import_item_attr_definition" reporter:label="Import Item Attribute Definition">
232                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
233                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
234                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
235                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
236                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
237                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
238                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
239                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
240                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
241                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
242                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
243                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
244                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
245                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
246                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
247                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
248                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
249                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
250                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
251                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
252                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
253                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
254                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
255                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
256                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
257                 </fields>
258                 <links>
259                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
260                 </links>
261                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
262                         <actions>
263                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
264                                 <retrieve permission="CREATE_IMPORT_ITEM_ATTR_DEF UPDATE_IMPORT_ITEM_ATTR_DEF DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
265                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
266                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
267                         </actions>
268                 </permacrud>
269         </class>
270
271         <class id="vbq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_queue" oils_persist:tablename="vandelay.bib_queue" reporter:label="Import/Overlay Bib Queue">
272                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
273                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
274                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
275                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
276                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
277                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
278                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
279                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
280                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
281                 </fields>
282                 <links>
283                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
284                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
285                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
286                 </links>
287                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
288                         <actions>
289                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
290                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
291                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
292                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
293                         </actions>
294                 </permacrud>
295         </class>
296
297         <class id="vqbr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record" oils_persist:tablename="vandelay.queued_bib_record" reporter:label="Queued Bib Record">
298                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
299                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
300                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
301                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
302                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
303                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
304                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
305                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
306                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
307                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
308                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
309                 </fields>
310                 <links>
311                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
312                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
313                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
314             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
315             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
316                 </links>
317                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
318                         <actions>
319                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
320                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
321                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
322                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
323                         </actions>
324                 </permacrud>
325         </class>
326
327         <class id="vqbrad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_attr_definition" oils_persist:tablename="vandelay.bib_attr_definition" reporter:label="Queued Bib Record Attribute Definition">
328                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
329                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
330                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
331                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
332                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
333                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
334                 </fields>
335                 <links/>
336                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
337                         <actions>
338                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
339                 <retrieve/>
340                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
341                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
342                         </actions>
343                 </permacrud>
344         </class>
345
346         <class id="vqbra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record_attr" oils_persist:tablename="vandelay.queued_bib_record_attr" reporter:label="Queued Bib Record Attribute">
347                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
348                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
349                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
350                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
351                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
352                 </fields>
353                 <links>
354                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
355                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
356                 </links>
357                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
358                         <actions>
359                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
360                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
361                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
362                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
363                         </actions>
364                 </permacrud>
365         </class>
366
367         <class id="vbm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_match" oils_persist:tablename="vandelay.bib_match" reporter:label="Queued Bib Record Match">
368                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
369                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
370                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
371                         <field reporter:label="Matched Set" name="matched_set" reporter:datatype="link"/>
372                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
373                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
374                 </fields>
375                 <links>
376                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
377                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
378                         <link field="matched_set" reltype="has_a" key="id" map="" class="vms"/>
379                 </links>
380                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
381                         <actions>
382                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
383                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
384                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
385                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
386                         </actions>
387                 </permacrud>
388         </class>
389
390         <class id="vaq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_queue" oils_persist:tablename="vandelay.authority_queue" reporter:label="Import/Overlay Authority Queue">
391                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
392                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
393                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
394                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
395                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
396                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
397                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
398                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
399                 </fields>
400                 <links>
401                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
402                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
403                 </links>
404                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
405                         <actions>
406                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
407                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
408                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
409                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
410                         </actions>
411                 </permacrud>
412         </class>
413
414         <class id="vqar" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record" oils_persist:tablename="vandelay.queued_authority_record" reporter:label="Queued Authority Record">
415                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
416                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
417                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
418                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
419                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
420                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
421                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
422                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
423                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
424                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
425                 </fields>
426                 <links>
427                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
428                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
429             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
430             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
431                 </links>
432                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
433                         <actions>
434                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
435                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
436                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
437                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
438                         </actions>
439                 </permacrud>
440         </class>
441
442         <class id="vqarad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_attr_definition" oils_persist:tablename="vandelay.authority_attr_definition" reporter:label="Queued Authority Record Attribute Definition">
443                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
444                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
445                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
446                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
447                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
448                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
449                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
450                 </fields>
451                 <links/>
452                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
453                         <actions>
454                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
455                 <retrieve/>
456                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
457                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
458                         </actions>
459                 </permacrud>
460         </class>
461
462         <class id="vqara" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record_attr" oils_persist:tablename="vandelay.queued_authority_record_attr" reporter:label="Queued Authority Record Attribute">
463                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
464                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
465                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
466                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
467                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
468                 </fields>
469                 <links>
470                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
471                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
472                 </links>
473                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
474                         <actions>
475                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
476                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
477                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
478                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
479                         </actions>
480                 </permacrud>
481         </class>
482
483         <class id="vam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_match" oils_persist:tablename="vandelay.authority_match" reporter:label="Queued Authority Record Match">
484                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
485                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
486                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
487                         <field reporter:label="Matched Attribute" name="matched_attr" reporter:datatype="link"/>
488                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
489                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
490                 </fields>
491                 <links>
492                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
493                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
494                         <link field="matched_attr" reltype="has_a" key="id" map="" class="vqbra"/>
495                 </links>
496                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
497                         <actions>
498                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
499                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
500                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
501                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
502                         </actions>
503                 </permacrud>
504         </class>
505
506         <class id="vms" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set" oils_persist:tablename="vandelay.match_set" reporter:label="Record Matching Definition Set">
507                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
508                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id"/>
509                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
510                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
511                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
512                 </fields>
513                 <links>
514                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
515                 </links>
516                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
517                         <actions>
518                                 <create permission="CREATE_IMPORT_MATCH_SET ADMIN_IMPORT_IMPORT_MATCH_SET" context_field="owner"/>
519                                 <retrieve permission="CREATE_IMPORT_MATCH_SET UPDATE_IMPORT_MATCH_SET DELETE_IMPORT_MATCH_SET" context_field="owner"/>
520                                 <update permission="UPDATE_IMPORT_MATCH_SET" context_field="owner"/>
521                                 <delete permission="DELETE_IMPORT_MATCH_SET" context_field="owner"/>
522                         </actions>
523                 </permacrud>
524         </class>
525
526         <class id="vmsp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_point" oils_persist:tablename="vandelay.match_set_point" reporter:label="Record Matching Definition">
527                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
528                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
529                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
530                         <field reporter:label="Coded Field" name="svf" reporter:datatype="text"/>
531                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
532                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
533                         <field reporter:label="Required?" name="required" reporter:datatype="bool"/>
534                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
535                 </fields>
536                 <links>
537                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
538                 </links>
539                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
540                         <actions>
541                                 <create permission="CREATE_IMPORT_MATCH_SET ADMIN_IMPORT_IMPORT_MATCH_SET" context_field="owner"/>
542                                 <retrieve permission="CREATE_IMPORT_MATCH_SET UPDATE_IMPORT_MATCH_SET DELETE_IMPORT_MATCH_SET" context_field="owner"/>
543                                 <update permission="UPDATE_IMPORT_MATCH_SET" context_field="owner"/>
544                                 <delete permission="DELETE_IMPORT_MATCH_SET" context_field="owner"/>
545                         </actions>
546                 </permacrud>
547         </class>
548
549         <class id="vmsq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_quality" oils_persist:tablename="vandelay.match_set_quality" reporter:label="Record Quality Metric">
550                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
551                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
552                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
553                         <field reporter:label="Coded Field" name="svf" reporter:datatype="text"/>
554                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
555                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
556                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
557                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
558                 </fields>
559                 <links>
560                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
561                 </links>
562                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
563                         <actions>
564                                 <create permission="CREATE_IMPORT_MATCH_SET ADMIN_IMPORT_IMPORT_MATCH_SET" context_field="owner"/>
565                                 <retrieve permission="CREATE_IMPORT_MATCH_SET UPDATE_IMPORT_MATCH_SET DELETE_IMPORT_MATCH_SET" context_field="owner"/>
566                                 <update permission="UPDATE_IMPORT_MATCH_SET" context_field="owner"/>
567                                 <delete permission="DELETE_IMPORT_MATCH_SET" context_field="owner"/>
568                         </actions>
569                 </permacrud>
570         </class>
571
572         <class id="auoi" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_org_unit_opt_in" oils_persist:tablename="actor.usr_org_unit_opt_in" reporter:label="User Sharing Opt-in">
573                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
574                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
575                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
576                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
577                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
578                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
579                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
580                 </fields>
581                 <links>
582                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
583                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
584                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
585                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
586                 </links>
587         </class>
588
589     <class id="cgf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::global_flag" oils_persist:tablename="config.global_flag" reporter:label="Global Flags and Settings" oils_persist:field_safe="true">
590         <fields oils_persist:primary="name">
591             <field reporter:label="Name" name="name" reporter:datatype="text"/>
592             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
593             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
594             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
595         </fields>
596         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
597             <actions>
598                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
599                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
600                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
601                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
602             </actions>
603         </permacrud>
604     </class>
605
606     <class id="cin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::index_normalizer" oils_persist:tablename="config.index_normalizer" reporter:label="Indexing Normalizer" oils_persist:field_safe="true">
607         <fields oils_persist:primary="id">
608             <field reporter:label="ID" name="id" reporter:datatype="id"/>
609             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
610             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
611             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
612             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
613         </fields>
614         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
615             <actions>
616                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
617                 <retrieve/>
618                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
619                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
620             </actions>
621         </permacrud>
622     </class>
623
624         <class id="cmfinm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field_index_norm_map" oils_persist:tablename="config.metabib_field_index_norm_map" reporter:label="Metabib Field to Indexing Normalizer Map" oils_persist:field_safe="true">
625                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
626                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
627                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
628                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
629                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
630                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
631                 </fields>
632                 <links>
633                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
634                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
635                 </links>
636         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
637             <actions>
638                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
639                 <retrieve/>
640                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
641                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
642             </actions>
643         </permacrud>
644         </class>
645
646         <class id="crad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_definition" oils_persist:tablename="config.record_attr_definition" reporter:label="SVF Record Attribute Defintion" oils_persist:field_safe="true">
647                 <fields oils_persist:primary="name">
648                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
649                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true"/>
650                         <field reporter:label="Description" name="description" reporter:datatype="text" />
651                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
652                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
653                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
654                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
655                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
656                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
657                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
658                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
659                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
660                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
661                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
662                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
663                 </fields>
664                 <links>
665                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
666                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
667                 </links>
668         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
669             <actions>
670                 <create permission="ADMIN_SVF" global_required="true"/>
671                 <retrieve/>
672                 <update permission="ADMIN_SVF" global_required="true"/>
673                 <delete permission="ADMIN_SVF" global_required="true"/>
674             </actions>
675         </permacrud>
676         </class>
677
678         <class id="mra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr" oils_persist:tablename="metabib.record_attr" reporter:label="SVF Record Attribute" oils_persist:field_safe="true">
679                 <fields oils_persist:primary="id">
680                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
681                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
682                 </fields>
683                 <links>
684                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
685                 </links>
686         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
687             <actions>
688                 <retrieve/>
689             </actions>
690         </permacrud>
691         </class>
692
693         <class id="crainm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_index_norm_map" oils_persist:tablename="config.record_attr_index_norm_map" reporter:label="SVF Record Attribute to Indexing Normalizer Map" oils_persist:field_safe="true">
694                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
695                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
696                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
697                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
698                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
699                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
700                 </fields>
701                 <links>
702                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
703                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
704                 </links>
705         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
706             <actions>
707                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
708                 <retrieve/>
709                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
710                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
711             </actions>
712         </permacrud>
713         </class>
714
715         <class id="ccvm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::coded_value_map" oils_persist:tablename="config.coded_value_map" reporter:label="SVF Record Attribute Coded Value Map" oils_persist:field_safe="true">
716                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
717                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true"/>
718                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
719                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
720                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
721                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
722                 </fields>
723                 <links>
724                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
725                 </links>
726         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
727             <actions>
728                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
729                 <retrieve/>
730                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
731                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
732             </actions>
733         </permacrud>
734         </class>
735
736         <class id="cracct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::remote_account" oils_persist:tablename="config.remote_account" reporter:label="Remote (3rd party) Account">
737                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
738                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
739                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
740                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
741                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
742                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
743                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
744                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
745                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
746                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
747                 </fields>
748                 <links>
749                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
750                 </links>
751         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
752             <actions>
753                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
754                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
755                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
756                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
757             </actions>
758         </permacrud>
759         </class>
760
761     <class id="czs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::z3950_source" oils_persist:tablename="config.z3950_source" reporter:label="Z39.50 Source">
762         <fields oils_persist:primary="name">
763             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
764             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
765             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
766             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
767             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
768             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
769             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
770             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
771             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
772         </fields>
773         <links>
774             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
775         </links>
776         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
777             <actions>
778                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
779                 <retrieve/>
780                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
781                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
782             </actions>
783         </permacrud>
784     </class>
785
786     <class id="cza" controller="open-ils.cstore" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
787         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
788             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id"/>
789             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
790             <field reporter:label="Name" name="name" reporter:datatype="text"/>
791             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
792             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
793             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
794             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
795         </fields>
796         <links>
797             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
798         </links>
799     </class>
800
801         <class id="ateo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_output" oils_persist:tablename="action_trigger.event_output" reporter:label="Event Output">
802                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
803                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
804                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
805                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
806                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
807                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
808                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
809                 </fields>
810                 <links>
811             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
812             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
813                 </links>
814                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
815                         <actions>
816                                 <retrieve/>
817                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
818                         </actions>
819                 </permacrud>
820         </class>
821
822         <class id="ath" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::hook" oils_persist:tablename="action_trigger.hook" reporter:label="Trigger Hook Point">
823                 <fields oils_persist:primary="key">
824                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
825                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
826                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
827                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
828                 </fields>
829                 <links/>
830                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
831                         <actions>
832                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
833                                 <retrieve/>
834                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
835                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
836                         </actions>
837                 </permacrud>
838         </class>
839
840         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
841                 <fields oils_persist:primary="module">
842                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
843                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
844                 </fields>
845                 <links/>
846         </class>
847
848         <class id="atval" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::validator" oils_persist:tablename="action_trigger.validator" reporter:label="Trigger Condition Validator">
849                 <fields oils_persist:primary="module">
850                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
851                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
852                 </fields>
853                 <links/>
854                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
855                         <actions>
856                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
857                                 <retrieve/>
858                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
859                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
860                         </actions>
861                 </permacrud>
862         </class>
863
864         <class id="atreact" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::reactor" oils_persist:tablename="action_trigger.reactor" reporter:label="Trigger Event Reactor">
865                 <fields oils_persist:primary="module">
866                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
867                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
868                 </fields>
869                 <links/>
870                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
871                         <actions>
872                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
873                                 <retrieve/>
874                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
875                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
876                         </actions>
877                 </permacrud>
878         </class>
879
880         <class id="atclean" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::cleanup" oils_persist:tablename="action_trigger.cleanup" reporter:label="Trigger Event Cleanup">
881                 <fields oils_persist:primary="module">
882                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
883                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
884                 </fields>
885                 <links/>
886                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
887                         <actions>
888                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
889                                 <retrieve/>
890                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
891                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
892                         </actions>
893                 </permacrud>
894         </class>
895
896         <class id="atenv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::environment" oils_persist:tablename="action_trigger.environment" reporter:label="Trigger Event Environment Entry">
897                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
898                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
899                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
900                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
901                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
902                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
903                 </fields>
904                 <links>
905                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
906                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
907                 </links>
908                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
909                         <actions>
910                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
911                     <context link="event_def" field="owner"/>
912                 </create>
913                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
914                     <context link="event_def" field="owner"/>
915                 </retrieve>
916                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
917                     <context link="event_def" field="owner"/>
918                 </update>
919                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
920                     <context link="event_def" field="owner"/>
921                 </delete>
922                         </actions>
923                 </permacrud>
924         </class>
925
926         <class id="atevdef" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_definition" oils_persist:tablename="action_trigger.event_definition" reporter:label="Trigger Event Definition">
927                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
928                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
929                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
930                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
931                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
932                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
933                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
934                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
935                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
936                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
937                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
938                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
939                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
940                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
941                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
942                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
943                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
944                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
945                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
946                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
947                 </fields>
948                 <links>
949                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
950                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
951                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
952                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
953                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
954                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
955                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
956                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
957                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
958                 </links>
959                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
960                         <actions>
961                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
962                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
963                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
964                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
965                         </actions>
966                 </permacrud>
967         </class>
968
969         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
970                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
971                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
972                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
973                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
974                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
975                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
976                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
977                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
978                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
979                         <field reporter:label="State" name="state" reporter:datatype="text"/>
980                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
981                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
982                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
983                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
984                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
985                 </fields>
986                 <links>
987                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
988                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
989                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
990                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
991                 </links>
992         </class>
993
994         <class id="atevparam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_param" oils_persist:tablename="action_trigger.event_params" reporter:label="Trigger Event Parameter">
995                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
996                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
997                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
998                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
999                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1000                 </fields>
1001                 <links>
1002                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1003                 </links>
1004                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1005                         <actions>
1006                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1007                     <context link="event_def" field="owner"/>
1008                 </create>
1009                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1010                     <context link="event_def" field="owner"/>
1011                 </retrieve>
1012                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1013                     <context link="event_def" field="owner"/>
1014                 </update>
1015                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1016                     <context link="event_def" field="owner"/>
1017                 </delete>
1018                         </actions>
1019                 </permacrud>
1020         </class>
1021
1022         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1023                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1024                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1025                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1026                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1027                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1028                 </fields>
1029                 <links>
1030                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1031                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1032                 </links>
1033         </class>
1034
1035         <class id="ccm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_modifier" oils_persist:tablename="config.circ_modifier" reporter:label="Circulation Modifier">
1036                 <fields oils_persist:primary="code">
1037                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1038                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1039                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1040                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1041                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1042                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1043                 </fields>
1044                 <links/>
1045         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1046             <actions>
1047                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1048                 <retrieve/>
1049                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1050                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1051             </actions>
1052         </permacrud>
1053         </class>
1054
1055         <class id="aiit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_item_type" oils_persist:tablename="acq.invoice_item_type" reporter:label="Non-bibliographic Invoice Item Type" oils_persist:field_safe="true">
1056                 <fields oils_persist:primary="code">
1057                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1058                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1059                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1060                 </fields>
1061                 <links/>
1062         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1063             <actions>
1064                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1065                 <retrieve/>
1066                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1067                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1068             </actions>
1069         </permacrud>
1070         </class>
1071
1072         <class id="acqim" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_method" oils_persist:tablename="acq.invoice_method" reporter:label="Invoice Method used by Vendor" oils_persist:field_safe="true">
1073                 <fields oils_persist:primary="code">
1074                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1075                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1076                 </fields>
1077                 <links/>
1078         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1079             <actions>
1080                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1081                 <retrieve/>
1082                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1083                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1084             </actions>
1085         </permacrud>
1086         </class>
1087
1088         <class id="ccpbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket_type" oils_persist:tablename="container.copy_bucket_type" reporter:label="Copy Bucket Type" oils_persist:field_safe="true">
1089                 <fields oils_persist:primary="code">
1090                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1091                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1092                 </fields>
1093                 <links/>
1094         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1095             <actions>
1096                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1097                 <retrieve/>
1098                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1099                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1100             </actions>
1101         </permacrud>
1102         </class>
1103
1104         <class id="ccnbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::call_number_bucket_type" oils_persist:tablename="container.call_number_bucket_type" reporter:label="Call Number Bucket Type" oils_persist:field_safe="true">
1105                 <fields oils_persist:primary="code">
1106                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1107                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1108                 </fields>
1109                 <links/>
1110         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1111             <actions>
1112                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1113                 <retrieve/>
1114                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1115                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1116             </actions>
1117         </permacrud>
1118         </class>
1119
1120         <class id="bpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_type" oils_persist:tablename="biblio.peer_type" reporter:label="Bibliographic Record Peer Type" oils_persist:field_safe="true">
1121                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1122                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1123                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1124                 </fields>
1125                 <links/>
1126         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1127             <actions>
1128                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1129                 <retrieve/>
1130                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1131                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1132             </actions>
1133         </permacrud>
1134         </class>
1135
1136         <class id="bpbcm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_bib_copy_map" oils_persist:tablename="biblio.peer_bib_copy_map" reporter:label="Bibliographic Record Peer Copy Map">
1137                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1138                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1139                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1140                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1141                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1142                 </fields>
1143         <links>
1144             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1145             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1146             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1147         </links>
1148         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1149             <actions>
1150                 <create permission="UPDATE_COPY">
1151                     <context link="target_copy" field="circ_lib"/>
1152                 </create>
1153                 <retrieve/>
1154                 <update permission="UPDATE_COPY">
1155                     <context link="target_copy" field="circ_lib"/>
1156                 </update>
1157                 <delete permission="UPDATE_COPY">
1158                     <context link="target_copy" field="circ_lib"/>
1159                 </delete>
1160             </actions>
1161         </permacrud>
1162         </class>
1163
1164         <class id="cbrebt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::biblio_record_entry_bucket_type" oils_persist:tablename="container.biblio_record_entry_bucket_type" reporter:label="Bibliographic Record Bucket Type" oils_persist:field_safe="true">
1165                 <fields oils_persist:primary="code">
1166                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1167                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1168                 </fields>
1169                 <links/>
1170         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1171             <actions>
1172                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1173                 <retrieve/>
1174                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1175                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1176             </actions>
1177         </permacrud>
1178         </class>
1179
1180         <class id="cubt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::user_bucket_type" oils_persist:tablename="container.user_bucket_type" reporter:label="User Bucket Type" oils_persist:field_safe="true">
1181                 <fields oils_persist:primary="code">
1182                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1183                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1184                 </fields>
1185                 <links/>
1186         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1187             <actions>
1188                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1189                 <retrieve/>
1190                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1191                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1192             </actions>
1193         </permacrud>
1194         </class>
1195
1196         <class id="cvrfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::videorecording_format_map" oils_persist:tablename="config.videorecording_format_map" reporter:label="Videorecording Format" oils_persist:field_safe="true">
1197                 <fields oils_persist:primary="code">
1198                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1199                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1200                 </fields>
1201                 <links/>
1202         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1203             <actions>
1204                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1205                 <retrieve/>
1206                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1207                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1208             </actions>
1209         </permacrud>
1210         </class>
1211
1212     <class id="chmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_weights" oils_persist:tablename="config.hold_matrix_weights" reporter:label="Hold Matrix Weights">
1213         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1214             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1215             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1216             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1217             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1218             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1219             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1220             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1221             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1222             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1223             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1224             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1225             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1226             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1227             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1228             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1229         </fields>
1230         <links/>
1231         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1232             <actions>
1233                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1234                 <retrieve/>
1235                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1236                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1237             </actions>
1238         </permacrud>
1239     </class>
1240
1241     <class id="ccmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_weights" oils_persist:tablename="config.circ_matrix_weights" reporter:label="Circ Matrix Weights">
1242         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1243             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1244             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1245             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1246             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1247             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1248             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1249             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1250             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1251             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1252             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1253             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1254             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1255             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1256             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1257             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1258         </fields>
1259         <links/>
1260         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1261             <actions>
1262                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1263                 <retrieve/>
1264                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1265                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1266             </actions>
1267         </permacrud>
1268     </class>
1269
1270     <class id="cwa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::weight_assoc" oils_persist:tablename="config.weight_assoc" reporter:label="Matrix Weight Association">
1271         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1272             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1273             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1274             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1275             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1276             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1277         </fields>
1278         <links>
1279             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1280             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1281             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1282         </links>
1283         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1284             <actions>
1285                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1286                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1287                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1288                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1289             </actions>
1290         </permacrud>
1291     </class>
1292
1293         <class id="chmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_matchpoint" oils_persist:tablename="config.hold_matrix_matchpoint" reporter:label="Hold Matrix Matchpoint">
1294                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1295                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1296                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1297                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1298                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1299                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1300                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1301                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1302                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1303                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1304                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1305                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1306                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1307                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1308                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1309                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1310                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1311             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1312                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1313                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1314                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1315                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1316                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1317                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1318                 </fields>
1319                 <links>
1320                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1321                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1322                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1323                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1324                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1325                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1326                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1327                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1328                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1329                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1330                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1331                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1332                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1333             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1334                 </links>
1335         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1336             <actions>
1337                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1338                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1339                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1340                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1341             </actions>
1342         </permacrud>
1343         </class>
1344
1345         <class id="ccmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_matchpoint" oils_persist:tablename="config.circ_matrix_matchpoint" reporter:label="Circulation Matrix Matchpoint">
1346                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1347                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1348                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1349                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1350                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1351                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1352                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1353                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1354                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1355                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1356                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1357                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1358                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1359                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1360                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1361             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1362                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1363                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1364             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1365                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1366                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1367                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1368                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1369             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1370             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1371             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1372                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1373                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1374                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1375                 </fields>
1376                 <links>
1377                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1378                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1379                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1380                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1381                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1382                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1383                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1384                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1385                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1386                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1387                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1388                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1389                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1390             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1391                 </links>
1392         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1393             <actions>
1394                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1395                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1396                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1397                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1398             </actions>
1399         </permacrud>
1400         </class>
1401
1402         <class id="ccmcmt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_circ_mod_test" oils_persist:tablename="config.circ_matrix_circ_mod_test" reporter:label="Circulation Matrix Circulation Modifier Subtest">
1403                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_id_seq">
1404                         <field reporter:label="Test ID" name="id" reporter:datatype="id"/>
1405                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="link"/>
1406                         <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1407                 </fields>
1408                 <links>
1409                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1410                 </links>
1411         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1412             <actions>
1413                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1414                     <context link="matchpoint" field="org_unit"/>
1415                 </create>
1416                 <retrieve/>
1417                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1418                     <context link="matchpoint" field="org_unit"/>
1419                 </update>
1420                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1421                     <context link="matchpoint" field="org_unit"/>
1422                 </delete>
1423             </actions>
1424         </permacrud>
1425         </class>
1426
1427         <class id="ccmcmtm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_circ_mod_test_map" oils_persist:tablename="config.circ_matrix_circ_mod_test_map" reporter:label="Circulation Matrix Circulation Modifier Subtest Circulation Modifier Set">
1428                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_map_id_seq">
1429                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
1430                         <field reporter:label="Circulation Modifier Subtest ID" name="circ_mod_test" reporter:datatype="link"/>
1431                         <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1432                 </fields>
1433                 <links>
1434                         <link field="circ_mod_test" reltype="has_a" key="id" map="" class="ccmcmt"/>
1435                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1436                 </links>
1437         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1438             <actions>
1439                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1440                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1441                 </create>
1442                 <retrieve/>
1443                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1444                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1445                 </update>
1446                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1447                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1448                 </delete>
1449             </actions>
1450         </permacrud>
1451         </class>
1452
1453         <class id="cit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::identification_type" oils_persist:tablename="config.identification_type" reporter:label="Identification Type">
1454                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1455                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1456                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1457                 </fields>
1458                 <links/>
1459         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1460             <actions>
1461                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1462                 <retrieve/>
1463                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1464                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1465             </actions>
1466         </permacrud>
1467         </class>
1468
1469         <class id="asvq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_question" oils_persist:tablename="action.survey_question" reporter:label="User Survey Question">
1470                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1471                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1472                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1473                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1474                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1475                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1476                 </fields>
1477                 <links>
1478                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1479                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1480                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1481                 </links>
1482         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1483             <actions>
1484                 <create permission="ADMIN_SURVEY">
1485                     <context link="survey" field="owner"/>
1486                 </create>
1487                 <retrieve/>
1488                 <update permission="ADMIN_SURVEY">
1489                     <context link="survey" field="owner"/>
1490                 </update>
1491                 <delete permission="ADMIN_SURVEY">
1492                     <context link="survey" field="owner"/>
1493                 </delete>
1494             </actions>
1495         </permacrud>
1496         </class>
1497         <class id="mbts" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction_summary" oils_persist:tablename="money.materialized_billable_xact_summary" reporter:label="Billable Transaction Summary" oils_persist:readonly="true">
1498                 <fields oils_persist:primary="id" oils_persist:sequence="">
1499                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1500                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1501                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1502                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1503                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1504                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1505                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1506                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1507                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1508                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1509                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1510                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1511                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1512                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1513                 </fields>
1514                 <links>
1515                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1516                 </links>
1517         </class>
1518         <class id="mbtslv" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction_summary_location_view" oils_persist:tablename="money.billable_xact_summary_location_view" reporter:label="Billable Transaction Summary with Billing Location" oils_persist:readonly="true" reporter:core="true">
1519                 <fields oils_persist:primary="id" oils_persist:sequence="">
1520                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1521                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1522                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1523                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1524                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1525                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1526                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1527                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1528                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1529                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1530                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1531                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1532                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1533                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1534                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1535                 </fields>
1536                 <links>
1537                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1538                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1539                 </links>
1540         </class>
1541         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1542                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1543                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1544                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1545                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1546                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1547                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1548                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1549                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1550                 </fields>
1551                 <links>
1552                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1553                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1554                 </links>
1555         </class>
1556         <class id="aupr" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_password_reset" oils_persist:tablename="actor.usr_password_reset" reporter:label="User password reset requests">
1557                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
1558                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
1559                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
1560                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1561                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
1562                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
1563                 </fields>
1564                 <links>
1565                         <link field="usr" reltype="has_a" key="id" class="au"/>
1566                 </links>
1567         </class>
1568         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1569                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1570                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1571                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1572                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1573                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1574                 </fields>
1575                 <links>
1576                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1577                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1578                 </links>
1579         </class>
1580         <class id="mafe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::author_field_entry" oils_persist:tablename="metabib.author_field_entry" reporter:label="Author Field Entry">
1581                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1582                         <field name="field" reporter:datatype="link"/>
1583                         <field name="id" reporter:datatype="id" />
1584                         <field name="source" reporter:datatype="link"/>
1585                         <field name="value" reporter:datatype="text"/>
1586                 </fields>
1587                 <links>
1588                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1589                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1590                 </links>
1591         </class>
1592         <class id="aihu" controller="open-ils.cstore" oils_obj:fieldmapper="action::in_house_use" oils_persist:tablename="action.in_house_use" reporter:core="true" reporter:label="In House Use">
1593                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1594                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1595                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1596                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1597                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1598                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1599                 </fields>
1600                 <links>
1601                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1602                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1603                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1604                 </links>
1605         </class>
1606         <class id="ancihu" controller="open-ils.cstore" oils_obj:fieldmapper="action::non_cat_in_house_use" oils_persist:tablename="action.non_cat_in_house_use" reporter:core="true" reporter:label="Non-cataloged In House Use">
1607                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1608                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1609                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1610                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1611                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1612                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1613                 </fields>
1614                 <links>
1615                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1616                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1617                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1618                 </links>
1619         </class>
1620         <class id="atc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::transit_copy" oils_persist:tablename="action.transit_copy" reporter:core="true" reporter:label="Copy Transit">
1621                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
1622                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
1623                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
1624                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
1625                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
1626                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
1627                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
1628                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
1629                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
1630                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
1631                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
1632                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
1633                 </fields>
1634                 <links>
1635                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
1636                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
1637                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
1638                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
1639                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
1640                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1641                 </links>
1642         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1643             <actions>
1644                 <create permission="TRANSIT_COPY" context_field="owner">
1645                     <context link="target_copy" field="circ_lib"/>
1646                 </create>
1647                 <retrieve/>
1648                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
1649                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
1650             </actions>
1651         </permacrud>
1652         </class>
1653         <class id="asvr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_response" oils_persist:tablename="action.survey_response" reporter:label="Survey Response">
1654                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
1655                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
1656                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
1657                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
1658                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
1659                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
1660                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
1661                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1662                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
1663                 </fields>
1664                 <links>
1665                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
1666                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1667                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
1668                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1669                 </links>
1670         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1671             <actions>
1672                 <create permission="ADMIN_SURVEY">
1673                     <context link="survey" field="owner"/>
1674                 </create>
1675                 <retrieve/>
1676                 <update permission="ADMIN_SURVEY">
1677                     <context link="survey" field="owner"/>
1678                 </update>
1679                 <delete permission="ADMIN_SURVEY">
1680                     <context link="survey" field="owner"/>
1681                 </delete>
1682             </actions>
1683         </permacrud>
1684         </class>
1685         <class id="ccbi" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket_item" oils_persist:tablename="container.copy_bucket_item" reporter:label="Copy Bucket Item">
1686                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
1687                         <field name="bucket" />
1688                         <field name="id" reporter:datatype="id" />
1689                         <field name="target_copy" reporter:datatype="link"/>
1690                         <field name="create_time" reporter:datatype="timestamp" />
1691                         <field name="pos" reporter:datatype="int" />
1692                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
1693                 </fields>
1694                 <links>
1695                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1696                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
1697             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
1698                 </links>
1699         </class>
1700         <class id="ccbin" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket_item_note" oils_persist:tablename="container.copy_bucket_item_note" reporter:label="Copy Bucket Item Note">
1701                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
1702                         <field name="id" reporter:datatype="id" />
1703                         <field name="item" reporter:datatype="link"/>
1704                         <field name="note" reporter:datatype="text" />
1705                 </fields>
1706                 <links>
1707                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
1708                 </links>
1709         </class>
1710         <class id="are" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::record_entry" oils_persist:tablename="authority.record_entry" reporter:label="Authority Record Entry">
1711                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
1712                         <field name="active" reporter:datatype="bool"/>
1713                         <field name="create_date" reporter:datatype="timestamp"/>
1714                         <field name="creator" />
1715                         <field name="deleted" reporter:datatype="bool"/>
1716                         <field name="edit_date" reporter:datatype="timestamp"/>
1717                         <field name="editor" />
1718                         <field name="id" reporter:datatype="id" />
1719                         <field name="last_xact_id" />
1720                         <field name="marc" />
1721                         <field name="source" />
1722                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
1723                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
1724                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1725                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
1726                 </fields>
1727                 <links>
1728                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1729                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1730                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1731                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
1732                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
1733                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
1734                 </links>
1735                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1736                         <actions>
1737                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
1738                                 <retrieve/>
1739                                 <update permission="UPDATE_MARC" global_required="true"/>
1740                                 <delete permission="UPDATE_MARC" global_required="true"/>
1741                         </actions>
1742                 </permacrud>
1743         </class>
1744         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
1745                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
1746                         <field name="char_encoding" />
1747                         <field name="id" />
1748                         <field name="record" />
1749                         <field name="record_status" />
1750                 </fields>
1751                 <links>
1752                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
1753                 </links>
1754         </class>
1755         <class id="abl" controller="open-ils.cstore" oils_obj:fieldmapper="authority::bib_linking" oils_persist:tablename="authority.bib_linking" reporter:label="Authority-Bibliographic Record Link">
1756                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
1757                         <field name="id" reporter:datatype="id" />
1758                         <field name="bib" reporter:datatype="link" />
1759                         <field name="authority" reporter:datatype="link" />
1760                 </fields>
1761                 <links>
1762                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
1763                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
1764                 </links>
1765         </class>
1766         <class id="clm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::language_map" oils_persist:tablename="config.language_map" reporter:label="Language Map" oils_persist:field_safe="true">
1767                 <fields oils_persist:primary="code" oils_persist:sequence="">
1768                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1769                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1770                 </fields>
1771                 <links/>
1772         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1773             <actions>
1774                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1775                 <retrieve/>
1776                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1777                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1778             </actions>
1779         </permacrud>
1780         </class>
1781         <class id="mccp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_card_payment" oils_persist:tablename="money.credit_card_payment" reporter:label="Credit Card Payment">
1782                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
1783                         <field name="accepting_usr" />
1784                         <field name="amount" reporter:datatype="money" />
1785                         <field name="amount_collected" reporter:datatype="money" />
1786                         <field name="approval_code" reporter:datatype="text"/>
1787                         <field name="cash_drawer" reporter:datatype="link"/>
1788                         <field name="cc_first_name" reporter:datatype="text"/>
1789                         <field name="cc_last_name" reporter:datatype="text"/>
1790                         <field name="cc_number" reporter:datatype="text"/>
1791                         <field name="cc_order_number" reporter:datatype="text"/>
1792                         <field name="cc_type" reporter:datatype="text"/>
1793                         <field name="cc_processor" reporter:datatype="text"/>
1794                         <field name="expire_month" reporter:datatype="int" />
1795                         <field name="expire_year" reporter:datatype="int" />
1796                         <field name="id" reporter:datatype="id" />
1797                         <field name="note" reporter:datatype="text"/>
1798                         <field name="payment_ts" reporter:datatype="timestamp"/>
1799                         <field name="xact" reporter:datatype="link"/>
1800                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
1801                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
1802                 </fields>
1803                 <links>
1804                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
1805                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
1806                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
1807                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
1808                 </links>
1809         </class>
1810         <class id="cxt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::xml_transform" oils_persist:tablename="config.xml_transform" reporter:label="XML/XSLT Transform Definition">
1811                 <fields oils_persist:primary="name">
1812                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1813                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
1814                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
1815                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
1816                 </fields>
1817                 <links/>
1818         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1819             <actions>
1820                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
1821                 <retrieve/>
1822                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
1823                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
1824             </actions>
1825         </permacrud>
1826         </class>
1827
1828         <class id="cmsa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_search_alias" oils_persist:tablename="config.metabib_search_alias" reporter:label="Metabib Search Alias" oils_persist:field_safe="true">
1829                 <fields oils_persist:primary="alias">
1830                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
1831                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
1832                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
1833                 </fields>
1834                 <links>
1835                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
1836                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1837                 </links>
1838         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1839             <actions>
1840                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
1841                 <retrieve/>
1842                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
1843                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
1844             </actions>
1845         </permacrud>
1846         </class>
1847
1848         <class id="cmc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_class" oils_persist:tablename="config.metabib_class" reporter:label="Metabib Class" oils_persist:field_safe="true">
1849                 <fields oils_persist:primary="name">
1850                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
1851                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1852                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
1853                 </fields>
1854                 <links>
1855                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
1856                 </links>
1857         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1858             <actions>
1859                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
1860                 <retrieve/>
1861                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
1862                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
1863             </actions>
1864         </permacrud>
1865         </class>
1866
1867         <class id="cmf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field" oils_persist:tablename="config.metabib_field" reporter:label="Metabib Field" oils_persist:field_safe="true">
1868                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
1869                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
1870                         <field reporter:label="ID" name="id" reporter:datatype="id" />
1871                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
1872                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1873                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
1874                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
1875                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
1876                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
1877                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
1878                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
1879                 </fields>
1880                 <links>
1881                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
1882                 </links>
1883         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1884             <actions>
1885                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
1886                 <retrieve/>
1887                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
1888                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
1889             </actions>
1890         </permacrud>
1891         </class>
1892         <class id="cbfp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::biblio_fingerprint" oils_persist:tablename="config.biblio_fingerprint" reporter:label="Fingerprint Definition">
1893                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
1894                         <field name="id" reporter:datatype="id" />
1895                         <field name="name" reporter:datatype="text"/>
1896                         <field name="xpath" reporter:datatype="text"/>
1897                         <field name="format" reporter:datatype="link"/>
1898                         <field name="first_word" reporter:datatype="bool" />
1899                 </fields>
1900                 <links/>
1901         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1902             <actions>
1903                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
1904                 <retrieve/>
1905                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
1906                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
1907             </actions>
1908         </permacrud>
1909         </class>
1910         <class id="cam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::audience_map" oils_persist:tablename="config.audience_map" reporter:label="Audience Map" oils_persist:field_safe="true">
1911                 <fields oils_persist:primary="code" oils_persist:sequence="">
1912                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1913                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1914                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1915                 </fields>
1916                 <links/>
1917         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1918             <actions>
1919                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1920                 <retrieve/>
1921                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1922                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1923             </actions>
1924         </permacrud>
1925         </class>
1926         <class id="cifm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::item_form_map" oils_persist:tablename="config.item_form_map" reporter:label="Item Form Map" oils_persist:field_safe="true">
1927                 <fields oils_persist:primary="code" oils_persist:sequence="">
1928                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1929                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1930                 </fields>
1931                 <links/>
1932         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1933             <actions>
1934                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1935                 <retrieve/>
1936                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1937                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1938             </actions>
1939         </permacrud>
1940         </class>
1941     <class id="acnc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_class" oils_persist:tablename="asset.call_number_class" reporter:label="Call number classification scheme">
1942         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
1943             <field reporter:label="Call number class ID" name="id" reporter_datatype="id"/>
1944             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1945             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
1946             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
1947         </fields>
1948         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1949             <actions>
1950                 <retrieve/>
1951             </actions>
1952         </permacrud>
1953     </class>
1954         <class id="acns" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_suffix" oils_persist:tablename="asset.call_number_suffix" reporter:label="Call Number/Volume Suffix">
1955                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
1956                         <field reporter:label="ID" name="id" reporter:datatype="id" />
1957                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1958                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
1959                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1960                 </fields>
1961                 <links>
1962                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1963                 </links>
1964         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1965             <actions>
1966                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
1967                 <retrieve/>
1968                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
1969                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
1970             </actions>
1971         </permacrud>
1972         </class>
1973         <class id="acnp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_prefix" oils_persist:tablename="asset.call_number_prefix" reporter:label="Call Number/Volume Prefix">
1974                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
1975                         <field reporter:label="ID" name="id" reporter:datatype="id" />
1976                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1977                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
1978                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1979                 </fields>
1980                 <links>
1981                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1982                 </links>
1983         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1984             <actions>
1985                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
1986                 <retrieve/>
1987                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
1988                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
1989             </actions>
1990         </permacrud>
1991         </class>
1992         <class id="acn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number" oils_persist:tablename="asset.call_number" reporter:label="Call Number/Volume">
1993                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
1994                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
1995                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
1996                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
1997                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
1998                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
1999                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2000                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2001                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2002                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2003                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2004                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2005                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2006                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2007                         <field reporter:label="Sort Key" name="label_sortkey" reporter:datatype="text"/>
2008                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2009                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2010                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2011                 </fields>
2012                 <links>
2013                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2014                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2015                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2016                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2017                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2018                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2019                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2020                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2021                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2022                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2023                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2024                 </links>
2025         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2026             <actions>
2027                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2028                 <retrieve/>
2029                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2030                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2031             </actions>
2032         </permacrud>
2033         </class>
2034         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2035                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2036                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2037                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2038                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2039                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2040                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2041                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2042                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2043                 </fields>
2044                 <links>
2045                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2046                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2047         </links>
2048         </class>
2049         <class id="auricnm" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri_call_number_map" oils_persist:tablename="asset.uri_call_number_map" reporter:label="Electronic Access URI to Call Number Map">
2050                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2051                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2052                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2053                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2054                 </fields>
2055                 <links>
2056                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2057                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2058                 </links>
2059         </class>
2060         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2061                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2062                         <field name="id" reporter:datatype="id" />
2063                         <field name="value" oils_persist:i18n="true" />
2064                 </fields>
2065                 <links/>
2066         </class>
2067         <class id="mous" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::open_user_summary" oils_persist:tablename="money.open_usr_summary" reporter:label="Open User Summary">
2068                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2069                         <field name="balance_owed" reporter:datatype="money" />
2070                         <field name="total_owed" reporter:datatype="money" />
2071                         <field name="total_paid" reporter:datatype="money" />
2072                         <field name="usr" reporter:datatype="link"/>
2073                 </fields>
2074                 <links>
2075                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2076         </links>
2077         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2078             <actions>
2079                 <retrieve permission="VIEW_USER">
2080                     <context link="usr" field="home_ou"/>
2081                 </retrieve>
2082             </actions>
2083         </permacrud>
2084         </class>
2085         <class id="mct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::collections_tracker" oils_persist:tablename="money.collections_tracker" reporter:label="Collections Tracker">
2086                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2087                         <field name="collector" />
2088                         <field name="enter_time" reporter:datatype="timestamp"/>
2089                         <field name="id" reporter:datatype="id" />
2090                         <field name="location" reporter:datatype="link"/>
2091                         <field name="usr" reporter:datatype="link"/>
2092                 </fields>
2093                 <links>
2094                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2095                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2096                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2097                 </links>
2098         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2099             <actions>
2100                 <create permission="money.collections_tracker.create" context_field="location"/>
2101                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2102                 <delete permission="money.collections_tracker.create" context_field="location"/>
2103             </actions>
2104         </permacrud>
2105         </class>
2106         <class id="bre" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::record_entry" oils_persist:tablename="biblio.record_entry" reporter:core="true" reporter:label="Bibliographic Record">
2107                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2108                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2109                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2110                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2111                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2112                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2113                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2114                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2115                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2116                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2117                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2118                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2119                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2120                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2121                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2122                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2123                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2124                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2125                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2126                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2127                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2128                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2129                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2130                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2131                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2132                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2133                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2134                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2135                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2136                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2137                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2138                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2139                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2140                 </fields>
2141                 <links>
2142                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2143                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2144                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2145                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2146                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2147                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2148                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2149                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2150                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2151                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2152                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2153                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2154                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2155                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
2156                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
2157                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
2158                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
2159                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
2160                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
2161                 </links>
2162         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2163             <actions>
2164                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2165                 <retrieve/>
2166                 <update permission="UPDATE_MARC" global_required="true"/>
2167             </actions>
2168         </permacrud>
2169         </class>
2170         <class id="aouhoo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit::hours_of_operation" oils_persist:tablename="actor.hours_of_operation" reporter:label="Hours of Operation">
2171                 <fields oils_persist:primary="id">
2172                         <field name="dow_0_close" />
2173                         <field name="dow_0_open" />
2174                         <field name="dow_1_close" />
2175                         <field name="dow_1_open" />
2176                         <field name="dow_2_close" />
2177                         <field name="dow_2_open" />
2178                         <field name="dow_3_close" />
2179                         <field name="dow_3_open" />
2180                         <field name="dow_4_close" />
2181                         <field name="dow_4_open" />
2182                         <field name="dow_5_close" />
2183                         <field name="dow_5_open" />
2184                         <field name="dow_6_close" />
2185                         <field name="dow_6_open" />
2186                         <field name="id" reporter:datatype="id" />
2187                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2188                 </fields>
2189                 <links>
2190                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2191                 </links>
2192         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2193             <actions>
2194                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2195                 <retrieve/>
2196                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2197                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2198             </actions>
2199         </permacrud>
2200         </class>
2201         <class id="bmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::monograph_part" oils_persist:tablename="biblio.monograph_part" reporter:label="Monograph Parts" oils_persist:field_safe="true">
2202                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
2203                         <field name="id" reporter:datatype="id" />
2204                         <field name="record" reporter:datatype="link"/>
2205                         <field name="label" reporter:datatype="text"/>
2206                         <field name="label_sortkey" reporter:datatype="text"/>
2207                 </fields>
2208                 <links>
2209                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2210                 </links>
2211         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2212             <actions>
2213                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
2214                 <retrieve/>
2215                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
2216                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
2217             </actions>
2218         </permacrud>
2219         </class>
2220         <class id="acpm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_part_map" oils_persist:tablename="asset.copy_part_map" reporter:label="Copy Monograph Part Map">
2221                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
2222                         <field name="id" reporter:datatype="id" />
2223                         <field name="target_copy" reporter:datatype="link" />
2224                         <field name="part" reporter:datatype="link"/>
2225                 </fields>
2226                 <links>
2227                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2228                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
2229                 </links>
2230         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2231             <actions>
2232                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
2233                 <retrieve/>
2234                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
2235                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
2236             </actions>
2237         </permacrud>
2238         </class>
2239         <class id="aoucd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit::closed_date" oils_persist:tablename="actor.org_unit_closed" reporter:label="Closed Dates">
2240                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
2241                         <field name="close_end" reporter:datatype="timestamp" />
2242                         <field name="close_start" reporter:datatype="timestamp" />
2243                         <field name="id" reporter:datatype="id" />
2244                         <field name="org_unit" reporter:datatype="org_unit"/>
2245                         <field name="reason" reporter:datatype="text"/>
2246                 </fields>
2247                 <links>
2248                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2249                 </links>
2250         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2251             <actions>
2252                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2253                 <retrieve/>
2254                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2255                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2256             </actions>
2257         </permacrud>
2258         </class>
2259         <class id="crcd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::rules::circ_duration" oils_persist:tablename="config.rule_circ_duration" reporter:label="Circulation Duration Rule">
2260                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
2261                         <field name="extended" reporter:datatype="interval"/>
2262                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
2263                         <field name="max_renewals" reporter:datatype="int" />
2264                         <field name="name" reporter:datatype="text"/>
2265                         <field name="normal" reporter:datatype="interval"/>
2266                         <field name="shrt" reporter:datatype="interval"/>
2267                 </fields>
2268                 <links>
2269                 </links>
2270         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2271             <actions>
2272                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2273                 <retrieve/>
2274                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2275                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2276             </actions>
2277         </permacrud>
2278         </class>
2279
2280         <class id="chdd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hard_due_date" oils_persist:tablename="config.hard_due_date" reporter:label="Hard Due Date">
2281                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
2282                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2283                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2284             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
2285                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2286             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
2287                 </fields>
2288                 <links>
2289             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2290                 </links>
2291                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2292             <actions>
2293                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2294                 <retrieve/>
2295                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2296                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2297             </actions>
2298                 </permacrud>
2299         </class>
2300
2301         <class id="chddv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hard_due_date_values" oils_persist:tablename="config.hard_due_date_values" reporter:label="Hard Due Date Values">
2302                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
2303                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2304                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2305                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2306             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
2307                 </fields>
2308                 <links>
2309                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2310                 </links>
2311                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2312             <actions>
2313                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2314                 <retrieve/>
2315                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2316                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2317             </actions>
2318                 </permacrud>
2319         </class>
2320
2321         <class id="mobts" controller="open-ils.cstore" oils_obj:fieldmapper="money::open_billable_transaction_summary" oils_persist:tablename="money.open_billable_xact_summary" reporter:label="Open Billable Transaction Summary">
2322                 <fields oils_persist:primary="id" oils_persist:sequence="">
2323                         <field name="balance_owed" reporter:datatype="money"/>
2324                         <field name="id" reporter:datatype="id" />
2325                         <field name="last_billing_note" reporter:datatype="text"/>
2326                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
2327                         <field name="last_billing_type" reporter:datatype="text"/>
2328                         <field name="last_payment_note" reporter:datatype="text"/>
2329                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
2330                         <field name="last_payment_type" reporter:datatype="text"/>
2331                         <field name="total_owed" reporter:datatype="money"/>
2332                         <field name="total_paid" reporter:datatype="money"/>
2333                         <field name="usr" reporter:datatype="link"/>
2334                         <field name="xact_finish" reporter:datatype="timestamp" />
2335                         <field name="xact_start" reporter:datatype="timestamp" />
2336                         <field name="xact_type" reporter:datatype="text"/>
2337                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
2338                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
2339                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
2340                         <field name="billing_location" reporter:datatype="link"/>
2341                 </fields>
2342                 <links>
2343                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2344                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
2345                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
2346                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
2347                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2348                 </links>
2349         </class>
2350         <class id="au" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
2351                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
2352                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
2353                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
2354                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
2355                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
2356                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
2357                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
2358                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
2359                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2360                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
2361                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
2362                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
2363                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2364                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
2365                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
2366                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
2367                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
2368                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
2369                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
2370                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2371                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
2372                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
2373                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
2374                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
2375                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
2376                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
2377                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
2378                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
2379                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
2380                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
2381                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
2382                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
2383                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
2384                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
2385                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
2386                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
2387                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
2388                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
2389                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
2390                         <field reporter:label="Password" name="passwd"  reporter:datatype="text"/>
2391                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
2392                         <field reporter:label="Prefix" name="prefix"  reporter:datatype="text"/>
2393                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
2394                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
2395                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
2396                         <field reporter:label="Suffix/Title" name="suffix"  reporter:datatype="text"/>
2397                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
2398                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
2399                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
2400                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
2401                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
2402                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
2403                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2404                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2405                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
2406                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
2407                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2408                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2409                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
2410                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
2411                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
2412                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
2413                 </fields>
2414                 <links>
2415                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
2416                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
2417                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
2418                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
2419                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
2420                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
2421                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
2422                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
2423                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
2424                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
2425                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
2426                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
2427                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
2428                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
2429                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
2430                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
2431                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
2432                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
2433                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
2434                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
2435                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
2436                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
2437                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
2438                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
2439                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
2440                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
2441                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
2442                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
2443                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
2444                 </links>
2445         </class>
2446
2447         <class id="csg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::settings_group" oils_persist:tablename="config.settings_group" reporter:label="Settings Group">
2448                 <fields oils_persist:primary="name">
2449                         <field name="name" reporter:datatype="text"/>
2450                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2451                 </fields>
2452                 <links/>
2453                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2454                         <actions>
2455                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2456                                 <retrieve/>
2457                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2458                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2459                         </actions>
2460                 </permacrud>
2461         </class>
2462         <class id="cust" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::usr_setting_type" oils_persist:tablename="config.usr_setting_type" reporter:label="User Setting Type">
2463                 <fields oils_persist:primary="name">
2464                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
2465                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
2466                         <field name="description" reporter:label="Description" reporter:datatype="text"/>
2467                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
2468                         <field name="fm_class" reporter:label="Fielmapper Class" reporter:datatype="text"/>
2469                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
2470                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
2471                 </fields>
2472                 <links>
2473                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
2474                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2475                 </links>
2476                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2477                         <actions>
2478                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2479                                 <retrieve/>
2480                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2481                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2482                         </actions>
2483                 </permacrud>
2484         </class>
2485         <class id="coust" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::org_unit_setting_type" oils_persist:tablename="config.org_unit_setting_type" reporter:label="Organizational Unit Setting Type">
2486                 <fields oils_persist:primary="name">
2487                         <field name="name" reporter:datatype="text"/>
2488                         <field name="label" reporter:datatype="text"/>
2489                         <field name="description" reporter:datatype="text"/>
2490                         <field name="datatype" reporter:datatype="text"/>
2491                         <field name="view_perm" reporter:datatype="link"/>
2492                         <field name="update_perm" reporter:datatype="link"/>
2493                         <field name="fm_class" reporter:datatype="text"/>
2494                         <field name="grp" reporter:datatype="link"/>
2495                 </fields>
2496                 <links>
2497                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
2498                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
2499                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
2500                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2501                 </links>
2502                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2503                         <actions>
2504                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2505                                 <retrieve/>
2506                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2507                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2508                         </actions>
2509                 </permacrud>
2510         </class>
2511         <class id="aous" controller="open-ils.cstore" oils_obj:fieldmapper="actor::org_unit_setting" oils_persist:tablename="actor.org_unit_setting" reporter:label="Organizational Unit Setting">
2512                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
2513                         <field name="id" />
2514                         <field name="name"  reporter:datatype="text"/>
2515                         <field name="org_unit" reporter:datatype="org_unit"/>
2516                         <field name="value"  reporter:datatype="text"/>
2517                 </fields>
2518                 <links>
2519                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2520                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
2521                 </links>
2522         </class>
2523         <class id="acpn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_note" oils_persist:tablename="asset.copy_note" reporter:label="Copy Note">
2524                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
2525                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2526                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
2527                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2528                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
2529                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2530                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
2531                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
2532                 </fields>
2533                 <links>
2534                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
2535                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2536                 </links>
2537         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2538             <actions>
2539                 <create permission="CREATE_COPY_NOTE">
2540                     <context link="owning_copy" field="circ_lib"/>
2541                 </create>
2542                 <retrieve permission="VIEW_COPY_NOTES">
2543                     <context link="owning_copy" field="circ_lib"/>
2544                 </retrieve>
2545                 <update permission="UPDATE_COPY_NOTE">
2546                     <context link="owning_copy" field="circ_lib"/>
2547                 </update>
2548                 <delete permission="DELETE_COPY_NOTE">
2549                     <context link="owning_copy" field="circ_lib"/>
2550                 </delete>
2551             </actions>
2552         </permacrud>
2553         </class>
2554         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
2555                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
2556                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
2557                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
2558                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
2559                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2560                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
2561                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
2562                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
2563                 </fields>
2564                 <links>
2565                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2566                 </links>
2567         </class>
2568         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
2569                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
2570                         <field name="fingerprint"  reporter:datatype="text"/>
2571                         <field name="id" reporter:datatype="id" />
2572                         <field name="master_record" reporter:datatype="link"/>
2573                         <field name="mods"  reporter:datatype="text"/>
2574                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
2575                 </fields>
2576                 <links>
2577                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
2578                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
2579                 </links>
2580         </class>
2581         <class id="cnal" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::net_access_level" oils_persist:tablename="config.net_access_level" reporter:label="Net Access Level">
2582                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
2583                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2584                         <field name="name"  reporter:datatype="text"/>
2585                 </fields>
2586                 <links/>
2587         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2588             <actions>
2589                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
2590                 <retrieve/>
2591                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
2592                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
2593             </actions>
2594         </permacrud>
2595         </class>
2596         <class id="ppl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="permission::perm_list" oils_persist:tablename="permission.perm_list" reporter:label="Permission List">
2597                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
2598                         <field name="code"  reporter:datatype="text"/>
2599                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
2600                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
2601                 </fields>
2602                 <links/>
2603         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2604             <actions>
2605                 <create permission="CREATE_PERM" global_required="true"/>
2606                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
2607                 <update permission="UPDATE_PERM" global_required="true"/>
2608                 <delete permission="DELETE_PERM" global_required="true"/>
2609             </actions>
2610         </permacrud>
2611         </class>
2612         <class id="mmrsm" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord_source_map" oils_persist:tablename="metabib.metarecord_source_map" oils_persist:field_safe="true" reporter:label="Metarecord Source Map">
2613                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
2614                         <field name="id" reporter:datatype="id" />
2615                         <field name="metarecord" reporter:datatype="link"/>
2616                         <field name="source" reporter:datatype="link"/>
2617                 </fields>
2618                 <links>
2619                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2620                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
2621                 </links>
2622         </class>
2623         <class id="mfae" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::facet_entry" oils_persist:tablename="metabib.facet_entry" reporter:label="Combined Facet Entry" oils_persist:readonly="true">
2624                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
2625                         <field name="id" reporter:datatype="id" />
2626                         <field name="field" reporter:datatype="link"/>
2627                         <field name="source" reporter:datatype="link"/>
2628                         <field name="value"  reporter:datatype="text"/>
2629                 </fields>
2630                 <links>
2631                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2632                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2633                 </links>
2634         </class>
2635         <class id="mfe" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::field_entry" reporter:label="Combined Field Entry View" oils_persist:readonly="true">
2636                 <oils_persist:source_definition>
2637                         SELECT * FROM metabib.author_field_entry
2638                                                 UNION ALL
2639                         SELECT * FROM metabib.keyword_field_entry
2640                                                 UNION ALL
2641                         SELECT * FROM metabib.identifier_field_entry
2642                                                 UNION ALL
2643                         SELECT * FROM metabib.title_field_entry
2644                                                 UNION ALL
2645                         SELECT * FROM metabib.subject_field_entry
2646                                                 UNION ALL
2647                         SELECT * FROM metabib.series_field_entry
2648                 </oils_persist:source_definition>
2649                 <fields>
2650                         <field name="field" reporter:datatype="link"/>
2651                         <field name="id" reporter:datatype="id" />
2652                         <field name="source" reporter:datatype="link"/>
2653                         <field name="value"  reporter:datatype="text"/>
2654                 </fields>
2655                 <links>
2656                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2657                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2658                 </links>
2659         </class>
2660         <class id="mkfe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::keyword_field_entry" oils_persist:tablename="metabib.keyword_field_entry" reporter:label="Keyword Field Entry">
2661                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
2662                         <field name="field" reporter:datatype="link"/>
2663                         <field name="id" reporter:datatype="id" />
2664                         <field name="source" reporter:datatype="link"/>
2665                         <field name="value"  reporter:datatype="text"/>
2666                 </fields>
2667                 <links>
2668                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2669                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2670                 </links>
2671         </class>
2672         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
2673                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2674                         <field name="accepting_usr" reporter:datatype="link"/>
2675                         <field name="amount" reporter:datatype="money" />
2676                         <field name="amount_collected" reporter:datatype="money" />
2677                         <field name="cash_drawer" reporter:datatype="link"/>
2678                         <field name="id" reporter:datatype="id" />
2679                         <field name="note"  reporter:datatype="text"/>
2680                         <field name="payment_ts" reporter:datatype="timestamp"/>
2681                         <field name="xact" reporter:datatype="link"/>
2682                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2683                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2684                 </fields>
2685                 <links>
2686                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2687                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2688                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2689                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2690                 </links>
2691         </class>
2692         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
2693                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2694                         <field name="accepting_usr" reporter:datatype="link"/>
2695                         <field name="amount" reporter:datatype="money" />
2696                         <field name="amount_collected" reporter:datatype="money" />
2697                         <field name="id" reporter:datatype="id" />
2698                         <field name="note"  reporter:datatype="text"/>
2699                         <field name="payment_ts" reporter:datatype="timestamp"/>
2700                         <field name="xact" reporter:datatype="link"/>
2701                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2702                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2703                 </fields>
2704                 <links>
2705                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2706                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2707                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2708                 </links>
2709         </class>
2710         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
2711                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
2712                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
2713                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2714                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2715                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
2716                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2717                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2718                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
2719                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2720                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
2721                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2722                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2723                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
2724                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2725                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
2726                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
2727                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
2728                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
2729                 </fields>
2730                 <links>
2731                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2732                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
2733                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
2734                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
2735                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
2736                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
2737                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
2738                 </links>
2739         </class>
2740
2741         <class id="csp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::standing_penalty" oils_persist:tablename="config.standing_penalty" reporter:label="Standing Penalty">
2742                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
2743                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2744                         <field name="name"  reporter:datatype="text"/>
2745                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
2746                         <field name="block_list" reporter:datatype="text"/>
2747                         <field name="org_depth" reporter:datatype="int"/>
2748                 </fields>
2749                 <links/>
2750         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2751             <actions>
2752                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2753                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
2754                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2755                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2756             </actions>
2757         </permacrud>
2758         </class>
2759         <class id="pgpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="permission::grp_penalty_threshold" oils_persist:tablename="permission.grp_penalty_threshold" reporter:label="Group Penalty Threshold">
2760                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
2761                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
2762                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
2763                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
2764                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
2765                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
2766                 </fields>
2767                 <links>
2768                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
2769                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
2770                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2771         </links>
2772         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2773             <actions>
2774                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2775                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2776                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2777                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2778             </actions>
2779         </permacrud>
2780         </class>
2781         <class id="ccs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::copy_status" oils_persist:tablename="config.copy_status" oils_persist:restrict_primary="100" reporter:label="Copy Status" oils_persist:field_safe="true">
2782                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
2783                         <field name="holdable" reporter:datatype="bool"/>
2784                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2785                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2786                         <field name="opac_visible" reporter:datatype="bool"/>
2787             <field name="copy_active" reporter:datatype="bool"/>
2788                 </fields>
2789                 <links/>
2790         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2791             <actions>
2792                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
2793                 <retrieve/>
2794                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
2795                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
2796             </actions>
2797         </permacrud>
2798         </class>
2799         <class id="ausp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::user_standing_penalty" oils_persist:tablename="actor.usr_standing_penalty" oils_persist:restrict_primary="100" reporter:label="User Standing Penalty">
2800                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
2801                         <field name="id" reporter:datatype="id" reporter:label="ID" />
2802                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
2803                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
2804                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
2805                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
2806                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
2807                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
2808                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
2809                 </fields>
2810                 <links>
2811                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2812                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2813                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2814                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
2815                 </links>
2816                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2817                         <actions>
2818                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
2819                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
2820                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
2821                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
2822                         </actions>
2823                 </permacrud>
2824         </class>
2825         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
2826                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
2827                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
2828                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
2829                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
2830                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
2831                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
2832                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
2833                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
2834                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
2835                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
2836                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2837                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
2838                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
2839                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
2840                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
2841                 </fields>
2842                 <links>
2843                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2844                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
2845                 </links>
2846         </class>
2847
2848         <class id="auss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_saved_search" oils_persist:tablename="actor.usr_saved_search" reporter:label="User Saved Search">
2849                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
2850                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2851                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
2852                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2853                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
2854                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
2855                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
2856                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
2857                 </fields>
2858                 <links>
2859                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
2860                 </links>
2861         </class>
2862
2863         <class id="acnn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_note" oils_persist:tablename="asset.call_number_note" reporter:label="Call Number Note">
2864                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
2865                         <field name="call_number" />
2866                         <field name="create_date" reporter:datatype="timestamp"/>
2867                         <field name="creator" reporter:datatype="link"/>
2868                         <field name="id" reporter:datatype="id" />
2869                         <field name="pub" reporter:datatype="bool"/>
2870                         <field name="title"  reporter:datatype="text"/>
2871                         <field name="value"  reporter:datatype="text"/>
2872                 </fields>
2873                 <links>
2874                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2875                 </links>
2876         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2877             <actions>
2878                 <create permission="CREATE_VOLUME_NOTE">
2879                     <context link="call_number" field="owning_lib"/>
2880                 </create>
2881                 <retrieve permission="VIEW_VOLUME_NOTES">
2882                     <context link="call_number" field="owning_lib"/>
2883                 </retrieve>
2884                 <update permission="UPDATE_VOLUME_NOTE">
2885                     <context link="call_number" field="owning_lib"/>
2886                 </update>
2887                 <delete permission="DELETE_VOLUME_NOTE">
2888                     <context link="call_number" field="owning_lib"/>
2889                 </delete>
2890             </actions>
2891         </permacrud>
2892         </class>
2893         <class id="arn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::record_note" oils_persist:tablename="authority.record_note" reporter:label="Authority Record Note">
2894                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
2895                         <field name="create_date" reporter:datatype="timestamp"/>
2896                         <field name="creator" reporter:datatype="link"/>
2897                         <field name="edit_date" reporter:datatype="timestamp"/>
2898                         <field name="editor" reporter:datatype="link"/>
2899                         <field name="id" reporter:datatype="id" />
2900                         <field name="record" reporter:datatype="link"/>
2901                         <field name="value" reporter:datatype="text"/>
2902                 </fields>
2903                 <links>
2904                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2905                 </links>
2906         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2907             <actions>
2908                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2909                 <retrieve/>
2910                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2911                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2912             </actions>
2913         </permacrud>
2914         </class>
2915         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
2916         <oils_persist:source_definition>
2917 SELECT  usr,
2918         SUM(
2919             CASE
2920                 WHEN (
2921                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
2922                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
2923                 ) THEN 1
2924                 ELSE 0
2925             END
2926         ) AS out,
2927
2928         SUM(
2929             CASE
2930                 WHEN (
2931                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
2932                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
2933                 ) THEN 1
2934                 ELSE 0
2935             END
2936         ) AS overdue,
2937
2938         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
2939         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
2940         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
2941   FROM  action.circulation
2942   WHERE checkin_time IS NULL
2943   GROUP BY 1
2944         </oils_persist:source_definition>
2945         <fields oils_persist:primary="usr">
2946             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
2947             <field reporter:label="Out" name="out" reporter:datatype="text"/>
2948             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
2949             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
2950             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
2951             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
2952         </fields>
2953         <links>
2954             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2955         </links>
2956         </class>
2957         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
2958         <oils_persist:source_definition>
2959 SELECT  usr,
2960         ARRAY_TO_STRING(ARRAY_ACCUM(
2961             CASE
2962                 WHEN (
2963                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
2964                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
2965                 ) THEN id
2966                 ELSE 0
2967             END
2968         ),',') AS out,
2969
2970         ARRAY_TO_STRING(ARRAY_ACCUM(
2971             CASE
2972                 WHEN (
2973                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
2974                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
2975                 ) THEN id
2976                 ELSE 0
2977             END
2978         ),',') AS overdue,
2979
2980         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END),',') AS lost,
2981         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END),',') AS claims_returned,
2982         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id ELSE 0 END),',') AS long_overdue
2983   FROM  action.circulation
2984   WHERE checkin_time IS NULL
2985   GROUP BY 1
2986         </oils_persist:source_definition>
2987         <fields oils_persist:primary="usr">
2988             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
2989             <field reporter:label="Out" name="out" reporter:datatype="text"/>
2990             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
2991             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
2992             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
2993             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
2994         </fields>
2995         <links>
2996             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2997         </links>
2998         </class>
2999         <class id="circ" controller="open-ils.cstore" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
3000                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3001                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3002                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3003                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3004                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3005                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3006                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3007                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3008                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3009                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3010                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3011                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3012                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3013                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3014                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3015                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3016                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3017                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3018                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3019                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3020                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3021                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3022                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3023                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3024                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3025                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3026                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3027                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3028                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3029                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3030                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3031                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3032                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3033                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3034                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3035                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3036                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3037                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3038                 </fields>
3039                 <links>
3040                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3041                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3042                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3043                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3044                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3045                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3046                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3047                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3048                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3049                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3050                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3051                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3052                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3053                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3054                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3055                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3056                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3057                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
3058                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3059                 </links>
3060         </class>
3061         <class id="combcirc" controller="open-ils.cstore" oils_obj:fieldmapper="action::all_circulation" oils_persist:tablename="action.all_circulation" reporter:core="true" reporter:label="Combined Aged and Active Circulations" oils_persist:readonly="true">
3062                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3063                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3064                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3065                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3066                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3067                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3068                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3069                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3070                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3071                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3072                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3073                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3074                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3075                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3076                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3077                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3078                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3079                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3080                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3081                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3082                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3083                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3084                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3085                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3086                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3087                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3088                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3089                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3090                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3091                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3092                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3093                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3094                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3095                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3096                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3097                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3098                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3099                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3100                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3101                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3102                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3103                 </fields>
3104                 <links>
3105                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3106                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3107                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3108                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3109                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3110                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3111                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3112                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3113                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3114                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3115                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3116                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3117                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3118                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3119                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3120                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3121                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3122                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3123                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3124                 </links>
3125         </class>
3126         <class id="acirc" controller="open-ils.cstore" oils_obj:fieldmapper="action::aged_circulation" oils_persist:tablename="action.aged_circulation" reporter:core="true" reporter:label="Aged (patronless) Circulation">
3127                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3128                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3129                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3130                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3131                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3132                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3133                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3134                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3135                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3136                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3137                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3138                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3139                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3140                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3141                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3142                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3143                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3144                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3145                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3146                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3147                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3148                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3149                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3150                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3151                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3152                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3153                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3154                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3155                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3156                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3157                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3158                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3159                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3160                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3161                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3162                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3163                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3164                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3165                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3166                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3167                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3168                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3169                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3170                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3171                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3172                 </fields>
3173                 <links>
3174                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3175                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3176                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3177                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3178                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3179                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3180                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3181                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3182                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3183                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3184                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3185                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3186                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3187                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3188                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3189                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3190                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3191                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3192                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3193                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3194                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3195                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
3196                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3197                 </links>
3198         </class>
3199
3200         <class id="brt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource_type" oils_persist:tablename="booking.resource_type" reporter:label="Resource Type">
3201                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
3202                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3203                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
3204                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3205                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3206                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3207                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3208                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
3209                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
3210                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
3211                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
3212                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3213                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3214                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3215                 </fields>
3216                 <links>
3217                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3218                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3219                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
3220                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
3221                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
3222                 </links>
3223                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3224                         <actions>
3225                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
3226                                 <retrieve />
3227                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
3228                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
3229                         </actions>
3230                 </permacrud>
3231         </class>
3232
3233         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
3234                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
3235                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
3236                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3237                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
3238                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
3239                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3240                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3241                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
3242                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
3243                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3244                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3245                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3246                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
3247                 </fields>
3248                 <links>
3249                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3250                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
3251                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
3252                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
3253                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
3254                 </links>
3255                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3256                         <actions>
3257                                 <create permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
3258                                 <retrieve />
3259                                 <update permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
3260                                 <delete permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
3261                         </actions>
3262                 </permacrud>
3263         </class>
3264         
3265         <class id="bra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource_attr" oils_persist:tablename="booking.resource_attr" reporter:label="Resource Attribute">
3266                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
3267                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
3268                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3269                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
3270                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
3271                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
3272                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
3273                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3274                 </fields>
3275                 <links>
3276                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3277                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
3278                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
3279                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
3280                 </links>
3281                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3282                         <actions>
3283                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
3284                                 <retrieve />
3285                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
3286                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
3287                         </actions>
3288                 </permacrud>
3289         </class>
3290         
3291         <class id="brav" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource_attr_value" oils_persist:tablename="booking.resource_attr_value" reporter:label="Resource Attribute Value">
3292                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
3293                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
3294                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3295                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
3296                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
3297                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3298                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3299                 </fields>
3300                 <links>
3301                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3302                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
3303                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
3304                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
3305                 </links>
3306                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3307                         <actions>
3308                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
3309                                 <retrieve />
3310                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
3311                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
3312                         </actions>
3313                 </permacrud>
3314         </class>
3315         
3316         <class id="bram" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource_attr_map" oils_persist:tablename="booking.resource_attr_map" reporter:label="Resource Attribute Map">
3317                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
3318                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
3319                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
3320                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
3321                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
3322                 </fields>
3323                 <links>
3324                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
3325                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
3326                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
3327                 </links>
3328                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3329                         <actions>
3330                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
3331                                 <retrieve />
3332                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
3333                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
3334                         </actions>
3335                 </permacrud>
3336         </class>
3337         
3338         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
3339                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3340                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3341                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3342                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
3343                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
3344                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3345                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3346                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3347                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3348                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3349                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
3350                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
3351                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
3352                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
3353                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
3354                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
3355                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
3356                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
3357                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
3358                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3359                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3360                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3361                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
3362                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
3363                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
3364                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
3365                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
3366                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
3367                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3368                 </fields>
3369                 <links>
3370                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3371                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3372                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3373                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3374                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3375                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
3376                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
3377                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3378                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3379                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
3380                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
3381                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
3382                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
3383                 </links>
3384                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3385                         <actions>
3386                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3387                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3388                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3389                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3390                         </actions>
3391                 </permacrud>
3392         </class>
3393         
3394         <class id="bravm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation_attr_value_map" oils_persist:tablename="booking.reservation_attr_value_map" reporter:label="Reservation Attribute Value Map">
3395                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
3396                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
3397                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
3398                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
3399                 </fields>
3400                 <links>
3401                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3402                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
3403                 </links>
3404                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3405                         <actions>
3406                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3407                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3408                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3409                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3410                         </actions>
3411                 </permacrud>
3412         </class>
3413
3414         <class id="ccnbi" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket_item" oils_persist:tablename="container.call_number_bucket_item" reporter:label="Call Number Bucket Item">
3415                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
3416                         <field name="bucket" reporter:datatype="link"/>
3417                         <field name="id" reporter:datatype="id" />
3418                         <field name="target_call_number" reporter:datatype="link" />
3419                         <field name="create_time" reporter:datatype="timestamp" />
3420                         <field name="pos" reporter:datatype="int" />
3421                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
3422                 </fields>
3423                 <links>
3424                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
3425                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
3426             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
3427                 </links>
3428         </class>
3429         <class id="ccnbin" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket_item_note" oils_persist:tablename="container.call_number_bucket_item_note" reporter:label="Call Number Bucket Item Note">
3430                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
3431                         <field name="id" reporter:datatype="id" />
3432                         <field name="item" reporter:datatype="link"/>
3433                         <field name="note" reporter:datatype="text" />
3434                 </fields>
3435                 <links>
3436                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
3437                 </links>
3438         </class>
3439         <class id="cbreb" controller="open-ils.cstore" oils_obj:fieldmapper="container::biblio_record_entry_bucket" oils_persist:tablename="container.biblio_record_entry_bucket" reporter:label="Bibliographic Record Entry Bucket">
3440                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
3441                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3442                         <field name="btype" reporter:datatype="text"/>
3443                         <field name="id" reporter:datatype="id" />
3444                         <field name="name" reporter:datatype="text"/>
3445                         <field name="owner" reporter:datatype="link"/>
3446                         <field name="pub" reporter:datatype="bool"/>
3447                         <field name="create_time" reporter:datatype="timestamp" />
3448                 </fields>
3449                 <links>
3450                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3451                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
3452                 </links>
3453         </class>
3454         <class id="cbrebn" controller="open-ils.cstore" oils_obj:fieldmapper="container::biblio_record_entry_bucket_note" oils_persist:tablename="container.biblio_record_entry_bucket_note" reporter:label="Bibliographic Record Entry Bucket Note">
3455                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
3456                         <field name="id" reporter:datatype="id" />
3457                         <field name="bucket" reporter:datatype="link"/>
3458                         <field name="note" reporter:datatype="text" />
3459                 </fields>
3460                 <links>
3461                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
3462                 </links>
3463         </class>
3464         <class id="ahcm" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_copy_map" oils_persist:tablename="action.hold_copy_map" reporter:label="Hold Copy Map">
3465                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
3466                         <field name="hold" reporter:datatype="link"/>
3467                         <field name="id" reporter:datatype="id" />
3468                         <field name="target_copy" reporter:datatype="link"/>
3469                 </fields>
3470                 <links>
3471                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3472                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3473                 </links>
3474         </class>
3475         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
3476                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
3477                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
3478                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
3479                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
3480                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
3481                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
3482                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
3483                 </fields>
3484                 <links>
3485                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3486                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
3487                 </links>
3488         </class>
3489         <class id="acpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location" oils_persist:tablename="asset.copy_location" reporter:label="Copy/Shelving Location">
3490                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
3491                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
3492                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
3493                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
3494                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3495                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3496                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
3497                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
3498                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
3499                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3500                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
3501                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
3502                 </fields>
3503                 <links>
3504                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3505                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
3506                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
3507                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
3508                 </links>
3509         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3510             <actions>
3511                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
3512                 <retrieve/>
3513                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
3514                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
3515             </actions>
3516         </permacrud>
3517         </class>
3518
3519     <class id="acplo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location_order" oils_persist:tablename="asset.copy_location_order" reporter:label="Copy/Shelving Location Order">
3520         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
3521             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
3522             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
3523             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
3524             <field reporter:label="Position" name="position" reporter:datatype="int"/>
3525         </fields>
3526         <links>
3527             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3528             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
3529         </links>
3530         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3531             <actions>
3532                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3533                 <retrieve/>
3534                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3535                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3536             </actions>
3537         </permacrud>
3538     </class>
3539
3540         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
3541                 <fields>
3542                         <field name="sre_id" oils_persist:virtual="true" />
3543                         <field name="location" oils_persist:virtual="true" />
3544                         <field name="owning_lib" oils_persist:virtual="true" />
3545                         <field name="basic_holdings" oils_persist:virtual="true" />
3546                         <field name="basic_holdings_add" oils_persist:virtual="true" />
3547                         <field name="supplement_holdings" oils_persist:virtual="true" />
3548                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
3549                         <field name="index_holdings" oils_persist:virtual="true" />
3550                         <field name="index_holdings_add" oils_persist:virtual="true" />
3551                         <field name="online" oils_persist:virtual="true" />
3552                         <field name="missing" oils_persist:virtual="true" />
3553                         <field name="incomplete" oils_persist:virtual="true" />
3554                 </fields>
3555         </class>
3556
3557         <class id="sre" controller="open-ils.pcrud open-ils.cstore" oils_obj:fieldmapper="serial::record_entry" oils_persist:tablename="serial.record_entry" reporter:label="Serial Record Entry">
3558                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
3559                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
3560                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
3561                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3562                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3563                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3564                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
3565                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3566                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3567                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3568                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
3569                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
3570                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
3571                 </fields>
3572                 <links>
3573                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3574                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3575                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3576                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3577                 </links>
3578                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3579                         <actions>
3580                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
3581                                 <retrieve/>
3582                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
3583                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
3584                         </actions>
3585                 </permacrud>
3586         </class>
3587
3588         <class id="scap" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::caption_and_pattern" oils_persist:tablename="serial.caption_and_pattern" reporter:label="Caption and Pattern">
3589                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
3590                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3591                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3592                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
3593                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3594                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3595                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3596                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
3597                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
3598                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
3599                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
3600                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
3601                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
3602                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
3603                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
3604                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
3605                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
3606                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
3607                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
3608                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
3609                 </fields>
3610                 <links>
3611                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3612                 </links>
3613                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3614                         <actions>
3615                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
3616                                         <context link="subscription" field="owning_lib" />
3617                                 </create>
3618                                 <retrieve />
3619                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
3620                                         <context link="subscription" field="owning_lib" />
3621                                 </update>
3622                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
3623                                         <context link="subscription" field="owning_lib" />
3624                                 </delete>
3625                         </actions>
3626                 </permacrud>
3627         </class>
3628
3629         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
3630                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
3631                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3632                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
3633                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3634                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3635                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
3636                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
3637                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
3638                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
3639                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
3640                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3641                 </fields>
3642                 <links>
3643                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3644                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
3645                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
3646                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
3647                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
3648                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
3649                 </links>
3650                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3651                         <actions>
3652                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3653                                 <retrieve />
3654                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3655                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3656                         </actions>
3657                 </permacrud>
3658         </class>
3659
3660         <class id="ssubn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
3661                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
3662                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3663                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3664                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3665                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3666                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3667                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3668                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3669                 </fields>
3670                 <links>
3671                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3672                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3673                 </links>
3674                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3675                 </permacrud>
3676         </class>
3677
3678         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
3679                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
3680                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3681                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
3682                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
3683                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3684                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
3685                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3686                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
3687                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
3688                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
3689                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
3690                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
3691                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
3692                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
3693                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3694                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3695                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3696                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3697                 </fields>
3698                 <links>
3699                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
3700                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3701                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
3702                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
3703                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
3704                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
3705                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
3706                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
3707                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
3708                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
3709                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
3710                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
3711                 </links>
3712                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3713                         <actions>
3714                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3715                                 <retrieve />
3716                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3717                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3718                         </actions>
3719                 </permacrud>
3720         </class>
3721
3722         <class id="sdistn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution_note" oils_persist:tablename="serial.distribution_note" reporter:label="Distribution Note">
3723                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
3724                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3725                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3726                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3727                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3728                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3729                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3730                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3731                 </fields>
3732                 <links>
3733                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3734                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3735                 </links>
3736                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3737                         <actions>
3738                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
3739                                         <context link="distribution" field="holding_lib" />
3740                                 </create>
3741                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
3742                                         <context link="distribution" field="holding_lib" />
3743                                 </retrieve>
3744                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
3745                                         <context link="distribution" field="holding_lib" />
3746                                 </update>
3747                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
3748                                         <context link="distribution" field="holding_lib" />
3749                                 </delete>
3750                         </actions>
3751                 </permacrud>
3752         </class>
3753
3754         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
3755                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
3756                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3757                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3758                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
3759                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
3760                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
3761                 </fields>
3762                 <links>
3763                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3764                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
3765                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
3766                 </links>
3767                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3768                         <actions>
3769                                 <create permission="ADMIN_SERIAL_STREAM">
3770                                         <context link="distribution" field="holding_lib" />
3771                                 </create>
3772                                 <retrieve />
3773                                 <update permission="ADMIN_SERIAL_STREAM">
3774                                         <context link="distribution" field="holding_lib" />
3775                                 </update>
3776                                 <delete permission="ADMIN_SERIAL_STREAM">
3777                                         <context link="distribution" field="holding_lib" />
3778                                 </delete>
3779                         </actions>
3780                 </permacrud>
3781         </class>
3782
3783         <class id="srlu" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::routing_list_user" oils_persist:tablename="serial.routing_list_user" reporter:label="Routing List User">
3784                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
3785                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3786                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
3787                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
3788                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
3789                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
3790                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3791                 </fields>
3792                 <links>
3793                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
3794                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
3795                 </links>
3796                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3797                         <actions>
3798                                 <create permission="ADMIN_SERIAL_STREAM">
3799                                         <context link="stream" jump="distribution" field="holding_lib" />
3800                                 </create>
3801                                 <retrieve permission="RECEIVE_SERIAL">
3802                                         <context link="stream" jump="distribution" field="holding_lib" />
3803                                 </retrieve>
3804                                 <update permission="ADMIN_SERIAL_STREAM">
3805                                         <context link="stream" jump="distribution" field="holding_lib" />
3806                                 </update>
3807                                 <delete permission="ADMIN_SERIAL_STREAM">
3808                                         <context link="stream" jump="distribution" field="holding_lib" />
3809                                 </delete>
3810                         </actions>
3811                 </permacrud>
3812         </class>
3813
3814         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
3815                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
3816                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3817                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3818                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3819                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3820                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
3821                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3822                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
3823                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3824                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
3825                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
3826                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
3827                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
3828                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
3829                 </fields>
3830                 <links>
3831                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3832                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3833                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3834                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
3835                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
3836                 </links>
3837                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3838                         <actions>
3839                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
3840                                         <context link="subscription" field="owning_lib" />
3841                                 </create>
3842                                 <retrieve/>
3843                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
3844                                         <context link="subscription" field="owning_lib" />
3845                                 </update>
3846                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
3847                                         <context link="subscription" field="owning_lib" />
3848                                 </delete>
3849                         </actions>
3850                 </permacrud>
3851         </class>
3852
3853         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
3854                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
3855                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3856                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
3857                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
3858                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3859                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
3860                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
3861                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3862                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
3863                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
3864                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
3865                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3866                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
3867                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3868                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3869                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
3870                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3871                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
3872                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
3873                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
3874                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3875                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3876                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
3877                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
3878                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
3879                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
3880                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
3881                         <field reporter:label="Price" name="price" reporter:datatype="money" />
3882                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
3883                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
3884                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
3885                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
3886                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
3887                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
3888                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
3889                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
3890                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
3891                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3892                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3893                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3894                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
3895                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3896                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3897                 </fields>
3898                 <links>
3899                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
3900                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3901                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3902                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3903                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3904                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
3905                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3906                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
3907                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
3908                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
3909                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
3910                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
3911                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
3912                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
3913                 </links>
3914                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3915                         <actions>
3916                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
3917                                 <retrieve/>
3918                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
3919                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
3920                         </actions>
3921                 </permacrud>
3922         </class>
3923
3924         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
3925                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
3926                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3927                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3928                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3929                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3930                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
3931                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
3932                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
3933                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
3934                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
3935                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
3936                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
3937                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
3938                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3939                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
3940                 </fields>
3941                 <links>
3942                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3943                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3944                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
3945                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
3946                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
3947                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3948                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
3949                 </links>
3950                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3951                         <actions>
3952                                 <create permission="ADMIN_SERIAL_ITEM">
3953                                         <context link="stream" jump="distribution" field="holding_lib" />
3954                                 </create>
3955                                 <retrieve permission="ADMIN_SERIAL_ITEM">
3956                                         <context link="stream" jump="distribution" field="holding_lib" />
3957                                 </retrieve>
3958                                 <update permission="ADMIN_SERIAL_ITEM">
3959                                         <context link="stream" jump="distribution" field="holding_lib" />
3960                                 </update>
3961                                 <delete permission="ADMIN_SERIAL_ITEM">
3962                                         <context link="stream" jump="distribution" field="holding_lib" />
3963                                 </delete>
3964                         </actions>
3965                 </permacrud>
3966         </class>
3967
3968         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
3969                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
3970                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3971                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
3972                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3973                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3974                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3975                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3976                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3977                 </fields>
3978                 <links>
3979                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
3980                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3981                 </links>
3982                 <!-- Not available via PCRUD at this time -->
3983         </class>
3984
3985         <class id="sbsum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::basic_summary" oils_persist:tablename="serial.basic_summary" reporter:label="Basic Issue Summary">
3986                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
3987                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3988                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3989                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
3990                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
3991                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
3992                 </fields>
3993                 <links>
3994                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3995                 </links>
3996                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3997                         <actions>
3998                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
3999                                         <context link="distribution" field="holding_lib" />
4000                                 </create>
4001                                 <retrieve/>
4002                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4003                                         <context link="distribution" field="holding_lib" />
4004                                 </update>
4005                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4006                                         <context link="distribution" field="holding_lib" />
4007                                 </create>
4008                         </actions>
4009                 </permacrud>
4010         </class>
4011
4012         <class id="sssum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::supplement_summary" oils_persist:tablename="serial.supplement_summary" reporter:label="Supplemental Issue Summary">
4013                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
4014                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4015                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4016                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4017                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4018                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4019                 </fields>
4020                 <links>
4021                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4022                 </links>
4023                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4024                         <actions>
4025                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4026                                         <context link="distribution" field="holding_lib" />
4027                                 </create>
4028                                 <retrieve/>
4029                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4030                                         <context link="distribution" field="holding_lib" />
4031                                 </update>
4032                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4033                                         <context link="distribution" field="holding_lib" />
4034                                 </create>
4035                         </actions>
4036                 </permacrud>
4037         </class>
4038
4039         <class id="sisum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::index_summary" oils_persist:tablename="serial.index_summary" reporter:label="Index Issue Summary">
4040                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
4041                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4042                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4043                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4044                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4045                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4046                 </fields>
4047                 <links>
4048                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4049                 </links>
4050                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4051                         <actions>
4052                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4053                                         <context link="distribution" field="holding_lib" />
4054                                 </create>
4055                                 <retrieve/>
4056                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4057                                         <context link="distribution" field="holding_lib" />
4058                                 </update>
4059                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4060                                         <context link="distribution" field="holding_lib" />
4061                                 </create>
4062                         </actions>
4063                 </permacrud>
4064         </class>
4065
4066         <class id="ascecm" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat_entry_copy_map" oils_persist:tablename="asset.stat_cat_entry_copy_map" reporter:label="Statistical Category Entry Copy Map">
4067                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
4068                         <field name="id" reporter:datatype="id" />
4069                         <field name="owning_copy" reporter:datatype="link"/>
4070                         <field name="stat_cat" reporter:datatype="link"/>
4071                         <field name="stat_cat_entry" reporter:datatype="link"/>
4072                 </fields>
4073                 <links>
4074                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4075                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
4076                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4077                 </links>
4078         </class>
4079         <class id="citm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::item_type_map" oils_persist:tablename="config.item_type_map" reporter:label="Item Type Map" oils_persist:field_safe="true">
4080                 <fields oils_persist:primary="code">
4081                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
4082                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4083                 </fields>
4084                 <links/>
4085         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4086             <actions>
4087                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
4088                 <retrieve/>
4089                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
4090                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
4091             </actions>
4092         </permacrud>
4093         </class>
4094         <class id="cblvl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::bib_level_map" oils_persist:tablename="config.bib_level_map" reporter:label="Bib Level Map" oils_persist:field_safe="true">
4095                 <fields oils_persist:primary="code">
4096                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
4097                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4098                 </fields>
4099                 <links/>
4100         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4101             <actions>
4102                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4103                 <retrieve/>
4104                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4105                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4106             </actions>
4107         </permacrud>
4108         </class>
4109         <class id="sra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="search::relevance_adjustment" oils_persist:tablename="search.relevance_adjustment" reporter:label="Relevance Adjustment">
4110                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
4111                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
4112                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
4113                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
4114                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
4115                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
4116                 </fields>
4117                 <links>
4118             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4119         </links>
4120         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4121             <actions>
4122                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4123                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4124                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4125                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4126             </actions>
4127         </permacrud>
4128         </class>
4129         <class id="lasso" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_lasso" oils_persist:tablename="actor.org_lasso" reporter:label="Org Lasso">
4130                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
4131                         <field name="id" reporter:datatype="id" />
4132                         <field name="name" reporter:datatype="text"/>
4133                 </fields>
4134                 <links/>
4135         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4136             <actions>
4137                 <create permission="CREATE_LASSO" global_required="true"/>
4138                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
4139                 <update permission="UPDATE_LASSO" global_required="true"/>
4140                 <delete permission="DELETE_LASSO" global_required="true"/>
4141             </actions>
4142         </permacrud>
4143         </class>
4144         <class id="lmap" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_lasso_map" oils_persist:tablename="actor.org_lasso_map" reporter:label="Org Lasso Map">
4145                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
4146                         <field name="id" reporter:datatype="id" />
4147                         <field name="lasso" reporter:datatype="link"/>
4148                         <field name="org_unit" reporter:datatype="org_unit"/>
4149                 </fields>
4150                 <links>
4151                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
4152                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4153                 </links>
4154         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4155             <actions>
4156                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
4157                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
4158                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
4159                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
4160             </actions>
4161         </permacrud>
4162         </class>
4163         <class id="aoup" controller="open-ils.cstore" oils_obj:fieldmapper="actor::org_unit_proximity" oils_persist:tablename="actor.org_unit_proximity" reporter:label="Org Unit Proximity">
4164                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4165                         <field name="id" reporter:datatype="id" />
4166                         <field name="from_org" reporter:datatype="org_unit"/>
4167                         <field name="to_org" reporter:datatype="org_unit"/>
4168                         <field name="prox" reporter:datatype="int" />
4169                 </fields>
4170                 <links>
4171                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
4172                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
4173                 </links>
4174         </class>
4175         <class id="ssr" controller="open-ils.cstore" oils_obj:fieldmapper="search::search_result" oils_persist:tablename="search.search_result" oils_persist:readonly="true" reporter:label="Search Result">
4176                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4177                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4178                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
4179                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
4180                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
4181                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
4182                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
4183                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
4184                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
4185                 </fields>
4186                 <links/>
4187         </class>
4188         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
4189                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
4190                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
4191                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
4192                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
4193                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
4194                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
4195                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4196                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
4197                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4198                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
4199                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
4200                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
4201                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
4202                 </fields>
4203                 <links>
4204                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4205                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
4206                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
4207                 </links>
4208         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4209             <actions>
4210                 <create permission="ADMIN_SURVEY" context_field="owner"/>
4211                 <retrieve/>
4212                 <update permission="ADMIN_SURVEY" context_field="owner"/>
4213                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
4214             </actions>
4215         </permacrud>
4216         </class>
4217         <class id="aoa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_address" oils_persist:tablename="actor.org_address" reporter:label="Org Address">
4218                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
4219                         <field name="address_type"  reporter:datatype="text"/>
4220                         <field name="city"  reporter:datatype="text"/>
4221                         <field name="country"  reporter:datatype="text"/>
4222                         <field name="county"  reporter:datatype="text"/>
4223                         <field name="id" reporter:datatype="id" />
4224                         <field name="org_unit" reporter:datatype="org_unit"/>
4225                         <field name="post_code"  reporter:datatype="text"/>
4226                         <field name="state"  reporter:datatype="text"/>
4227                         <field name="street1"  reporter:datatype="text"/>
4228                         <field name="street2"  reporter:datatype="text"/>
4229                         <field name="valid" reporter:datatype="bool"/>
4230                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
4231                 </fields>
4232                 <links>
4233                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4234                 </links>
4235         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4236             <actions>
4237                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
4238                 <retrieve/>
4239                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
4240                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
4241             </actions>
4242         </permacrud>
4243         </class>
4244         <class id="ahr" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_request" oils_persist:tablename="action.hold_request" reporter:core="true" reporter:label="Hold Request">
4245                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
4246                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
4247                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
4248                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
4249                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
4250                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4251                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
4252                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
4253                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
4254                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
4255                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
4256                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
4257                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
4258                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
4259                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
4260                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
4261                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
4262                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
4263                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
4264                         <field reporter:label="Item Selection Depth" name="selection_depth" />
4265                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
4266                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
4267                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
4268                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
4269                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
4270                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
4271                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
4272                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
4273                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
4274                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
4275                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
4276                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
4277                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
4278                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
4279                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
4280                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
4281                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
4282                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
4283                 </fields>
4284                 <links>
4285                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
4286                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
4287                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4288                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
4289                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
4290                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4291                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4292                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4293                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
4294                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
4295                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
4296                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
4297                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
4298                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
4299                 </links>
4300         </class>
4301         <class id="ahrn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_request_note" oils_persist:tablename="action.hold_request_note" reporter:label="Hold Request Note">
4302                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
4303                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4304                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
4305                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4306                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
4307                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
4308                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
4309                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
4310                 </fields>
4311                 <links>
4312                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4313                 </links>
4314                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4315                         <actions>
4316                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
4317                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
4318                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
4319                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
4320                         </actions>
4321                 </permacrud>
4322         </class>
4323         <class id="aou" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit" oils_persist:tablename="actor.org_unit" reporter:label="Organizational Unit" oils_persist:field_safe="true">
4324                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
4325                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
4326                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
4327                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
4328                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
4329                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
4330                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
4331                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4332                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
4333                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
4334                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
4335                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
4336                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
4337                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4338                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
4339                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
4340                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
4341                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4342                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
4343                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
4344                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
4345                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
4346                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
4347                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
4348                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
4349                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
4350                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
4351                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4352                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4353                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4354                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
4355                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
4356                 </fields>
4357                 <links>
4358                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
4359                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
4360                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
4361                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
4362                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
4363                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
4364                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
4365                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
4366                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
4367                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
4368                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
4369                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
4370                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
4371                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
4372                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
4373                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
4374                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
4375                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
4376                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
4377                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
4378                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
4379                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
4380                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
4381                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
4382                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
4383                 </links>
4384         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4385             <actions>
4386                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
4387                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT">
4388                     <context field="id"/>
4389                     <context field="parent_ou"/>
4390                                 </retrieve>
4391                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
4392                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
4393             </actions>
4394         </permacrud>
4395         </class>
4396         <class id="ccnb" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket" oils_persist:tablename="container.call_number_bucket" reporter:label="Call Number Bucket">
4397                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
4398                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4399                         <field name="btype" reporter:datatype="text"/>
4400                         <field name="id" reporter:datatype="id" />
4401                         <field name="name"  reporter:datatype="text"/>
4402                         <field name="owner" reporter:datatype="link"/>
4403                         <field name="pub" reporter:datatype="bool"/>
4404                         <field name="create_time" reporter:datatype="timestamp" />
4405                 </fields>
4406                 <links>
4407                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4408                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
4409                 </links>
4410         </class>
4411         <class id="ccnbn" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket_note" oils_persist:tablename="container.call_number_bucket_note" reporter:label="Call Number Bucket Note">
4412                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
4413                         <field name="id" reporter:datatype="id" />
4414                         <field name="bucket" reporter:datatype="link"/>
4415                         <field name="note" reporter:datatype="text" />
4416                 </fields>
4417                 <links>
4418                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4419                 </links>
4420         </class>
4421         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
4422                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
4423                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4424                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4425                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4426                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4427                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4428                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
4429                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
4430                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
4431                 </fields>
4432                 <links>
4433                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4434                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
4435                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
4436                 </links>
4437         </class>
4438         <class id="ac" controller="open-ils.cstore" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
4439                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
4440                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
4441                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4442                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
4443                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4444                 </fields>
4445                 <links>
4446                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4447                 </links>
4448         </class>
4449     <class id="actscsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::stat_cat_sip_fields" oils_persist:tablename="actor.stat_cat_sip_fields" reporter:label="SIP Statistical Category Field Identifier">
4450         <fields oils_persist:primary="field">
4451             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
4452             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
4453             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
4454         </fields>
4455         <links/>
4456         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4457             <actions>
4458                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
4459                 <retrieve />
4460                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
4461                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
4462             </actions>
4463         </permacrud>
4464     </class>
4465         <class id="actsc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::stat_cat" oils_persist:tablename="actor.stat_cat" reporter:label="User Statistical Category">
4466                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
4467                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4468                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4469                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4470                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4471                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4472                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
4473                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
4474                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
4475                 </fields>
4476                 <links>
4477                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4478                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
4479                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
4480                 </links>
4481         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4482             <actions>
4483                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
4484                 <retrieve />
4485                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
4486                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
4487             </actions>
4488         </permacrud>
4489         </class>
4490         <class id="msefe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::series_field_entry" oils_persist:tablename="metabib.series_field_entry" reporter:label="Series Field Entry">
4491                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
4492                         <field name="field" reporter:datatype="link"/>
4493                         <field name="id" reporter:datatype="id" />
4494                         <field name="source" reporter:datatype="link"/>
4495                         <field name="value"  reporter:datatype="text"/>
4496                 </fields>
4497                 <links>
4498                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4499                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4500                 </links>
4501         </class>
4502         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
4503                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
4504                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4505                         <field name="btype" reporter:datatype="text"/>
4506                         <field name="id" reporter:datatype="id" />
4507                         <field name="name"  reporter:datatype="text"/>
4508                         <field name="owner" reporter:datatype="link"/>
4509                         <field name="pub" reporter:datatype="bool"/>
4510                         <field name="create_time" reporter:datatype="timestamp" />
4511                 </fields>
4512                 <links>
4513                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4514                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
4515                 </links>
4516         </class>
4517         <class id="cubn" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket_note" oils_persist:tablename="container.user_bucket_note" reporter:label="User Bucket Note">
4518                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
4519                         <field name="id" reporter:datatype="id" />
4520                         <field name="bucket" reporter:datatype="link"/>
4521                         <field name="note" reporter:datatype="text" />
4522                 </fields>
4523                 <links>
4524                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
4525                 </links>
4526         </class>
4527         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
4528                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4529                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4530                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4531                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4532                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
4533                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
4534                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4535                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
4536                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4537                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4538                 </fields>
4539                 <links>
4540                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4541                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4542                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4543                 </links>
4544         </class>
4545         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
4546                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
4547                         <field name="id" reporter:datatype="id" />
4548                         <field name="ind1" />
4549                         <field name="ind2" />
4550                         <field name="record" />
4551                         <field name="subfield" />
4552                         <field name="tag" />
4553                         <field name="value" />
4554                 </fields>
4555                 <links>
4556                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4557                 </links>
4558         </class>
4559         <class id="cnct" controller="open-ils.cstore" oils_obj:fieldmapper="config::non_cataloged_type" oils_persist:tablename="config.non_cataloged_type" reporter:label="Non-cataloged Type">
4560                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
4561                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
4562                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4563                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
4564                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4565                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
4566                 </fields>
4567                 <links>
4568                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4569                 </links>
4570         </class>
4571         <class id="aout" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit_type" oils_persist:tablename="actor.org_unit_type" reporter:label="Organizational Unit Type" oils_persist:field_safe="true">
4572                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
4573                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
4574                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
4575                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
4576                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
4577                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4578                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4579                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
4580                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
4581                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
4582                 </fields>
4583                 <links>
4584                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
4585                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
4586                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
4587                 </links>
4588         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4589             <actions>
4590                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
4591                 <retrieve/>
4592                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
4593                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
4594             </actions>
4595         </permacrud>
4596         </class>
4597         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
4598                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
4599                         <field name="create_date" reporter:datatype="timestamp"/>
4600                         <field name="creator" reporter:datatype="link"/>
4601                         <field name="edit_date" reporter:datatype="timestamp"/>
4602                         <field name="editor" reporter:datatype="link"/>
4603                         <field name="id" reporter:datatype="id" />
4604                         <field name="pub" reporter:datatype="bool"/>
4605                         <field name="record" reporter:datatype="link"/>
4606                         <field name="value"  reporter:datatype="text"/>
4607                 </fields>
4608                 <links>
4609                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4610                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4611                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4612                 </links>
4613         </class>
4614         <class id="mucs" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_circulation_summary" oils_persist:tablename="money.usr_circulation_summary" reporter:label="User Circulation Summary">
4615                 <fields oils_persist:primary="usr" oils_persist:sequence="">
4616                         <field name="balance_owed" reporter:datatype="money" />
4617                         <field name="total_owed" reporter:datatype="money" />
4618                         <field name="total_paid" reporter:datatype="money" />
4619                         <field name="usr" reporter:datatype="link"/>
4620                 </fields>
4621                 <links>
4622                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4623                 </links>
4624         </class>
4625         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
4626                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4627                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
4628                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4629                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
4630                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4631                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
4632                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
4633                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4634                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4635                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4636                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4637                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4638                 </fields>
4639                 <links>
4640                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4641                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4642                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4643                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4644                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
4645                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4646                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4647                 </links>
4648         </class>
4649         <class id="cbs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::bib_source" oils_persist:tablename="config.bib_source" reporter:label="Bib Source">
4650                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
4651                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
4652                         <field name="quality" reporter:datatype="int" />
4653                         <field name="source" reporter:datatype="text"/>
4654                         <field name="transcendant" reporter:datatype="bool"/>
4655                 </fields>
4656                 <links/>
4657         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4658             <actions>
4659                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
4660                 <retrieve/>
4661                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
4662                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
4663             </actions>
4664         </permacrud>
4665         </class>
4666         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
4667                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4668                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4669                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4670                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4671                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4672                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4673                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
4674                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
4675                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4676                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4677                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4678                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4679                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4680                 </fields>
4681                 <links>
4682                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
4683                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
4684                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4685                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4686                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4687                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4688                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4689                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4690                 </links>
4691         </class>
4692         <class id="actsce" controller="open-ils.cstore" oils_obj:fieldmapper="actor::stat_cat_entry" oils_persist:tablename="actor.stat_cat_entry" reporter:label="User Stat Cat Entry">
4693                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
4694                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
4695                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
4696                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
4697                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
4698                 </fields>
4699                 <links>
4700                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
4701                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4702                 </links>
4703         </class>
4704         <class id="cubi" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket_item" oils_persist:tablename="container.user_bucket_item" reporter:label="User Bucket Item">
4705                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
4706                         <field name="bucket" reporter:datatype="link"/>
4707                         <field name="id" reporter:datatype="id" />
4708                         <field name="target_user" reporter:datatype="link"/>
4709                         <field name="create_time" reporter:datatype="timestamp" />
4710                         <field name="pos" reporter:datatype="int" />
4711                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4712                 </fields>
4713                 <links>
4714                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
4715                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
4716             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
4717                 </links>
4718         </class>
4719         <class id="cubin" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket_item_note" oils_persist:tablename="container.user_bucket_item_note" reporter:label="User Bucket Item Note">
4720                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
4721                         <field name="id" reporter:datatype="id" />
4722                         <field name="item" reporter:datatype="link"/>
4723                         <field name="note" reporter:datatype="text" />
4724                 </fields>
4725                 <links>
4726                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
4727                 </links>
4728         </class>
4729         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
4730                 <fields oils_persist:primary="usr" oils_persist:sequence="">
4731                         <field name="balance_owed" reporter:datatype="money" />
4732                         <field name="total_owed" reporter:datatype="money" />
4733                         <field name="total_paid" reporter:datatype="money" />
4734                         <field name="usr" reporter:datatype="link"/>
4735                 </fields>
4736                 <links>
4737                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4738                 </links>
4739         </class>
4740         <class id="clfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::lit_form_map" oils_persist:tablename="config.lit_form_map" reporter:label="Literary Form" oils_persist:field_safe="true">
4741                 <fields oils_persist:primary="code" oils_persist:sequence="">
4742                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
4743                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4744                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
4745                 </fields>
4746                 <links/>
4747         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4748             <actions>
4749                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4750                 <retrieve/>
4751                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4752                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4753             </actions>
4754         </permacrud>
4755         </class>
4756         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
4757                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4758                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4759                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4760                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4761                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4762                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4763                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4764                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
4765                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4766                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4767                 </fields>
4768                 <links>
4769                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4770                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4771                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4772                 </links>
4773         </class>
4774         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
4775                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4776                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4777                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4778                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4779                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4780                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4781                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4782                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
4783                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4784                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4785                 </fields>
4786                 <links>
4787                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4788                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4789                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4790                 </links>
4791         </class>
4792         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
4793                 <fields oils_persist:primary="id" oils_persist:sequence="">
4794                         <field name="checkin_lib" reporter:datatype="link"/>
4795                         <field name="checkin_staff" reporter:datatype="link"/>
4796                         <field name="checkin_time" reporter:datatype="timestamp"/>
4797                         <field name="circ_lib"  reporter:datatype="org_unit"/>
4798                         <field name="circ_staff" reporter:datatype="link"/>
4799                         <field name="desk_renewal" reporter:datatype="bool"/>
4800                         <field name="due_date" reporter:datatype="timestamp"/>
4801                         <field name="duration" reporter:datatype="interval"/>
4802                         <field name="duration_rule" reporter:datatype="link"/>
4803                         <field name="fine_interval" reporter:datatype="interval"/>
4804                         <field name="id" reporter:datatype="id" />
4805                         <field name="max_fine" reporter:datatype="money" />
4806                         <field name="max_fine_rule" reporter:datatype="link"/>
4807                         <field name="opac_renewal" reporter:datatype="bool"/>
4808                         <field name="phone_renewal" reporter:datatype="bool"/>
4809                         <field name="recurring_fine" reporter:datatype="money" />
4810                         <field name="recurring_fine_rule" reporter:datatype="link"/>
4811                         <field name="renewal_remaining" reporter:datatype="int" />
4812             <field name="grace_period" reporter:datatype="interval" />
4813                         <field name="stop_fines" reporter:datatype="text"/>
4814                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
4815                         <field name="target_copy" reporter:datatype="link"/>
4816                         <field name="usr" reporter:datatype="link"/>
4817                         <field name="xact_finish" reporter:datatype="timestamp" />
4818                         <field name="xact_start" reporter:datatype="timestamp" />
4819                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
4820                 </fields>
4821                 <links>
4822                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
4823                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4824                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4825                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4826                 </links>
4827         </class>
4828         <class id="msfe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::subject_field_entry" oils_persist:tablename="metabib.subject_field_entry" reporter:label="Subject Field Entry">
4829                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
4830                         <field name="field" reporter:datatype="link"/>
4831                         <field name="id" reporter:datatype="id" />
4832                         <field name="source" reporter:datatype="link"/>
4833                         <field name="value" reporter:datatype="text"/>
4834                 </fields>
4835                 <links>
4836                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4837                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4838                 </links>
4839         </class>
4840         <class id="crrf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::rules::recurring_fine" oils_persist:tablename="config.rule_recurring_fine" reporter:label="Recurring Fine Rule">
4841                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
4842                         <field name="high" reporter:datatype="money" />
4843                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
4844                         <field name="low" reporter:datatype="money" />
4845                         <field name="name" reporter:datatype="text"/>
4846                         <field name="normal" reporter:datatype="money" />
4847                         <field name="recurrence_interval" reporter:datatype="interval"/>
4848             <field name="grace_period" reporter:datatype="interval" />
4849                 </fields>
4850                 <links/>
4851         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4852             <actions>
4853                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
4854                 <retrieve/>
4855                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
4856                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
4857             </actions>
4858         </permacrud>
4859         </class>
4860         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
4861                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4862                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4863                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4864                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4865                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
4866                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
4867                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4868                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4869                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4870                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
4871                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4872                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4873                 </fields>
4874                 <links>
4875                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4876                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4877                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4878                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4879                 </links>
4880         </class>
4881         <class id="acp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy" oils_persist:tablename="asset.copy" reporter:core="true" reporter:label="Item">
4882                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4883                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4884                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4885                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4886                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4887                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4888                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4889                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4890                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4891                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4892                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4893                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4894                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4895                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4896                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4897                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4898                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4899                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4900                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4901                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4902                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4903                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4904                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4905                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
4906                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4907                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4908                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4909                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4910                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4911                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4912                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4913                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4914                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4915                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4916                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4917                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4918                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4919                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4920                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4921                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4922                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
4923                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4924                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
4925                 </fields>
4926                 <links>
4927                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4928                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4929                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4930                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4931                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4932                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4933                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4934                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4935                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4936                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4937                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4938                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4939                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4940                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4941                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
4942                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
4943                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
4944                 </links>
4945         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4946             <actions>
4947                 <create permission="CREATE_COPY">
4948                     <context link="call_number" field="owning_lib"/>
4949                 </create>
4950                 <retrieve/>
4951                 <update permission="UPDATE_COPY">
4952                     <context link="call_number" field="owning_lib"/>
4953                 </update>
4954                 <delete permission="DELETE_COPY">
4955                     <context link="call_number" field="owning_lib"/>
4956                 </delete>
4957             </actions>
4958         </permacrud>
4959         </class>
4960
4961         <class id="act" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_template" oils_persist:tablename="asset.copy_template" reporter:label="Asset Copy Template">
4962                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
4963                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
4964                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
4965                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4966                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4967                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4968                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4969                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4970                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
4971                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
4972                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
4973                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4974                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4975                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
4976                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
4977                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
4978                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
4979                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
4980                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4981                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
4982                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
4983                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
4984                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4985                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4986                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
4987                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
4988                 </fields>
4989                 <links>
4990                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4991                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4992                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4993                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4994                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4995                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4996                 </links>
4997                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4998                         <actions>
4999                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5000                                 <retrieve />
5001                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5002                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5003                         </actions>
5004                 </permacrud>
5005         </class>
5006
5007         <class id="crahp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::rules::age_hold_protect" oils_persist:tablename="config.rule_age_hold_protect" reporter:label="Age Hold Protection Rule" oils_persist:field_safe="true">
5008                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
5009                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
5010                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5011                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5012                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
5013                 </fields>
5014                 <links/>
5015         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5016             <actions>
5017                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5018                 <retrieve/>
5019                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5020                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5021             </actions>
5022         </permacrud>
5023         </class>
5024         <class id="crmf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::rules::max_fine" oils_persist:tablename="config.rule_max_fine" reporter:label="Max Fine Rule">
5025                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
5026                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
5027                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5028                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5029                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
5030                 </fields>
5031                 <links/>
5032         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5033             <actions>
5034                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5035                 <retrieve/>
5036                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5037                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5038             </actions>
5039         </permacrud>
5040         </class>
5041         <class id="pgt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="permission::grp_tree" oils_persist:tablename="permission.grp_tree" reporter:label="Permission Group">
5042                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
5043                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5044                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5045                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5046                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5047                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
5048                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
5049                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
5050                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
5051                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
5052                 </fields>
5053                 <links>
5054                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
5055                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
5056                 </links>
5057         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5058             <actions>
5059                 <create permission="CREATE_PERM" global_required="true"/>
5060                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
5061                 <update permission="UPDATE_PERM" global_required="true"/>
5062                 <delete permission="DELETE_PERM" global_required="true"/>
5063             </actions>
5064         </permacrud>
5065         </class>
5066         <class id="asva" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_answer" oils_persist:tablename="action.survey_answer" reporter:label="Survey Answer">
5067                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
5068                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5069                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
5070                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
5071                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
5072                 </fields>
5073                 <links>
5074                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
5075                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
5076                 </links>
5077         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5078             <actions>
5079                 <create permission="ADMIN_SURVEY">
5080                     <context link="question" jump="survey" field="owner"/>
5081                 </create>
5082                 <retrieve/>
5083                 <update permission="ADMIN_SURVEY">
5084                     <context link="question" jump="survey" field="owner"/>
5085                 </update>
5086                 <delete permission="ADMIN_SURVEY">
5087                     <context link="question" jump="survey" field="owner"/>
5088                 </delete>
5089             </actions>
5090         </permacrud>
5091         </class>
5092         <class id="ancc" controller="open-ils.cstore" oils_obj:fieldmapper="action::non_cataloged_circulation" oils_persist:tablename="action.non_cataloged_circulation" reporter:core="true" reporter:label="Non-cataloged Circulation">
5093                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
5094                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5095                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
5096                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
5097                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
5098                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
5099                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
5100                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
5101                 </fields>
5102                 <links>
5103                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
5104                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
5105                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
5106                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5107                 </links>
5108         </class>
5109         <class id="moucs" controller="open-ils.cstore" oils_obj:fieldmapper="money::open_user_circulation_summary" oils_persist:tablename="money.open_usr_circulation_summary" reporter:label="Open User Circulation Summary">
5110                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5111                         <field name="balance_owed" reporter:datatype="money" />
5112                         <field name="total_owed" reporter:datatype="money" />
5113                         <field name="total_paid" reporter:datatype="money" />
5114                         <field name="usr" reporter:datatype="link"/>
5115                 </fields>
5116                 <links>
5117                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5118                 </links>
5119         </class>
5120         <class id="aufh" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_list" oils_persist:tablename="action.unfulfilled_hold_list" reporter:label="Unfulfilled Hold Targets">
5121                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
5122                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
5123                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
5124                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
5125                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5126                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5127                 </fields>
5128                 <links>
5129                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5130                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5131                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5132                 </links>
5133         </class>
5134         <class id="mife" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::identifier_field_entry" oils_persist:tablename="metabib.identifier_field_entry" reporter:label="Identifier Field Entry">
5135                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
5136                         <field name="field" reporter:datatype="link"/>
5137                         <field name="id" reporter:datatype="id" />
5138                         <field name="source" reporter:datatype="link"/>
5139                         <field name="value" reporter:datatype="text"/>
5140                 </fields>
5141                 <links>
5142                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5143                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5144                 </links>
5145         </class>
5146         <class id="mtfe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::title_field_entry" oils_persist:tablename="metabib.title_field_entry" reporter:label="Title Field Entry">
5147                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
5148                         <field name="field" reporter:datatype="link"/>
5149                         <field name="id" reporter:datatype="id" />
5150                         <field name="source" reporter:datatype="link"/>
5151                         <field name="value" reporter:datatype="text"/>
5152                 </fields>
5153                 <links>
5154                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5155                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5156                 </links>
5157         </class>
5158         <class id="actscecm" controller="open-ils.cstore" oils_obj:fieldmapper="actor::stat_cat_entry_user_map" oils_persist:tablename="actor.stat_cat_entry_usr_map"  reporter:label="User Statistical Category Entry">
5159                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
5160                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5161                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
5162                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
5163                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
5164                 </fields>
5165                 <links>
5166                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
5167                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5168                 </links>
5169         </class>
5170         <class id="pgpm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="permission::grp_perm_map" oils_persist:tablename="permission.grp_perm_map" reporter:label="Group Permission Map">
5171                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
5172                         <field name="depth" reporter:datatype="int" />
5173                         <field name="grantable" reporter:datatype="bool"/>
5174                         <field name="grp" reporter:datatype="link"/>
5175                         <field name="id" reporter:datatype="id" />
5176                         <field name="perm" reporter:datatype="link"/>
5177                 </fields>
5178                 <links>
5179                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
5180                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5181                 </links>
5182         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5183             <actions>
5184                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
5185                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
5186                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
5187                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
5188             </actions>
5189         </permacrud>
5190         </class>
5191         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
5192                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
5193                         <field name="items" oils_persist:virtual="true" />
5194                         <field name="btype" reporter:datatype="text"/>
5195                         <field name="id" reporter:datatype="id" />
5196                         <field name="name" reporter:datatype="text"/>
5197                         <field name="owner" reporter:datatype="link"/>
5198                         <field name="pub" reporter:datatype="bool"/>
5199                         <field name="create_time" reporter:datatype="timestamp" />
5200                 </fields>
5201                 <links>
5202                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5203                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
5204                 </links>
5205         </class>
5206         <class id="ccbn" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket_note" oils_persist:tablename="container.copy_bucket_note" reporter:label="Copy Bucket Note">
5207                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
5208                         <field name="id" reporter:datatype="id" />
5209                         <field name="bucket" reporter:datatype="link"/>
5210                         <field name="note" reporter:datatype="text" />
5211                 </fields>
5212                 <links>
5213                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
5214                 </links>
5215         </class>
5216         <class id="puwoum" controller="open-ils.cstore" oils_obj:fieldmapper="permission::usr_work_ou_map" oils_persist:tablename="permission.usr_work_ou_map" reporter:label="User Work Org Unit Map">
5217                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
5218                         <field name="id" reporter:datatype="int" />
5219                         <field name="usr" reporter:datatype="link"/>
5220                         <field name="work_ou" reporter:datatype="link"/>
5221                 </fields>
5222                 <links>
5223                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5224                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
5225                 </links>
5226         </class>
5227         <class id="pupm" controller="open-ils.cstore" oils_obj:fieldmapper="permission::usr_perm_map" oils_persist:tablename="permission.usr_perm_map" reporter:label="User Permission Map">
5228                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
5229                         <field name="depth" reporter:datatype="int"/>
5230                         <field name="grantable" reporter:datatype="bool"/>
5231                         <field name="id" reporter:datatype="id" />
5232                         <field name="perm" reporter:datatype="link"/>
5233                         <field name="usr" reporter:datatype="link"/>
5234                 </fields>
5235                 <links>
5236                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5237                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5238                 </links>
5239         </class>
5240         <class id="puopm" controller="open-ils.cstore" oils_obj:fieldmapper="permission::usr_object_perm_map" oils_persist:tablename="permission.usr_object_perm_map" reporter:label="User Object Permission Map">
5241                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
5242                         <field name="object_id" reporter:datatype="text"/>
5243                         <field name="grantable" reporter:datatype="bool"/>
5244                         <field name="id" reporter:datatype="id" />
5245                         <field name="perm" reporter:datatype="link"/>
5246                         <field name="usr" reporter:datatype="link"/>
5247                         <field name="object_type" reporter:datatype="text"/>
5248                 </fields>
5249                 <links>
5250                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5251                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5252                 </links>
5253         </class>
5254         <class id="mp" controller="open-ils.cstore" oils_obj:fieldmapper="money::payment" oils_persist:tablename="money.payment_view" reporter:core="true" reporter:label="Payments: All">
5255                 <fields oils_persist:primary="id" oils_persist:sequence="">
5256                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5257                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5258                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5259                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5260                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5261                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5262                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5263                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5264                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5265                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5266                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5267                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5268                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5269                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5270                 </fields>
5271                 <links>
5272                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5273                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5274                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5275                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5276                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5277                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5278                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5279                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5280                 </links>
5281         </class>
5282         <class id="mbp" controller="open-ils.cstore" oils_obj:fieldmapper="money::bnm_payment" oils_persist:tablename="money.bnm_payment_view" reporter:core="true" reporter:label="Payments: Brick-and-mortar">
5283                 <fields oils_persist:primary="id" oils_persist:sequence="">
5284                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5285                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5286                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5287                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5288                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5289                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5290                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5291                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5292                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5293                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5294                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5295                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5296                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5297                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5298                 </fields>
5299                 <links>
5300                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5301                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5302                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5303                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5304                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5305                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5306                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5307                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5308                 </links>
5309         </class>
5310         <class id="mndp" controller="open-ils.reporter" oils_obj:fieldmapper="money::non_drawer_payment" oils_persist:tablename="money.non_drawer_payment_view" reporter:core="true" reporter:label="Payments: Non-drawer Staff">
5311                 <fields oils_persist:primary="id" oils_persist:sequence="">
5312                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5313                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5314                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5315                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5316                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5317                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5318                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5319                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5320                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5321                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5322                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5323                 </fields>
5324                 <links>
5325                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5326                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5327                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5328                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5329                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5330                 </links>
5331         </class>
5332         <class id="mdp" controller="open-ils.cstore" oils_obj:fieldmapper="money::desk_payment" oils_persist:tablename="money.desk_payment_view" reporter:core="true" reporter:label="Payments: Desk">
5333                 <fields oils_persist:primary="id" oils_persist:sequence="">
5334                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5335                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5336                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5337                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5338                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5339                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5340                         <field reporter:label="Accepting User" name="accepting_usr" />
5341                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
5342                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5343                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5344                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5345                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5346                 </fields>
5347                 <links>
5348                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5349                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5350                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5351                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5352                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5353                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5354                 </links>
5355         </class>
5356         <class id="cbrebi" controller="open-ils.cstore" oils_obj:fieldmapper="container::biblio_record_entry_bucket_item" oils_persist:tablename="container.biblio_record_entry_bucket_item" reporter:label="Biblio Record Entry Bucket Item">
5357                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
5358                         <field name="bucket" reporter:datatype="link"/>
5359                         <field name="id" reporter:datatype="id" />
5360                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
5361                         <field name="create_time" reporter:datatype="timestamp" />
5362                         <field name="pos" reporter:datatype="int" />
5363                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5364                 </fields>
5365                 <links>
5366                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
5367                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
5368             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
5369                 </links>
5370         </class>
5371         <class id="cbrebin" controller="open-ils.cstore" oils_obj:fieldmapper="container::biblio_record_entry_bucket_item_note" oils_persist:tablename="container.biblio_record_entry_bucket_item_note" reporter:label="Biblio Record Entry Bucket Item Note">
5372                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
5373                         <field name="id" reporter:datatype="id" />
5374                         <field name="item" reporter:datatype="link"/>
5375                         <field name="note" reporter:datatype="text" />
5376                 </fields>
5377                 <links>
5378                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
5379                 </links>
5380         </class>
5381         <class id="asce" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat_entry" oils_persist:tablename="asset.stat_cat_entry" reporter:label="Item Stat Cat Entry">
5382                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
5383                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
5384                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5385                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5386                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
5387                 </fields>
5388                 <links>
5389                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5390                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5391                 </links>
5392         </class>
5393     <class id="ascsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::stat_cat_sip_fields" oils_persist:tablename="asset.stat_cat_sip_fields" reporter:label="SIP Statistical Category Field Identifier">
5394         <fields oils_persist:primary="field">
5395             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5396             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5397             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5398         </fields>
5399         <links/>
5400         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5401             <actions>
5402                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
5403                 <retrieve />
5404                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
5405                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
5406             </actions>
5407         </permacrud>
5408     </class>
5409         <class id="ahrcc" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="action::hold_request_cancel_cause" oils_persist:tablename="action.hold_request_cancel_cause" oils_persist:restrict_primary="100" reporter:label="Hold Request Cancel Cause">
5410                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
5411                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
5412                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5413                 </fields>
5414                 <links/>
5415         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5416             <actions>
5417                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5418                 <retrieve/>
5419                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5420                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5421             </actions>
5422         </permacrud>
5423         </class>
5424
5425
5426         <class id="artc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::reservation_transit_copy" oils_persist:tablename="action.reservation_transit_copy" reporter:core="true" reporter:label="Reservation Transit">
5427                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
5428                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
5429                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
5430                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
5431                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
5432                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
5433                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
5434                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
5435                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
5436                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
5437                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
5438                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
5439                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
5440                 </fields>
5441                 <links>
5442                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
5443                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
5444                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
5445                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
5446                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
5447                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
5448                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
5449                 </links>
5450         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5451             <actions>
5452                 <create permission="TRANSIT_COPY">
5453                     <context link="target_copy" field="owner"/>
5454                 </create>
5455                 <retrieve/>
5456                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
5457                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
5458             </actions>
5459         </permacrud>
5460         </class>
5461         <class id="ahtc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_transit_copy" oils_persist:tablename="action.hold_transit_copy" reporter:core="true" reporter:label="Hold Transit">
5462                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
5463                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
5464                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
5465                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
5466                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
5467                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
5468                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
5469                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
5470                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
5471                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
5472                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
5473                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
5474                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
5475                 </fields>
5476                 <links>
5477                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
5478                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5479                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
5480                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
5481                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
5482                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
5483                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5484                 </links>
5485         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5486             <actions>
5487                 <create permission="TRANSIT_COPY" context_field="owner">
5488                     <context link="target_copy" field="circ_lib"/>
5489                 </create>
5490                 <retrieve/>
5491                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
5492                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
5493             </actions>
5494         </permacrud>
5495         </class>
5496         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
5497                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
5498                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5499                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
5500                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
5501                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
5502                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5503                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
5504                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5505                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
5506                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5507                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
5508                 </fields>
5509                 <links>
5510                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5511                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
5512                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
5513                 </links>
5514         </class>
5515         <class id="pugm" controller="open-ils.cstore" oils_obj:fieldmapper="permission::usr_grp_map" oils_persist:tablename="permission.usr_grp_map" reporter:label="User Group Map">
5516                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
5517                         <field name="grp" />
5518                         <field name="id" reporter:datatype="id" />
5519                         <field name="usr" />
5520                 </fields>
5521                 <links>
5522                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
5523                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5524                 </links>
5525         </class>
5526         <class id="i18n" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::i18n_core" oils_persist:tablename="config.i18n_core" oils_persist:field_safe="true" reporter:label="i18n Core">
5527                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
5528                         <field name="id" reporter:datatype="id" />
5529                         <field name="fq_field" reporter:datatype="text"/>
5530                         <field name="identity_value" reporter:datatype="text"/>
5531                         <field name="translation" reporter:datatype="text"/>
5532                         <field name="string" reporter:datatype="text"/>
5533                 </fields>
5534                 <links>
5535                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
5536                 </links>
5537         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5538             <actions>
5539                 <create permission="CREATE_TRANSLATION" global_required="true"/>
5540                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
5541                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
5542                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
5543             </actions>
5544         </permacrud>
5545         </class>
5546         <class id="fdoc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::idl_field_doc" oils_persist:tablename="config.idl_field_doc" oils_persist:field_safe="true" reporter:label="IDL Field Doc">
5547                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
5548                         <field name="id" reporter:datatype="id" />
5549                         <field name="fm_class" reporter:datatype="text"/>
5550                         <field name="field" reporter:datatype="text"/>
5551                         <field name="owner" reporter:datatype="org_unit"/>
5552                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
5553                 </fields>
5554                 <links>
5555                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5556                 </links>
5557         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5558             <actions>
5559                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5560                 <retrieve/>
5561                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5562                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5563             </actions>
5564         </permacrud>
5565         </class>
5566         <class id="i18n_l" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::i18n_locale" oils_persist:tablename="config.i18n_locale" oils_persist:field_safe="true" reporter:label="Locale">
5567                 <fields oils_persist:primary="code">
5568                         <field name="code" reporter:datatype="id" />
5569                         <field name="marc_code" reporter:datatype="text"/>
5570                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5571                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5572                 </fields>
5573                 <links/>
5574         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5575             <actions>
5576                 <create permission="CREATE_LOCALE" global_required="true"/>
5577                 <retrieve/>
5578                 <update permission="UPDATE_LOCALE" global_required="true"/>
5579                 <delete permission="DELETE_LOCALE" global_required="true"/>
5580             </actions>
5581         </permacrud>
5582         </class>
5583         <class id="cbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::billing_type" oils_persist:tablename="config.billing_type" oils_persist:restrict_primary="100" reporter:label="Billing Type">
5584                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
5585                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
5586                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
5587                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
5588             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
5589                 </fields>
5590                 <links>
5591                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5592                 </links>
5593         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5594             <actions>
5595                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
5596                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
5597                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
5598                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
5599             </actions>
5600         </permacrud>
5601         </class>
5602
5603         <class id="aurt" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::user_request_type" oils_persist:tablename="acq.user_request_type" reporter:label="User Purchase Request Type">
5604                 <fields oils_persist:primary="id">
5605                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
5606                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5607                 </fields>
5608                 <links/>
5609         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5610             <actions>
5611                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5612                 <retrieve/>
5613                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5614                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5615             </actions>
5616         </permacrud>
5617         </class>
5618
5619         <class id="aur" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::user_request" oils_persist:tablename="acq.user_request" reporter:label="User Purchase Request">
5620                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
5621                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
5622                         <field reporter:label="User" name="usr" reporter:datatype="link" />
5623                         <field reporter:label="Request Type" name="request_type" reporter:datatype="link" />
5624                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
5625                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
5626                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
5627                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
5628                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
5629                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
5630                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
5631                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
5632                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
5633                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
5634                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
5635                         <field reporter:label="Title" name="title" reporter:datatype="text" />
5636                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
5637                         <field reporter:label="Author" name="author" reporter:datatype="text" />
5638                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
5639                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
5640                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
5641                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
5642                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
5643                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
5644                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
5645                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5646                 </fields>
5647                 <links>
5648                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5649                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5650                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5651                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
5652                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
5653                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5654                 </links>
5655         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5656             <actions>
5657                 <create permission="user_request.create">
5658                     <context link="usr" field="home_ou"/>
5659                                 </create>
5660                 <retrieve permission="user_request.view">
5661                     <context link="usr" field="home_ou"/>
5662                                 </retrieve>
5663                 <update permission="user_request.update">
5664                     <context link="usr" field="home_ou"/>
5665                                 </update>
5666                 <delete permission="user_request.delete">
5667                     <context link="usr" field="home_ou"/>
5668                                 </delete>
5669             </actions>
5670         </permacrud>
5671         </class>
5672
5673         <class id="acqct" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::currency_type" oils_persist:tablename="acq.currency_type" reporter:label="Currency Type">
5674                 <fields oils_persist:primary="code">
5675                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
5676                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5677                 </fields>
5678                 <links/>
5679         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5680             <actions>
5681                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5682                 <retrieve/>
5683                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5684                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5685             </actions>
5686         </permacrud>
5687         </class>
5688
5689         <class id="acqexr" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::exchange_rate" oils_persist:tablename="acq.exchange_rate" reporter:label="Exchange Rate">
5690                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
5691                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
5692                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
5693                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
5694                         <field reporter:label="Ratio" name="ratio" />
5695                 </fields>
5696                 <links>
5697                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
5698                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
5699                 </links>
5700                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5701                         <actions>
5702                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5703                                 <retrieve/>
5704                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5705                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5706                         </actions>
5707                 </permacrud>
5708         </class>
5709
5710         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
5711                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
5712                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
5713                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
5714                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
5715                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
5716                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5717                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
5718                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
5719                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
5720                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
5721                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
5722                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
5723                         <field reporter:label="URL" name="url" reporter:datatype="text" />
5724                         <field reporter:label="Email" name="email" reporter:datatype="text" />
5725                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
5726                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
5727                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
5728                 </fields>
5729                 <links>
5730                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
5731                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5732             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
5733             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
5734             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
5735                 </links>
5736         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5737             <actions>
5738                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
5739                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
5740                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
5741                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
5742             </actions>
5743         </permacrud>
5744         </class>
5745
5746         <class id="acqpron" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::provider_note" oils_persist:tablename="acq.provider_note" reporter:label="Provider Note">
5747                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
5748                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
5749                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5750                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5751                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5752                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5753                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5754                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
5755                 </fields>
5756                 <links>
5757                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5758                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5759                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5760                 </links>
5761         </class>
5762
5763         <class id="acqipm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_payment_method" oils_persist:tablename="acq.invoice_payment_method" reporter:label="Invoice Payment Method">
5764                 <fields oils_persist:primary="code">
5765                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
5766                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5767                 </fields>
5768                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5769             <actions>
5770                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5771                 <retrieve/>
5772                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5773                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5774             </actions>
5775                 </permacrud>
5776         </class>
5777
5778         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
5779                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
5780                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
5781                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
5782                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5783                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
5784                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
5785                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
5786                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
5787                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
5788                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
5789                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
5790                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5791                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
5792                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
5793                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
5794                 </fields>
5795                 <links>
5796                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
5797                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5798                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
5799                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
5800                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
5801                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
5802                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
5803                 </links>
5804         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5805             <actions>
5806                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
5807                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
5808                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
5809                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
5810             </actions>
5811         </permacrud>
5812         </class>
5813
5814         <class id="acqie" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_entry" oils_persist:tablename="acq.invoice_entry" reporter:label="Invoice Entry">
5815                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
5816                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5817                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
5818                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
5819                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
5820                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
5821                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
5822                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5823                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
5824                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
5825                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
5826                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
5827                 </fields>
5828                 <links>
5829                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
5830                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5831                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5832                 </links>
5833         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5834             <actions>
5835                 <create   permission="ADMIN_INVOICE">
5836                                         <context link="invoice" field="receiver"/>
5837                                 </create>
5838                 <retrieve permission="ADMIN_INVOICE">
5839                                         <context link="invoice" field="receiver"/>
5840                                 </retrieve>
5841                 <update   permission="ADMIN_INVOICE">
5842                                         <context link="invoice" field="receiver"/>
5843                                 </update>
5844                                 <delete   permission="ADMIN_INVOICE">
5845                                         <context link="invoice" field="receiver"/>
5846                                 </delete>
5847             </actions>
5848         </permacrud>
5849         </class>
5850
5851         <class id="acqii" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_item" oils_persist:tablename="acq.invoice_item" reporter:label="Non-bibliographic Invoice Item">
5852                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
5853                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5854                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
5855                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
5856                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
5857                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
5858                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
5859                         <field reporter:label="Author" name="author" reporter:datatype="text" />
5860                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5861                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
5862                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
5863                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
5864                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
5865                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
5866                         <field reporter:label="Target" name="target" reporter:datatype="int" />
5867                 </fields>
5868                 <links>
5869                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
5870                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5871                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
5872                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
5873                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5874                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
5875                 </links>
5876         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5877             <actions>
5878                 <create   permission="ADMIN_INVOICE">
5879                                         <context link="invoice" field="receiver"/>
5880                                 </create>
5881                 <retrieve permission="ADMIN_INVOICE">
5882                                         <context link="invoice" field="receiver"/>
5883                                 </retrieve>
5884                 <update   permission="ADMIN_INVOICE">
5885                                         <context link="invoice" field="receiver"/>
5886                                 </update>
5887                                 <delete   permission="ADMIN_INVOICE">
5888                                         <context link="invoice" field="receiver"/>
5889                                 </delete>
5890             </actions>
5891         </permacrud>
5892         </class>
5893
5894         <class id="acqpa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider_address" oils_persist:tablename="acq.provider_address" reporter:label="Provider Address">
5895                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
5896                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
5897                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
5898                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
5899                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
5900                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5901                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5902                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
5903                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
5904                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
5905                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
5906                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
5907                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
5908                 </fields>
5909                 <links>
5910                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5911                 </links>
5912         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5913             <actions>
5914                 <create permission="ADMIN_PROVIDER">
5915                     <context link="provider" field="owner"/>
5916                 </create>
5917                 <retrieve permission="ADMIN_PROVIDER">
5918                     <context link="provider" field="owner"/>
5919                 </retrieve>
5920                 <update permission="ADMIN_PROVIDER">
5921                     <context link="provider" field="owner"/>
5922                 </update>
5923                 <delete permission="ADMIN_PROVIDER">
5924                     <context link="provider" field="owner"/>
5925                 </delete>
5926             </actions>
5927         </permacrud>
5928         </class>
5929
5930         <class id="acqpc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider_contact" oils_persist:tablename="acq.provider_contact" reporter:label="Provider Contact">
5931                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
5932                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5933                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5934                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5935                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
5936                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
5937                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
5938         </fields>
5939                 <links>
5940                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5941                 </links>
5942         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5943             <actions>
5944                 <create permission="ADMIN_PROVIDER">
5945                     <context link="provider" field="owner"/>
5946                 </create>
5947                 <retrieve permission="ADMIN_PROVIDER">
5948                     <context link="provider" field="owner"/>
5949                 </retrieve>
5950                 <update permission="ADMIN_PROVIDER">
5951                     <context link="provider" field="owner"/>
5952                 </update>
5953                 <delete permission="ADMIN_PROVIDER">
5954                     <context link="provider" field="owner"/>
5955                 </delete>
5956             </actions>
5957         </permacrud>
5958     </class>
5959         <class id="acqpca" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider_contact_address" oils_persist:tablename="acq.provider_contact_address" reporter:label="Provider Contact Address">
5960                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
5961                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
5962                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
5963                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
5964                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
5965                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
5966                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
5967                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
5968                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
5969                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
5970                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
5971                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
5972                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
5973                 </fields>
5974                 <links>
5975                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
5976                 </links>
5977         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5978             <actions>
5979                 <create permission="ADMIN_PROVIDER">
5980                     <context link="contact" jump='provider' field="owner"/>
5981                 </create>
5982                 <retrieve permission="ADMIN_PROVIDER">
5983                     <context link="contact" jump='provider' field="owner"/>
5984                 </retrieve>
5985                 <update permission="ADMIN_PROVIDER">
5986                     <context link="contact" jump='provider' field="owner"/>
5987                 </update>
5988                 <delete permission="ADMIN_PROVIDER">
5989                     <context link="contact" jump='provider' field="owner"/>
5990                 </delete>
5991             </actions>
5992         </permacrud>
5993         </class>
5994
5995         <class id="acqftr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
5996                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
5997                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
5998                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
5999                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
6000                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
6001                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
6002                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
6003                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
6004                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6005                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
6006                 </fields>
6007                 <links>
6008                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
6009                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
6010                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
6011                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
6012                 </links>
6013                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6014                 </permacrud>
6015         </class>
6016
6017         <class id="acqfc" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
6018                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
6019                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
6020                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
6021                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
6022                 </fields>
6023                 <links>
6024             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
6025                 </links>
6026                 <!--
6027                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
6028                         But here's what it should look like if we ever do use pcrud.
6029                 -->
6030                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6031                         <actions>
6032                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6033                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6034                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6035                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6036                         </actions>
6037                 </permacrud>
6038         </class>
6039
6040         <class id="acqfy" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
6041                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
6042                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
6043                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
6044                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
6045                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
6046                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
6047                 </fields>
6048                 <links>
6049                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6050                 </links>
6051                 <!--
6052                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
6053                         But here's what it should look like if we ever do use pcrud.
6054                 -->
6055                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6056                         <actions>
6057                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6058                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6059                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6060                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6061                         </actions>
6062                 </permacrud>
6063         </class>
6064
6065         <class id="acqfs" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::funding_source" oils_persist:tablename="acq.funding_source" reporter:label="Funding Source">
6066                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
6067                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6068                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6069                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
6070                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
6071                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6072                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
6073                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
6074                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
6075                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6076                 </fields>
6077                 <links>
6078                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6079                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6080             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
6081             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
6082                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
6083                 </links>
6084         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6085             <actions>
6086                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6087                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
6088                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6089                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6090             </actions>
6091         </permacrud>
6092         </class>
6093
6094         <class id="acqfscred" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::funding_source_credit" oils_persist:tablename="acq.funding_source_credit" reporter:label="Credit to Funding Source">
6095                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
6096                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
6097                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
6098                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6099                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6100                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
6101                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
6102                 </fields>
6103                 <links>
6104                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6105                 </links>
6106                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6107                         <actions>
6108                                 <create permission="ADMIN_FUNDING_SOURCE">
6109                     <context link="funding_source" field="owner"/>
6110                 </create>
6111                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
6112                     <context link="funding_source" field="owner"/>
6113                 </retrieve>
6114                                 <update permission="ADMIN_FUNDING_SOURCE">
6115                     <context link="funding_source" field="owner"/>
6116                 </update>
6117                                 <delete permission="ADMIN_FUNDING_SOURCE">
6118                     <context link="funding_source" field="owner"/>
6119                 </delete>
6120                         </actions>
6121                 </permacrud>
6122         </class>
6123
6124         <class id="acqofscred" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::ordered_funding_source_credit" oils_persist:tablename="acq.ordered_funding_source_credit" reporter:label="Ordered Funding Source Credit">
6125                 <fields oils_persist:primary="id">
6126                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
6127                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
6128                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
6129                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
6130                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
6131                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6132                 </fields>
6133                 <links>
6134                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6135                 </links>
6136                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6137                 </permacrud>
6138         </class>
6139
6140         <class id="acqfdeb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_debit" oils_persist:tablename="acq.fund_debit" reporter:label="Debit From Fund">
6141                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
6142                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
6143                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6144                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
6145                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
6146                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6147                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
6148                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
6149                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6150                 </fields>
6151                 <links>
6152                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6153                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6154                 </links>
6155                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6156                         <actions>
6157                                 <create permission="ADMIN_ACQ_FUND">
6158                     <context link="fund" field="org"/>
6159                 </create>
6160                                 <retrieve permission="ADMIN_ACQ_FUND">
6161                     <context link="fund" field="org"/>
6162                 </retrieve>
6163                                 <update permission="ADMIN_ACQ_FUND">
6164                     <context link="fund" field="org"/>
6165                 </update>
6166                                 <delete permission="ADMIN_ACQ_FUND">
6167                     <context link="fund" field="org"/>
6168                 </delete>
6169                         </actions>
6170                 </permacrud>
6171         </class>
6172
6173         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
6174                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
6175                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6176                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
6177                         <field reporter:label="Name" name="name" reporter:datatype="text" />
6178                         <field reporter:label="Year" name="year" reporter:datatype="int" />
6179                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
6180                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6181                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
6182                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
6183                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6184                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
6185                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
6186                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
6187                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
6188                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
6189                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
6190                 </fields>
6191                 <links>
6192                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
6193                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6194             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
6195             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
6196             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
6197                 </links>
6198         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6199             <actions>
6200                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
6201                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
6202                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
6203                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
6204             </actions>
6205         </permacrud>
6206         </class>
6207
6208         <class id="acqfat" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_allocation_total" oils_persist:readonly="true" oils_persist:tablename="acq.fund_allocation_total" reporter:label="Fund Allocation Total">
6209                 <fields oils_persist:primary="fund">
6210                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6211                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6212                 </fields>
6213                 <links>
6214                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6215                 </links>
6216         </class>
6217
6218         <class id="acqfdt" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_debit_total" oils_persist:readonly="true" oils_persist:tablename="acq.fund_debit_total" reporter:label="Total Debit from Fund">
6219                 <fields oils_persist:primary="fund">
6220                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6221                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
6222                 </fields>
6223                 <links>
6224                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6225                 </links>
6226         </class>
6227
6228         <class id="acqfet" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_encumbrance_total" oils_persist:readonly="true" oils_persist:tablename="acq.fund_encumbrance_total" reporter:label="Total Fund Encumbrance">
6229                 <fields oils_persist:primary="fund">
6230                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6231                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
6232                 </fields>
6233                 <links>
6234                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6235                 </links>
6236         </class>
6237
6238         <class id="acqfst" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_spent_total" oils_persist:readonly="true" oils_persist:tablename="acq.fund_spent_total" reporter:label="Total Spent from Fund">
6239                 <fields oils_persist:primary="fund">
6240                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6241                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6242                 </fields>
6243                 <links>
6244                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6245                 </links>
6246         </class>
6247
6248         <class id="acqfcb" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_combined_balance" oils_persist:readonly="true" oils_persist:tablename="acq.fund_combined_balance" reporter:label="Fund Combined Balance">
6249                 <fields oils_persist:primary="fund">
6250                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6251                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
6252                 </fields>
6253                 <links>
6254                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6255                 </links>
6256         </class>
6257
6258    <class id="acqafat" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::all_fund_allocation_total" oils_persist:readonly="true" oils_persist:tablename="acq.all_fund_allocation_total" reporter:label="All Fund Allocation Total">
6259         <fields oils_persist:primary="fund">
6260             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6261             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6262         </fields>
6263         <links>
6264             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6265         </links>
6266     </class>
6267
6268    <class id="acqafet" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::all_fund_encumbrance_total" oils_persist:readonly="true" oils_persist:tablename="acq.all_fund_encumbrance_total" reporter:label="All Fund Encumbrance Total">
6269         <fields oils_persist:primary="fund">
6270             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6271             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
6272         </fields>
6273         <links>
6274             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6275         </links>
6276     </class>
6277
6278    <class id="acqafst" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::all_fund_spent_total" oils_persist:readonly="true" oils_persist:tablename="acq.all_fund_spent_total" reporter:label="All Fund Spent Total">
6279         <fields oils_persist:primary="fund">
6280             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6281             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6282         </fields>
6283         <links>
6284             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6285         </links>
6286     </class>
6287
6288    <class id="acqafsb" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::all_fund_spent_balance" oils_persist:readonly="true" oils_persist:tablename="acq.all_fund_spent_balance" reporter:label="All Fund Spent Balance">
6289         <fields oils_persist:primary="fund">
6290             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6291             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
6292         </fields>
6293         <links>
6294             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6295         </links>
6296     </class>
6297
6298    <class id="acqafcb" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::all_fund_combined_balance" oils_persist:readonly="true" oils_persist:tablename="acq.all_fund_combined_balance" reporter:label="All Fund Combined Total">
6299         <fields oils_persist:primary="fund">
6300             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6301             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
6302         </fields>
6303         <links>
6304             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6305         </links>
6306     </class>
6307
6308         <class id="acqfsrcct" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::funding_source_credit_total" oils_persist:readonly="true" oils_persist:tablename="acq.funding_source_credit_total" reporter:label="Total Credit to Funding Source">
6309                 <fields oils_persist:primary="funding_source">
6310                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6311                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
6312                 </fields>
6313                 <links>
6314                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6315                 </links>
6316         </class>
6317
6318         <class id="acqfsrcat" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::funding_source_allocation_total" oils_persist:readonly="true" oils_persist:tablename="acq.funding_source_allocation_total" reporter:label="Total Allocation to Funding Source">
6319                 <fields oils_persist:primary="funding_source">
6320                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6321                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
6322                 </fields>
6323                 <links>
6324                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6325                 </links>
6326         </class>
6327
6328         <class id="acqfsrcb" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::funding_source_balance" oils_persist:readonly="true" oils_persist:tablename="acq.funding_source_balance" reporter:label="Funding Source Balance">
6329                 <fields oils_persist:primary="funding_source">
6330                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6331                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
6332                 </fields>
6333                 <links>
6334                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6335                 </links>
6336         </class>
6337
6338         <class id="acqfsb" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_spent_balance" oils_persist:readonly="true" oils_persist:tablename="acq.fund_spent_balance" reporter:label="Fund Spent Balance">
6339                 <fields oils_persist:primary="fund">
6340                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6341                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
6342                 </fields>
6343                 <links>
6344                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6345                 </links>
6346         </class>
6347
6348         <class id="acqfa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_allocation" oils_persist:tablename="acq.fund_allocation" reporter:label="Fund Allocation">
6349                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
6350                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
6351                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6352                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6353                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6354                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
6355                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6356                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6357                 </fields>
6358                 <links>
6359                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
6360                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6361                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6362                 </links>
6363                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6364                         <actions>
6365                                 <create permission="ADMIN_ACQ_FUND">
6366                     <context link="fund" field="org"/>
6367                 </create>
6368                                 <retrieve permission="ADMIN_ACQ_FUND">
6369                     <context link="fund" field="org"/>
6370                 </retrieve>
6371                                 <update permission="ADMIN_ACQ_FUND">
6372                     <context link="fund" field="org"/>
6373                 </update>
6374                                 <delete permission="ADMIN_ACQ_FUND">
6375                     <context link="fund" field="org"/>
6376                 </delete>
6377                         </actions>
6378                 </permacrud>
6379         </class>
6380
6381     <class id="acqfap" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_allocation_percent" oils_persist:tablename="acq.fund_allocation_percent" reporter:label="Fund Allocation Percent">
6382         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
6383             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
6384             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6385             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
6386             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
6387             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
6388             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
6389             <field reporter:label="Note" name="note" reporter:datatype="text" />
6390             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6391         </fields>
6392         <links>
6393             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
6394             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
6395             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6396         </links>
6397                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6398                         <actions>
6399                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6400                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6401                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6402                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6403                         </actions>
6404                 </permacrud>
6405     </class>
6406
6407         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
6408                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
6409                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
6410                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
6411                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
6412                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6413                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6414                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6415                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
6416                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
6417                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6418                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6419                 </fields>
6420                 <links>
6421                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6422                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6423                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6424                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6425                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
6426                 </links>
6427                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6428                         <actions>
6429                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
6430                         </actions>
6431                 </permacrud>
6432         </class>
6433
6434         <class id="acqcr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::cancel_reason" oils_persist:tablename="acq.cancel_reason" reporter:label="Cancel Reason">
6435                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
6436                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6437                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
6438                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6439                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6440                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
6441                 </fields>
6442                 <links>
6443                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6444                 </links>
6445                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6446                         <actions>
6447                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6448                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
6449                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6450                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6451                         </actions>
6452                 </permacrud>
6453         </class>
6454
6455         <class id="acqpo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::purchase_order" oils_persist:tablename="acq.purchase_order" reporter:label="Purchase Order">
6456                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
6457                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
6458                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
6459                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6460                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6461                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6462                         <field reporter:label="State" name="state" reporter:datatype="text" />
6463                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
6464                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6465                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6466                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
6467                         <field reporter:label="Name" name="name" reporter:datatype="text" />
6468                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6469                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6470                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
6471                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6472                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
6473                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
6474                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
6475                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
6476                 </fields>
6477                 <links>
6478                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6479                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6480                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6481                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
6482                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6483                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
6484                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
6485                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
6486                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
6487                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6488                 </links>
6489                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6490                         <actions>
6491                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6492                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
6493                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6494                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6495                         </actions>
6496                 </permacrud>
6497         </class>
6498
6499         <class id="acqpoh" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::acq_purchase_order_history" oils_persist:tablename="acq.acq_purchase_order_history" reporter:label="Purchase Order History">
6500                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
6501                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
6502                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
6503                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
6504                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
6505                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
6506                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6507                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6508                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
6509                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
6510                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
6511                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6512                         <field reporter:label="State" name="state" reporter:datatype="text"/>
6513                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
6514                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6515                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
6516                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6517                 </fields>
6518                 <links>
6519                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
6520                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6521                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6522                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6523                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
6524                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6525                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6526                 </links>
6527                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6528             <actions>
6529                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
6530             </actions>
6531                 </permacrud>
6532         </class>
6533
6534         <class id="acqpon" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::po_note" oils_persist:tablename="acq.po_note" reporter:label="PO Note">
6535                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
6536                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
6537                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
6538                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6539                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6540                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6541                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6542                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
6543                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
6544                 </fields>
6545                 <links>
6546                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6547                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6548                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6549                 </links>
6550                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6551             <actions>
6552                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6553                     <context link="purchase_order" field="ordering_agency"/>
6554                 </retrieve>
6555                 <create permission="CREATE_PURCHASE_ORDER">
6556                     <context link="purchase_order" field="ordering_agency"/>
6557                 </create>
6558                 <update permission="CREATE_PURCHASE_ORDER">
6559                     <context link="purchase_order" field="ordering_agency"/>
6560                 </update>
6561                 <delete permission="CREATE_PURCHASE_ORDER">
6562                     <context link="purchase_order" field="ordering_agency"/>
6563                 </delete>
6564             </actions>
6565                 </permacrud>
6566         </class>
6567
6568         <class id="acqpoi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::po_item" oils_persist:tablename="acq.po_item" reporter:label="Purchase Order Item">
6569                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
6570                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6571                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6572                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6573                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
6574                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6575                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
6576                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6577                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
6578                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
6579                         <field reporter:label="Target" name="target" reporter:datatype="int" />
6580                 </fields>
6581                 <links>
6582                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6583                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6584                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
6585                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6586                 </links>
6587                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6588             <actions>
6589                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6590                     <context link="purchase_order" field="ordering_agency"/>
6591                 </retrieve>
6592                 <create permission="CREATE_PURCHASE_ORDER">
6593                     <context link="purchase_order" field="ordering_agency"/>
6594                 </create>
6595                 <update permission="CREATE_PURCHASE_ORDER">
6596                     <context link="purchase_order" field="ordering_agency"/>
6597                 </update>
6598                 <delete permission="CREATE_PURCHASE_ORDER">
6599                     <context link="purchase_order" field="ordering_agency"/>
6600                 </delete>
6601             </actions>
6602                 </permacrud>
6603         </class>
6604
6605         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
6606                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
6607                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
6608                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
6609                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
6610                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
6611                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6612                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6613                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6614                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
6615                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
6616                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
6617                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
6618                         <field reporter:label="State" name="state" reporter:datatype="text" />
6619                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6620                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6621                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
6622                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6623                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
6624                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
6625                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
6626                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
6627                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
6628                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
6629                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
6630                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
6631                 </fields>
6632                 <links>
6633                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
6634                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6635                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6636                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6637                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6638                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
6639                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
6640                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
6641                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
6642                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
6643                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6644                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
6645                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
6646                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
6647                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
6648                 </links>
6649                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6650                         <actions>
6651                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
6652                                         <context link="purchase_order" field="ordering_agency"/>
6653                                         <context link="picklist" field="org_unit"/>
6654                                 </retrieve>
6655                         </actions>
6656                 </permacrud>
6657         </class>
6658
6659         <class id="acqlih" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::acq_lineitem_history" oils_persist:tablename="acq.acq_lineitem_history" reporter:label="Line Item History">
6660                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
6661                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
6662                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
6663                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
6664                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
6665                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6666                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6667                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
6668                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6669                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6670                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
6671                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
6672                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
6673                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
6674                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
6675                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
6676                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
6677                         <field reporter:label="State" name="state" reporter:datatype="text"/>
6678                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
6679                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
6680                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
6681                 </fields>
6682                 <links>
6683                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
6684                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6685                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6686                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
6687                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6688                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6689                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
6690                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
6691                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6692                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
6693                 </links>
6694                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6695                         <actions>
6696                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6697                                         <context link="purchase_order" field="ordering_agency"/>
6698                                         <context link="picklist" field="org_unit"/>
6699                                 </retrieve>
6700                         </actions>
6701                 </permacrud>
6702         </class>
6703
6704         <class id="acqliat" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem_alert_text" oils_persist:tablename="acq.lineitem_alert_text" reporter:label="Line Item Alert Text">
6705                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
6706                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
6707                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
6708                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6709                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
6710                 </fields>
6711                 <links>
6712                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6713                 </links>
6714                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6715                         <actions>
6716                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6717                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
6718                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6719                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6720                         </actions>
6721                 </permacrud>
6722         </class>
6723
6724         <class id="acqlin" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_note" oils_persist:tablename="acq.lineitem_note" reporter:label="Line Item Note">
6725                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
6726                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
6727                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
6728                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6729                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6730                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6731                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6732                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
6733                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
6734                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
6735                 </fields>
6736                 <links>
6737                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6738                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6739                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6740                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
6741                 </links>
6742         </class>
6743
6744         <class id="acqlia" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_attr" oils_persist:tablename="acq.lineitem_attr" reporter:label="Line Item Attribute">
6745                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
6746                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
6747                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
6748                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
6749                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
6750                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
6751                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
6752                 </fields>
6753                 <links>
6754                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6755                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
6756                 </links>
6757         </class>
6758
6759         <class id="acqlid" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_detail" oils_persist:tablename="acq.lineitem_detail" reporter:label="Line Item Detail">
6760                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
6761                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
6762                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6763                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
6764                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
6765                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
6766                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
6767                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6768                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
6769                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
6770                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
6771                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
6772                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6773                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
6774                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6775                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
6776                 </fields>
6777                 <links>
6778                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6779                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
6780                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6781                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6782                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6783                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6784                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6785                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6786                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
6787                 </links>
6788         </class>
6789
6790         <class id="acqliad" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem_attr_definition" oils_persist:tablename="acq.lineitem_attr_definition" reporter:label="Line Item Attribute Definition">
6791                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6792                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6793                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6794                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6795                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6796                 </fields>
6797                 <links/>
6798                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6799                         <actions>
6800                                 <retrieve />
6801                         </actions>
6802                 </permacrud>
6803         </class>
6804
6805         <class id="acqlimad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem_marc_attr_definition" oils_persist:tablename="acq.lineitem_marc_attr_definition" reporter:label="Line Item MARC Attribute Definition">
6806                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6807                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6808                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6809                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6810                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
6811                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6812             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
6813                 </fields>
6814                 <links/>
6815         <permacrud>
6816             <actions>
6817                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
6818                 <retrieve />
6819                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
6820                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
6821             </actions>
6822         </permacrud>
6823         </class>
6824
6825         <class id="acqligad" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_generated_attr_definition" oils_persist:tablename="acq.lineitem_generated_attr_definition" reporter:label="Line Item Generated Attribute Definition">
6826                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6827                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6828                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6829                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6830                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
6831                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6832                 </fields>
6833                 <links/>
6834         </class>
6835         <class id="acqliuad" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_usr_attr_definition" oils_persist:tablename="acq.lineitem_usr_attr_definition" reporter:label="Line Item User Attribute Definition">
6836                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6837                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6838                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6839                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6840                         <field reporter:label="User" name="usr" reporter:datatype="link" />
6841                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6842                 </fields>
6843                 <links>
6844                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6845                 </links>
6846         </class>
6847
6848         <class id="acqlipad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem_provider_attr_definition" oils_persist:tablename="acq.lineitem_provider_attr_definition" reporter:label="Line Item Provider Attribute Definition">
6849             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6850                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6851                 <field reporter:label="Code" name="code" reporter:datatype="text" />
6852                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6853                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
6854                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6855                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6856         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
6857
6858             </fields>
6859             <links>
6860                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6861             </links>
6862             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6863                 <actions>
6864                     <create permission="ADMIN_PROVIDER">
6865                         <context link="provider" field="owner"/>
6866                     </create>
6867                     <retrieve permission="ADMIN_PROVIDER">
6868                         <context link="provider" field="owner"/>
6869                     </retrieve>
6870                     <update permission="ADMIN_PROVIDER">
6871                         <context link="provider" field="owner"/>
6872                     </update>
6873                     <delete permission="ADMIN_PROVIDER">
6874                         <context link="provider" field="owner"/>
6875                     </delete>
6876                 </actions>
6877             </permacrud>
6878         </class>
6879         
6880         <class id="acqphsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider_holding_subfield_map" oils_persist:tablename="acq.provider_holding_subfield_map" reporter:label="Provider Holding Subfield Map">
6881             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
6882                 <field reporter:label="ID" name="id" reporter:datatype="id" />
6883                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6884                 <field reporter:label="Name" name="name" reporter:datatype="text" />
6885                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
6886             </fields>
6887             <links>
6888                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6889             </links>
6890             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6891                 <actions>
6892                     <create permission="ADMIN_PROVIDER">
6893                         <context link="provider" field="owner"/>
6894                     </create>
6895                     <retrieve permission="ADMIN_PROVIDER">
6896                         <context link="provider" field="owner"/>
6897                     </retrieve>
6898                     <update permission="ADMIN_PROVIDER">
6899                         <context link="provider" field="owner"/>
6900                     </update>
6901                     <delete permission="ADMIN_PROVIDER">
6902                         <context link="provider" field="owner"/>
6903                     </delete>
6904                 </actions>
6905             </permacrud>
6906         </class>
6907         
6908         <class id="acqlilad" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_local_attr_definition" oils_persist:tablename="acq.lineitem_local_attr_definition" reporter:label="Line Item Local Attribute Definition">
6909             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6910                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6911                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6912                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6913                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6914                 </fields>
6915                 <links/>
6916         </class>
6917
6918         <class id="acqedi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::edi_account" oils_persist:tablename="acq.edi_account" reporter:label="EDI Account">
6919                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
6920                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
6921                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
6922                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
6923                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
6924                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
6925                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
6926                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
6927                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
6928                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
6929                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
6930                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
6931                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
6932                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
6933                 </fields>
6934                 <links>
6935                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6936                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6937                 </links>
6938         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6939             <actions>
6940                 <create permission="ADMIN_PROVIDER">
6941                     <context link="provider" field="owner"/>
6942                 </create>
6943                 <retrieve permission="ADMIN_PROVIDER">
6944                     <context link="provider" field="owner"/>
6945                 </retrieve>
6946                 <update permission="ADMIN_PROVIDER">
6947                     <context link="provider" field="owner"/>
6948                 </update>
6949                 <delete permission="ADMIN_PROVIDER">
6950                     <context link="provider" field="owner"/>
6951                 </delete>
6952             </actions>
6953         </permacrud>
6954         </class>
6955
6956         <class id="acqedim" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::edi_message" oils_persist:tablename="acq.edi_message" reporter:label="EDI Message">
6957                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
6958                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
6959                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
6960                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
6961                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
6962                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
6963                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
6964                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
6965                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
6966                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
6967                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
6968                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
6969                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
6970                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
6971                 </fields>
6972                 <links>
6973                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
6974                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6975                 </links>
6976         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6977             <actions>
6978                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
6979                     <context link="account" jump="provider" field="owner"/>
6980                 </retrieve>
6981                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
6982                     <context link="account" jump="provider" field="owner"/>
6983                 </update>
6984                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
6985                     <context link="account" jump="provider" field="owner"/>
6986                 </delete>
6987             </actions>
6988         </permacrud>
6989         </class>
6990
6991
6992         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
6993                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
6994                         <field name="id" reporter:datatype="id" />
6995                         <field name="parent" reporter:datatype="link"/>
6996                         <field name="owner" reporter:datatype="link"/>
6997                         <field name="create_time" reporter:datatype="timestamp"/>
6998                         <field name="name" reporter:datatype="text"/>
6999                         <field name="shared" reporter:datatype="bool"/>
7000                         <field name="share_with" reporter:datatype="link"/>
7001                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7002                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
7003                 </fields>
7004                 <links>
7005                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7006                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
7007                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
7008                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7009                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
7010                 </links>
7011         </class>
7012         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
7013                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
7014                         <field name="id" reporter:datatype="id" />
7015                         <field name="parent" reporter:datatype="link"/>
7016                         <field name="owner" reporter:datatype="link"/>
7017                         <field name="create_time" reporter:datatype="timestamp"/>
7018                         <field name="name" reporter:datatype="text"/>
7019                         <field name="shared" reporter:datatype="bool"/>
7020                         <field name="share_with" reporter:datatype="link"/>
7021                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7022                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
7023                 </fields>
7024                 <links>
7025                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7026                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
7027                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
7028                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7029                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
7030                 </links>
7031         </class>
7032         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
7033                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
7034                         <field name="id" reporter:datatype="id" />
7035                         <field name="parent" reporter:datatype="link"/>
7036                         <field name="owner" reporter:datatype="link"/>
7037                         <field name="create_time" reporter:datatype="timestamp"/>
7038                         <field name="name" reporter:datatype="text"/>
7039                         <field name="shared" reporter:datatype="bool"/>
7040                         <field name="share_with" reporter:datatype="link"/>
7041                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7042                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
7043                 </fields>
7044                 <links>
7045                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7046                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
7047                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
7048                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7049                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
7050                 </links>
7051         </class>
7052         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
7053                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
7054                         <field name="id" reporter:datatype="id" />
7055                         <field name="owner" reporter:datatype="link"/>
7056                         <field name="create_time" reporter:datatype="timestamp"/>
7057                         <field name="name" reporter:datatype="text"/>
7058                         <field name="data" reporter:datatype="text"/>
7059                         <field name="folder" reporter:datatype="link"/>
7060                         <field name="description" reporter:datatype="text"/>
7061                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
7062                 </fields>
7063                 <links>
7064                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7065                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
7066                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
7067                 </links>
7068         </class>
7069         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
7070                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
7071                         <field name="id" reporter:datatype="id" />
7072                         <field name="owner" reporter:datatype="link"/>
7073                         <field name="create_time" reporter:datatype="timestamp"/>
7074                         <field name="template" reporter:datatype="link"/>
7075                         <field name="data" reporter:datatype="text"/>
7076                         <field name="folder" reporter:datatype="link"/>
7077                         <field name="recur" reporter:datatype="bool"/>
7078                         <field name="recurrence" reporter:datatype="interval"/>
7079                         <field name="name" reporter:datatype="text"/>
7080                         <field name="description" reporter:datatype="text"/>
7081                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
7082                 </fields>
7083                 <links>
7084                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7085                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
7086                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
7087                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
7088                 </links>
7089         </class>
7090         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
7091                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
7092                         <field name="id" reporter:datatype="id" />
7093                         <field name="runner" reporter:datatype="link"/>
7094                         <field name="start_time" reporter:datatype="timestamp"/>
7095                         <field name="complete_time" reporter:datatype="timestamp"/>
7096                         <field name="run_time" reporter:datatype="timestamp"/>
7097                         <field name="email" reporter:datatype="text"/>
7098                         <field name="excel_format" reporter:datatype="bool"/>
7099                         <field name="csv_format" reporter:datatype="bool"/>
7100                         <field name="html_format" reporter:datatype="bool"/>
7101                         <field name="error_code" reporter:datatype="int"/>
7102                         <field name="error_text" reporter:datatype="text"/>
7103                         <field name="report" reporter:datatype="link"/>
7104                         <field name="folder" reporter:datatype="link"/>
7105                         <field name="chart_pie" reporter:datatype="bool"/>
7106                         <field name="chart_bar" reporter:datatype="bool"/>
7107                         <field name="chart_line" reporter:datatype="bool"/>
7108                 </fields>
7109                 <links>
7110                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
7111                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
7112                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
7113                 </links>
7114         </class>
7115         <class id="rmsr" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::materialized_simple_record" oils_persist:tablename="reporter.materialized_simple_record" reporter:label="Fast Simple Record Extracts">
7116                 <fields oils_persist:primary="id">
7117                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7118                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7119                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7120                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7121                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7122                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7123                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7124                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7125                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7126                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7127                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7128                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7129                 </fields>
7130                 <links>
7131                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7132                 </links>
7133         </class>
7134         <class id="rssr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::super_simple_record" oils_persist:tablename="reporter.super_simple_record" reporter:label="Simple Record Extracts">
7135                 <fields oils_persist:primary="id">
7136                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7137                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7138                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7139                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7140                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7141                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7142                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7143                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7144                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7145                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7146                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7147                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7148                 </fields>
7149                 <links>
7150                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7151                 </links>
7152         </class>
7153         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
7154                 <fields oils_persist:primary="id">
7155                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7156                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
7157                         <field reporter:label="Fingerprint" name="fingerprint" />
7158                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7159                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7160                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7161                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7162                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
7163                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7164                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7165                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7166                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
7167                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
7168                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
7169                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7170                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7171                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
7172                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
7173                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
7174                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
7175                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
7176                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
7177                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7178                 </fields>
7179                 <links>
7180                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
7181                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7182                 </links>
7183         </class>
7184         <class id="rud" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::user_demographic" oils_persist:tablename="reporter.demographic" reporter:label="User Demographics">
7185                 <fields oils_persist:primary="id">
7186                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
7187                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
7188                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
7189                 </fields>
7190                 <links>
7191                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
7192                 </links>
7193         </class>
7194         <class id="rcirct" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::circulation_type" oils_persist:tablename="reporter.circ_type" reporter:label="Circulation Type">
7195                 <fields oils_persist:primary="id">
7196                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
7197                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
7198                 </fields>
7199                 <links>
7200                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
7201                 </links>
7202         </class>
7203         <class id="rhrr" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::hold_request_record" oils_persist:tablename="reporter.hold_request_record" reporter:label="Hold Request Record">
7204                 <fields oils_persist:primary="id">
7205                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
7206                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
7207                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
7208                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
7209                 </fields>
7210                 <links>
7211                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
7212                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
7213                 </links>
7214         </class>
7215         <class id="rxbt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::xact_billing_totals" oils_persist:tablename="reporter.xact_billing_totals" reporter:label="Transaction Billing Totals">
7216                 <fields oils_persist:primary="xact">
7217                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7218                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
7219                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
7220                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
7221                 </fields>
7222                 <links>
7223                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7224                 </links>
7225         </class>
7226         <class id="rxpt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::xact_paid_totals" oils_persist:tablename="reporter.xact_paid_totals" reporter:label="Transaction Paid Totals">
7227                 <fields oils_persist:primary="xact">
7228                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7229                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
7230                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
7231                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
7232                 </fields>
7233                 <links>
7234                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7235                 </links>
7236         </class>
7237         <class id="ergbhu" controller="open-ils.reporter-store" oils_obj:fieldmapper="extend_reporter::global_bibs_by_holding_update" oils_persist:tablename="extend_reporter.global_bibs_by_holding_update" reporter:label="Bib IDs by Holding Add/Delete Time (OCLC batch update)">
7238                 <fields oils_persist:primary="id">
7239                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
7240                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
7241                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
7242                 </fields>
7243                 <links>
7244                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
7245                 </links>
7246         </class>
7247         <class id="erfcc" controller="open-ils.reporter-store" oils_obj:fieldmapper="extend_reporter::full_circ_count" oils_persist:tablename="extend_reporter.full_circ_count" reporter:label="Total Circulation Count, Including Legacy">
7248                 <fields oils_persist:primary="id">
7249                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
7250                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
7251                 </fields>
7252                 <links>
7253                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
7254                 </links>
7255         </class>
7256         <class id="acqdf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::distribution_formula" oils_persist:tablename="acq.distribution_formula" reporter:label="Distribution Formula">
7257                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
7258                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
7259                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
7260                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
7261                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
7262                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
7263                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
7264                 </fields>
7265                 <links>
7266                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7267                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
7268                 </links>
7269                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7270                         <actions>
7271                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7272                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7273                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7274                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7275                         </actions>
7276                 </permacrud>
7277         </class>
7278         <class id="acqdfe" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::distribution_formula_entry" oils_persist:tablename="acq.distribution_formula_entry" reporter:label="Distribution Formula Entry">
7279                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
7280                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
7281                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
7282                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
7283                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
7284                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7285                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
7286                 </fields>
7287                 <links>
7288                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
7289                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7290                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7291                 </links>
7292                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7293                         <actions>
7294                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
7295                                         <context link="formula" field="owner"/>
7296                                 </create>
7297                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
7298                                         <context link="formula" field="owner"/>
7299                                 </retrieve>
7300                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
7301                                         <context link="formula" field="owner"/>
7302                                 </update>
7303                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
7304                                         <context link="formula" field="owner"/>
7305                                 </delete>
7306                         </actions>
7307                 </permacrud>
7308         </class>
7309
7310         <class id="acqdfa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::distribution_formula_application" oils_persist:tablename="acq.distribution_formula_application" reporter:label="Distribution Formula Application">
7311                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
7312                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7313                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7314                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7315                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
7316                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
7317                 </fields>
7318                 <links>
7319                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7320                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
7321                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7322                 </links>
7323                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7324                         <actions>
7325                                 <create permission="CREATE_PURCHASE_ORDER">
7326                                         <context link="formula" field="owner"/>
7327                 </create>
7328                                 <retrieve permission="CREATE_PURCHASE_ORDER">
7329                                         <context link="formula" field="owner"/>
7330                 </retrieve>
7331                                 <update permission="CREATE_PURCHASE_ORDER">
7332                                         <context link="formula" field="owner"/>
7333                 </update>
7334                                 <delete permission="CREATE_PURCHASE_ORDER">
7335                                         <context link="formula" field="owner"/>
7336                 </delete>
7337                         </actions>
7338                 </permacrud>
7339         </class>
7340
7341         <class id="acqda" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
7342                 <fields oils_persist:primary="id">
7343                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
7344                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7345                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
7346                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
7347                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
7348                 </fields>
7349                 <links>
7350                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7351                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7352                 </links>
7353                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7354                 </permacrud>
7355         </class>
7356
7357         <class id="acqclt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim_type" oils_persist:tablename="acq.claim_type" reporter:label="Claim Type">
7358                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
7359                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
7360                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7361                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7362                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7363                 </fields>
7364                 <links>
7365                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7366                 </links>
7367                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7368                         <actions>
7369                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7370                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
7371                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7372                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7373                         </actions>
7374                 </permacrud>
7375         </class>
7376
7377         <class id="acqclet" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim_event_type" oils_persist:tablename="acq.claim_event_type" reporter:label="Claim Event Type">
7378                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
7379                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
7380                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7381                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7382                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7383                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
7384                 </fields>
7385                 <links>
7386                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7387                 </links>
7388                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7389                         <actions>
7390                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7391                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
7392                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7393                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7394                         </actions>
7395                 </permacrud>
7396         </class>
7397
7398         <class id="acqcl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
7399                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
7400                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
7401                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
7402                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
7403                 </fields>
7404                 <links>
7405                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
7406                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
7407                 </links>
7408                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7409                 </permacrud>
7410         </class>
7411
7412         <class id="acqcle" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
7413                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
7414                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
7415                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
7416                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
7417                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
7418                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7419                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7420                 </fields>
7421                 <links>
7422                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
7423                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
7424                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7425                 </links>
7426                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7427                 </permacrud>
7428         </class>
7429
7430         <class id="acqscl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
7431                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
7432                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
7433                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
7434                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
7435                 </fields>
7436                 <links>
7437                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
7438                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
7439                 </links>
7440                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7441                 </permacrud>
7442         </class>
7443
7444         <class id="acqscle" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::serial_claim_event" oils_persist:tablename="acq.serial_claim_event" reporter:label="Serial Claim Event">
7445                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
7446                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
7447                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
7448                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
7449                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
7450                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7451                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7452                 </fields>
7453                 <links>
7454                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
7455                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
7456                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7457                 </links>
7458                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7459                 </permacrud>
7460         </class>
7461
7462         <class id="acqclp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim_policy" oils_persist:tablename="acq.claim_policy" reporter:label="Claim Policy">
7463                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
7464                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
7465                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7466                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
7467                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7468                 </fields>
7469                 <links>
7470                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7471                 </links>
7472                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7473             <actions>
7474                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7475                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
7476                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7477                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7478             </actions>
7479                 </permacrud>
7480         </class>
7481
7482         <class id="acqclpa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim_policy_action" oils_persist:tablename="acq.claim_policy_action" reporter:label="Claim Policy Action">
7483                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
7484                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
7485                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
7486                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
7487                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
7488                 </fields>
7489                 <links>
7490                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7491                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
7492                 </links>
7493                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7494                         <actions>
7495                                 <create permission="ADMIN_CLAIM_POLICY">
7496                                         <context link="claim_policy" field="org_unit"/>
7497                 </create>
7498                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
7499                                         <context link="claim_policy" field="org_unit"/>
7500                 </retrieve>
7501                                 <update permission="ADMIN_CLAIM_POLICY">
7502                                         <context link="claim_policy" field="org_unit"/>
7503                 </update>
7504                                 <delete permission="ADMIN_CLAIM_POLICY">
7505                                         <context link="claim_policy" field="org_unit"/>
7506                 </delete>
7507                         </actions>
7508                 </permacrud>
7509         </class>
7510
7511     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
7512         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
7513             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7514             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7515             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7516             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
7517             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
7518             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
7519             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
7520             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
7521             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
7522             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
7523             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
7524             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
7525             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
7526             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
7527             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7528         </fields>
7529     </class>
7530
7531     <class id="stgc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="staging::card_stage" oils_persist:tablename="staging.card_stage" reporter:label="Card Stage">
7532         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
7533             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7534             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7535             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7536             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7537             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7538         </fields>
7539     </class>
7540
7541     <class id="stgma" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="staging::mailing_address_stage" oils_persist:tablename="staging.mailing_address_stage" reporter:label="Mailing Address Stage">
7542         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
7543             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7544             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7545             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7546             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
7547             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
7548             <field reporter:label="City" name="city" reporter:datatype="text"/>
7549             <field reporter:label="State" name="state" reporter:datatype="text"/>
7550             <field reporter:label="Country" name="country" reporter:datatype="text"/>
7551             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7552             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7553         </fields>
7554     </class>
7555
7556     <class id="stgba" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="staging::billing_address_stage" oils_persist:tablename="staging.billing_address_stage" reporter:label="Billing Address Stage">
7557         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
7558             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7559             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7560             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7561             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
7562             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
7563             <field reporter:label="City" name="city" reporter:datatype="text"/>
7564             <field reporter:label="State" name="state" reporter:datatype="text"/>
7565             <field reporter:label="Country" name="country" reporter:datatype="text"/>
7566             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7567             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7568         </fields>
7569     </class>
7570
7571     <class id="stgsc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="staging::statcat_stage" oils_persist:tablename="staging.statcat_stage" reporter:label="Statistical Category Stage">
7572         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
7573             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7574             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7575             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7576             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
7577             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
7578             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7579         </fields>
7580     </class>
7581
7582         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
7583                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
7584                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
7585                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7586                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
7587                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
7588                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
7589                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
7590                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
7591                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
7592                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
7593                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
7594                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
7595                 </fields>
7596                 <links>
7597                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7598                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7599                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7600                 </links>
7601                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7602                 </permacrud>
7603         </class>
7604
7605         <class id="afscv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset_col_val" oils_persist:tablename="action.fieldset_col_val" reporter:label="Fieldset Column Value">
7606                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
7607                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
7608                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
7609                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
7610                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
7611                 </fields>
7612                 <links>
7613                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
7614                 </links>
7615                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7616                 </permacrud>
7617         </class>
7618
7619     <class id="aufhl" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_loops" oils_persist:tablename="action.unfulfilled_hold_loops" oils_persist:readonly="true">
7620         <fields>
7621             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7622             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7623             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7624         </fields>
7625                 <links>
7626                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7627                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7628                 </links>
7629     </class>
7630
7631     <class id="aufhml" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_min_loop" oils_persist:tablename="action.unfulfilled_hold_min_loop" oils_persist:readonly="true">
7632         <fields>
7633             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7634             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
7635         </fields>
7636                 <links>
7637                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7638                 </links>
7639     </class>
7640
7641     <class id="aufhil" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_innermost_loop" oils_persist:tablename="action.unfulfilled_hold_innermost_loop" oils_persist:readonly="true">
7642         <fields>
7643             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7644             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7645             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7646         </fields>
7647                 <links>
7648                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7649                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7650                 </links>
7651     </class>
7652
7653     <class id="aufhmxl" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_max_loop" oils_persist:tablename="action.unfulfilled_hold_max_loop" oils_persist:readonly="true">
7654         <fields>
7655             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7656             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
7657         </fields>
7658                 <links>
7659                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7660                 </links>
7661     </class>
7662
7663     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
7664                 <oils_persist:source_definition>
7665
7666             SELECT  DISTINCT l.*
7667               FROM  action.unfulfilled_hold_loops l
7668                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
7669               WHERE l.count = m.max
7670
7671                 </oils_persist:source_definition>
7672         <fields>
7673             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7674             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7675             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7676         </fields>
7677                 <links>
7678                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7679                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7680                 </links>
7681     </class>
7682
7683         <class id="qsq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
7684                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
7685                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
7686                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
7687                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
7688                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
7689                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
7690                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
7691                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
7692                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
7693                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
7694                 </fields>
7695                 <links>
7696                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
7697                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
7698                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
7699                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
7700                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
7701                 </links>
7702                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7703                 </permacrud>
7704         </class>
7705
7706         <class id="qseq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
7707                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
7708                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
7709                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
7710                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7711                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
7712                 </fields>
7713                 <links>
7714                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
7715                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
7716                 </links>
7717                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7718                 </permacrud>
7719         </class>
7720
7721         <class id="qdt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
7722                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
7723                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
7724                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
7725                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
7726                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
7727                 </fields>
7728                 <links>
7729                 </links>
7730                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7731                 </permacrud>
7732         </class>
7733
7734         <class id="qsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
7735                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
7736                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
7737                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
7738                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7739                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
7740                 </fields>
7741                 <links>
7742                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
7743                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
7744                 </links>
7745                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7746                 </permacrud>
7747         </class>
7748         
7749         <class id="qfs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
7750                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
7751                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
7752                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
7753                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
7754                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
7755                 </fields>
7756                 <links>
7757                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
7758                 </links>
7759                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7760                 </permacrud>
7761         </class>
7762         
7763         <class id="qfpd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::function_param_def" oils_persist:tablename="query.function_param_def" reporter:label="Function Parameter Definition">
7764                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
7765                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
7766                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
7767                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7768                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
7769                 </fields>
7770                 <links>
7771                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
7772                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
7773                 </links>
7774                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7775                 </permacrud>
7776         </class>
7777
7778         <class id="qbv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
7779                 <fields oils_persist:primary="name">
7780                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
7781                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
7782                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
7783                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7784                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
7785                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
7786                 </fields>
7787                 <links>
7788                 </links>
7789                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7790                 </permacrud>
7791         </class>
7792
7793         <class id="qxp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
7794                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7795                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7796                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
7797                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7798                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7799                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7800                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
7801                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
7802                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7803                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7804                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
7805                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
7806                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
7807                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
7808                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
7809                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7810                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
7811                 </fields>
7812                 <links>
7813                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7814                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7815                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
7816                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
7817                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7818                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
7819                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
7820                 </links>
7821                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7822                 </permacrud>
7823         </class>
7824
7825         <class id="qcb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
7826                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
7827                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
7828                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7829                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7830                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
7831                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
7832                 </fields>
7833                 <links>
7834                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7835                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
7836                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
7837                 </links>
7838                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7839                 </permacrud>
7840         </class>
7841
7842         <class id="qfr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
7843                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
7844                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
7845                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
7846                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
7847                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
7848                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
7849                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
7850                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
7851                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
7852                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7853                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
7854                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
7855                 </fields>
7856                 <links>
7857                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7858                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
7859                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
7860                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
7861                 </links>
7862                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7863                 </permacrud>
7864         </class>
7865
7866         <class id="qrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
7867                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
7868                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
7869                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
7870                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7871                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7872                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
7873                 </fields>
7874                 <links>
7875                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
7876                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
7877                 </links>
7878                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7879                 </permacrud>
7880         </class>
7881
7882         <class id="qsi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
7883                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
7884                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
7885                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
7886                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7887                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
7888                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
7889                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
7890                 </fields>
7891                 <links>
7892                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7893                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
7894                 </links>
7895                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7896                 </permacrud>
7897         </class>
7898
7899         <class id="qobi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::order_by_item" oils_persist:tablename="query.order_by_item" reporter:label="Order By Item">
7900                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
7901                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
7902                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
7903                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7904                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
7905                 </fields>
7906                 <links>
7907                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7908                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
7909                 </links>
7910                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7911                 </permacrud>
7912         </class>
7913
7914         <class id="xbet" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
7915                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7916                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7917                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7918                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7919                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7920                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7921                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7922                 </fields>
7923                 <links>
7924                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7925                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7926                 </links>
7927                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7928                 </permacrud>
7929         </class>
7930
7931         <class id="xbind" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
7932                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7933                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7934                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7935                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7936                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7937                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
7938                 </fields>
7939                 <links>
7940                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7941                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
7942                 </links>
7943                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7944                 </permacrud>
7945         </class>
7946
7947         <class id="xbool" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
7948                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7949                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7950                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7951                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7952                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7953                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
7954                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7955                 </fields>
7956                 <links>
7957                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7958                 </links>
7959                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7960                 </permacrud>
7961         </class>
7962
7963         <class id="xcase" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
7964                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7965                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7966                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7967                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7968                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7969                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7970                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7971                 </fields>
7972                 <links>
7973                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7974                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7975                 </links>
7976                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7977                 </permacrud>
7978         </class>
7979
7980         <class id="xcast" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
7981                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7982                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7983                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7984                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7985                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7986                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7987                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
7988                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7989                 </fields>
7990                 <links>
7991                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7992                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7993                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
7994                 </links>
7995                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7996                 </permacrud>
7997         </class>
7998
7999         <class id="xcol" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
8000                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8001                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8002                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8003                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8004                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8005                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8006                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8007                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8008                 </fields>
8009                 <links>
8010                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8011                 </links>
8012                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8013                 </permacrud>
8014         </class>
8015
8016         <class id="xex" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
8017                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8018                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8019                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8020                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8021                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8022                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8023                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8024                 </fields>
8025                 <links>
8026                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8027                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8028                 </links>
8029                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8030                 </permacrud>
8031         </class>
8032
8033         <class id="xfunc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
8034                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8035                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8036                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8037                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8038                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8039                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8040                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8041                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8042                 </fields>
8043                 <links>
8044                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8045                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8046                 </links>
8047                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8048                 </permacrud>
8049         </class>
8050
8051         <class id="xin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
8052                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8053                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8054                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8055                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8056                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8057                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8058                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8059                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8060                 </fields>
8061                 <links>
8062                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8063                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8064                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8065                 </links>
8066                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8067                 </permacrud>
8068         </class>
8069
8070         <class id="xisnull" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
8071                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8072                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8073                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8074                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8075                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8076                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8077                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8078                 </fields>
8079                 <links>
8080                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8081                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8082                 </links>
8083                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8084                 </permacrud>
8085         </class>
8086
8087         <class id="xnull" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
8088                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8089                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8090                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8091                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8092                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8093                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8094                 </fields>
8095                 <links>
8096                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8097                 </links>
8098                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8099                 </permacrud>
8100         </class>
8101
8102         <class id="xnum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
8103                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8104                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8105                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8106                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8107                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8108                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8109                 </fields>
8110                 <links>
8111                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8112                 </links>
8113                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8114                 </permacrud>
8115         </class>
8116
8117         <class id="xop" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
8118                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8119                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8120                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8121                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8122                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8123                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8124                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8125                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8126                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8127                 </fields>
8128                 <links>
8129                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8130                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8131                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8132                 </links>
8133                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8134                 </permacrud>
8135         </class>
8136
8137         <class id="xser" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
8138                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8139                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8140                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8141                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8142                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8143                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8144                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8145                 </fields>
8146                 <links>
8147                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8148                 </links>
8149                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8150                 </permacrud>
8151         </class>
8152
8153         <class id="xstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
8154                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8155                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8156                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8157                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8158                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8159                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8160                 </fields>
8161                 <links>
8162                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8163                 </links>
8164                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8165                 </permacrud>
8166         </class>
8167
8168         <class id="xsubq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
8169                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8170                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8171                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8172                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8173                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8174                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8175                 </fields>
8176                 <links>
8177                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8178                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8179                 </links>
8180                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8181                 </permacrud>
8182         </class>
8183
8184         <class id="bmpc" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::marc21_physical_characteristics" oils_persist:tablename="biblio.marc21_physical_characteristics" reporter:label="MARC21 Physical Characteristics" oils_persist:field_safe="true" oils_persist:readonly="true">
8185                 <fields oils_persist:primary="id">
8186                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
8187                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
8188                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
8189                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
8190                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
8191                 </fields>
8192                 <links>
8193                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
8194                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8195                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
8196                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
8197                 </links>
8198         </class>
8199
8200         <class id="cmfpm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc21_ff_pos_map" oils_persist:tablename="config.marc21_ff_pos_map" reporter:label="MARC21 Fixed Field Map" oils_persist:field_safe="true">
8201                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
8202                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8203                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
8204                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
8205                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
8206                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8207                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8208                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
8209                 </fields>
8210                 <links/>
8211                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8212                         <actions>
8213                                 <retrieve/>
8214                         </actions>
8215                 </permacrud>
8216         </class>
8217
8218         <class id="cmpctm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc21_physical_characteristic_type_map" oils_persist:tablename="config.marc21_physical_characteristic_type_map" reporter:label="MARC21 Physical Characteristic Type Map" oils_persist:field_safe="true">
8219                 <fields oils_persist:primary="ptype_key">
8220                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
8221                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8222                 </fields>
8223                 <links/>
8224                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8225                         <actions>
8226                                 <retrieve/>
8227                         </actions>
8228                 </permacrud>
8229         </class>
8230
8231         <class id="cmpcsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc21_physical_characteristic_subfield_map" oils_persist:tablename="config.marc21_physical_characteristic_subfield_map" reporter:label="MARC21 Physical Characteristic Subfield Map" oils_persist:field_safe="true">
8232                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
8233                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8234                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
8235                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
8236                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8237                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8238                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8239                 </fields>
8240                 <links>
8241                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
8242                 </links>
8243                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8244                         <actions>
8245                                 <retrieve/>
8246                         </actions>
8247                 </permacrud>
8248         </class>
8249
8250         <class id="cmpcvm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc21_physical_characteristic_value_map" oils_persist:tablename="config.marc21_physical_characteristic_value_map" reporter:label="MARC21 Physical Characteristic Value Map" oils_persist:field_safe="true">
8251                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
8252                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8253                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
8254                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
8255                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8256                 </fields>
8257                 <links>
8258                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8259                 </links>
8260                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8261                         <actions>
8262                                 <retrieve/>
8263                         </actions>
8264                 </permacrud>
8265         </class>
8266
8267         <class id="cmrtm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc21_rec_type_map" oils_persist:tablename="config.marc21_rec_type_map" reporter:label="MARC21 Record Type Map" oils_persist:field_safe="true">
8268                 <fields oils_persist:primary="code">
8269                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
8270                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
8271                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
8272                 </fields>
8273                 <links/>
8274                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8275                         <actions>
8276                                 <retrieve/>
8277                         </actions>
8278                 </permacrud>
8279         </class>
8280
8281         <class id="rlcd" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::last_copy_deleted" oils_persist:readonly="true" reporter:core="true" reporter:label="Last Copy Delete Time">
8282                 <oils_persist:source_definition>
8283
8284             SELECT  b.id,
8285                     MAX(dcp.edit_date) AS last_delete_date
8286              FROM   biblio.record_entry b
8287                     JOIN asset.call_number cn ON (cn.record = b.id)
8288                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
8289              WHERE  NOT b.deleted
8290              GROUP BY b.id
8291              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
8292
8293                 </oils_persist:source_definition>
8294                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8295                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8296                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
8297                 </fields>
8298                 <links>
8299                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8300                 </links>
8301                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8302                         <actions>
8303                                 <retrieve/>
8304                         </actions>
8305                 </permacrud>
8306         </class>
8307
8308         <class id="rhcrpb" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::hold_copy_ratio_per_bib" oils_persist:readonly="true" reporter:core="true" reporter:label="Hold/Copy Ratio per Bib">
8309                 <oils_persist:source_definition>
8310
8311             -- -- If we uncomment the RIGHT JOIN against biblio.record_entry, then we'll get a row for every non-deleted bib, whether it has active holds or not.
8312             -- -- If we expect to use pcrud to query against specific bibs, we probably want to do this.  However, if we're using this to populate a report, we
8313             -- -- may not.
8314             -- SELECT
8315             --     bre.id AS "bib_id",
8316             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
8317             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
8318             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
8319             -- FROM (
8320                 SELECT
8321                     y.bre AS "id",
8322                     COALESCE( x.copy_count, 0 ) AS "copy_count",
8323                     y.hold_count AS "hold_count",
8324                     (y.hold_count::REAL / (CASE WHEN x.copy_count = 0 OR x.copy_count IS NULL THEN 0.1 ELSE x.copy_count::REAL END)) AS "hold_copy_ratio"
8325                 FROM (
8326                         SELECT
8327                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
8328                             COUNT(*) AS "hold_count"
8329                         FROM action.hold_request h
8330                         WHERE
8331                             cancel_time IS NULL
8332                             AND fulfillment_time IS NULL
8333                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
8334                         GROUP BY 1
8335                     )y LEFT JOIN (
8336                         SELECT 
8337                             (SELECT id
8338                                 FROM biblio.record_entry 
8339                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
8340                             ) AS "bre", 
8341                             COUNT(*) AS "copy_count"
8342                         FROM asset.copy
8343                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
8344                         WHERE copy.holdable 
8345                             AND NOT copy.deleted 
8346                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
8347                         GROUP BY 1
8348                     )x ON x.bre = y.bre
8349                 -- )z RIGHT JOIN (
8350                 --     SELECT id
8351                 --     FROM biblio.record_entry
8352                 --     WHERE NOT deleted
8353                 -- )bre ON (z.bib_id = bre.id)
8354                 
8355
8356                 </oils_persist:source_definition>
8357                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8358                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8359                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
8360                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
8361                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
8362                 </fields>
8363                 <links>
8364                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8365                 </links>
8366                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8367                         <actions>
8368                                 <retrieve/>
8369                         </actions>
8370                 </permacrud>
8371         </class>
8372
8373         <!-- ********************************************************************************************************************* -->
8374         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
8375         <!-- ********************************************************************************************************************* -->
8376         <class id="rccc" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::classic_current_circ" oils_persist:tablename="reporter.classic_current_circ" reporter:core="true" reporter:label="Classic Circulation View">
8377                 <fields oils_persist:primary="id">
8378                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
8379                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
8380                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
8381                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
8382                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
8383                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
8384                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
8385                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
8386                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
8387                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
8388                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
8389                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
8390                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
8391                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
8392                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
8393                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
8394                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
8395                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
8396                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
8397                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
8398                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
8399                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
8400                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
8401                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
8402                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
8403                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
8404                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
8405                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
8406                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
8407                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
8408                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
8409                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
8410                 </fields>
8411                 <links>
8412                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8413                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
8414                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
8415                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
8416                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
8417                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
8418                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
8419                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
8420                 </links>
8421         </class>
8422
8423         <class id="rsce1" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::legacy_cat1" oils_persist:tablename="reporter.legacy_cat1" reporter:label="CAT1 Entry">
8424                 <fields oils_persist:primary="id">
8425                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
8426                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8427                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
8428                 </fields>
8429                 <links>
8430                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8431                 </links>
8432         </class>
8433
8434         <class id="rsce2" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::legacy_cat2" oils_persist:tablename="reporter.legacy_cat2" reporter:label="CAT2 Entry">
8435                 <fields oils_persist:primary="id">
8436                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
8437                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8438                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
8439                 </fields>
8440                 <links>
8441                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8442                 </links>
8443         </class>
8444
8445         <class id="rccbs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::classic_current_billing_summary" oils_persist:tablename="reporter.classic_current_billing_summary" reporter:core="true" reporter:label="Classic Open Transaction Summary">
8446                 <fields oils_persist:primary="id">
8447                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
8448
8449                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
8450                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
8451                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
8452
8453                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
8454                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
8455                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
8456
8457                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
8458                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
8459
8460                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
8461                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
8462                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
8463
8464                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
8465                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
8466
8467                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
8468                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
8469                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
8470
8471                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
8472                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
8473                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
8474
8475                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
8476                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
8477                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
8478                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
8479
8480                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
8481                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
8482
8483                 </fields>
8484                 <links>
8485                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
8486                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8487                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
8488                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
8489                 </links>
8490         </class>
8491
8492         <class id="acrlid" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_ready_lineitem_detail" oils_persist:readonly="true" reporter:label="Claim Ready Lineitem Details">
8493                 <oils_persist:source_definition>
8494
8495             SELECT
8496                 po.ordering_agency AS ordering_agency,
8497                 po.id AS purchase_order,
8498                 li.id AS lineitem,
8499                 lid.id AS lineitem_detail,
8500                 cpa.id AS claim_policy_action
8501             FROM
8502                 acq.lineitem_detail lid
8503                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
8504                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
8505                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
8506                 JOIN acq.claim_policy_action cpa ON (
8507                     cpa.claim_policy = cp.id
8508
8509                     -- we only care about claim policy actions whose claim
8510                     -- interval we'd reached or exceeded
8511                     AND (NOW() - cpa.action_interval) &gt; po.order_date
8512
8513                     -- filter out all claim policy actions where claim events
8514                     -- have occurred on or after the action's action_interval
8515                     AND NOT EXISTS (
8516                         SELECT 1
8517                         FROM
8518                             acq.claim_event evt
8519                             JOIN acq.claim claim ON (
8520                                 claim.id = evt.claim
8521                                 AND claim.lineitem_detail = lid.id
8522                             )
8523                         WHERE
8524                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
8525                     )
8526                 )
8527             WHERE
8528                 lid.cancel_reason IS NULL
8529                 AND li.cancel_reason IS NULL -- belt/suspenders
8530                 AND po.cancel_reason IS NULL -- belt/suspenders
8531                 AND lid.recv_time IS NULL
8532                 AND po.state = 'on-order'
8533             ORDER BY 1, 2, 3, 4, 5
8534
8535                 </oils_persist:source_definition>
8536                 <fields>
8537                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8538                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8539                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8540                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8541                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
8542                 </fields>
8543                 <links>
8544                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8545                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8546                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8547                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8548                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
8549                 </links>
8550         </class>
8551
8552         <class id="acqlisum" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary" oils_persist:readonly="true" reporter:label="Lineitem Summary">
8553                 <oils_persist:source_definition>
8554
8555             SELECT 
8556                 li.id AS lineitem, 
8557                 (
8558                     SELECT COUNT(lid.id) 
8559                     FROM acq.lineitem_detail lid
8560                     WHERE lineitem = li.id
8561                 ) AS item_count,
8562                 (
8563                     SELECT COUNT(lid.id) 
8564                     FROM acq.lineitem_detail lid
8565                     WHERE recv_time IS NOT NULL AND lineitem = li.id
8566                 ) AS recv_count,
8567                 (
8568                     SELECT COUNT(lid.id) 
8569                     FROM acq.lineitem_detail lid
8570                     WHERE cancel_reason IS NOT NULL AND lineitem = li.id
8571                 ) AS cancel_count,
8572                 (
8573                     SELECT COUNT(lid.id) 
8574                     FROM acq.lineitem_detail lid
8575                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8576                     WHERE NOT debit.encumbrance AND lineitem = li.id
8577                 ) AS invoice_count,
8578                 (
8579                     SELECT COUNT(DISTINCT(lid.id)) 
8580                     FROM acq.lineitem_detail lid
8581                         JOIN acq.claim claim ON (claim.lineitem_detail = lid.id)
8582                     WHERE lineitem = li.id
8583                 ) AS claim_count,
8584                 (
8585                     SELECT (COUNT(lid.id) * li.estimated_unit_price)::NUMERIC(8,2)
8586                     FROM acq.lineitem_detail lid
8587                     WHERE lid.cancel_reason IS NULL AND lineitem = li.id
8588                 ) AS estimated_amount,
8589                 (
8590                     SELECT SUM(debit.amount)::NUMERIC(8,2)
8591                     FROM acq.lineitem_detail lid
8592                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8593                     WHERE debit.encumbrance AND lineitem = li.id
8594                 ) AS encumbrance_amount,
8595                 (
8596                     SELECT SUM(debit.amount)::NUMERIC(8,2)
8597                     FROM acq.lineitem_detail lid
8598                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8599                     WHERE NOT debit.encumbrance AND lineitem = li.id
8600                 ) AS paid_amount
8601
8602                 FROM acq.lineitem AS li
8603         </oils_persist:source_definition>
8604                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
8605                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8606                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
8607                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
8608                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
8609                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
8610                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
8611                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
8612                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
8613                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
8614                 </fields>
8615                 <links>
8616                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8617                 </links>
8618     </class>
8619
8620
8621         <class id="iatc" controller="open-ils.reporter-store" oils_obj:fieldmapper="action::intersystem_transit_copy" oils_persist:readonly="true" reporter:core="true" reporter:label="Inter-system Copy Transit">
8622                 <oils_persist:source_definition>
8623
8624                         SELECT  t.*
8625                           FROM  action.transit_copy t
8626                                 JOIN actor.org_unit AS s ON (t.source = s.id)
8627                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
8628                           WHERE s.parent_ou &lt;&gt; d.parent_ou
8629
8630                 </oils_persist:source_definition>
8631                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8632                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
8633                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
8634                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8635                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
8636                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
8637                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
8638                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
8639                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8640                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8641                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8642                 </fields>
8643                 <links>
8644                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
8645                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8646                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8647                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8648                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8649                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
8650                 </links>
8651         </class>
8652
8653     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
8654                 <oils_persist:source_definition>
8655
8656         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
8657                 SELECT
8658                         cp.id as copy,
8659                         COUNT(circ.id),
8660                         EXTRACT(YEAR FROM circ.xact_start) AS year,
8661                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
8662                 FROM
8663                         asset.copy cp
8664                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
8665                 GROUP BY 1, 3, 4
8666                 UNION
8667                 SELECT
8668                         cp.id as copy,
8669                         COUNT(circ.id),
8670                         EXTRACT(YEAR FROM circ.xact_start) AS year,
8671                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
8672                 FROM
8673                         asset.copy cp
8674                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
8675                 GROUP BY 1, 3, 4
8676                 UNION
8677                 SELECT
8678                         id as copy,
8679                         circ_count,
8680                         -1 AS year,
8681                         false as is_renewal
8682                 FROM
8683                         extend_reporter.legacy_circ_count
8684         )x GROUP BY 1, 3, 4
8685
8686                 </oils_persist:source_definition>
8687         <fields>
8688             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
8689             <field reporter:label="Count" name="count" reporter:datatype="int"/>
8690             <field reporter:label="Year" name="year" reporter:datatype="int"/>
8691             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
8692         </fields>
8693                 <links>
8694                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
8695                 </links>
8696                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8697                         <actions>
8698                                 <retrieve/>
8699                         </actions>
8700                 </permacrud>
8701     </class>
8702
8703         <class id="rodcirc" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::overdue_circs" oils_persist:tablename="reporter.overdue_circs" reporter:core="true" reporter:label="Overdue Circulation">
8704                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
8705                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
8706                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
8707                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
8708                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
8709                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
8710                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
8711                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
8712                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
8713                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
8714                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
8715                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
8716                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
8717                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
8718                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
8719                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
8720                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
8721                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
8722                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
8723                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
8724                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
8725                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
8726                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
8727                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
8728                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
8729                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
8730                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
8731                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
8732                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
8733                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
8734                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
8735                 </fields>
8736                 <links>
8737                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
8738                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
8739                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
8740                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8741                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
8742                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8743                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8744                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
8745                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
8746                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
8747                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
8748                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
8749                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
8750                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
8751                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
8752                 </links>
8753         </class>
8754
8755     <class id="rocit" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::classic_item_list" oils_persist:tablename="reporter.classic_item_list" reporter:core="true" reporter:label="Classic Item List">
8756         <fields oils_persist:primary="id">
8757             <field reporter:label="Title" name="title" reporter:datatype="text"/>
8758             <field reporter:label="Author" name="author" reporter:datatype="text"/>
8759             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
8760             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
8761             <field reporter:label="Price" name="price" reporter:datatype="money"/>
8762             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
8763             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
8764             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
8765             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
8766             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
8767             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
8768             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
8769             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
8770             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
8771             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
8772             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
8773             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
8774             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8775             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
8776             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
8777             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
8778             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
8779             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8780             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
8781             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
8782             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
8783             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
8784             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
8785             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
8786             <field reporter:label="Status" name="status" reporter:datatype="link"/>
8787             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
8788             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
8789             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
8790             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
8791         </fields>
8792         <links>
8793             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8794             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8795             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8796             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
8797             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
8798         </links>
8799     </class>
8800
8801     <class id="rmocbbol" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::money::open_circ_balance_by_owning_lib" oils_persist:tablename="money.open_circ_balance_by_owning_lib" reporter:core="true" reporter:label="Open Circulation Billing by Owning Library">
8802         <fields oils_persist:primary="id">
8803             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
8804             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8805             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
8806             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
8807         </fields>
8808         <links>
8809             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8810             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8811         </links>
8812     </class>
8813
8814     <class id="rmobbol" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::money::open_balance_by_owning_lib" oils_persist:tablename="money.open_balance_by_owning_lib" reporter:core="true" reporter:label="Open Circulation Balance by Owning Library">
8815         <fields oils_persist:primary="owning_lib">
8816             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8817             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
8818             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
8819         </fields>
8820         <links>
8821             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8822         </links>
8823     </class>
8824
8825     <class id="rmocbbcol" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::money::open_circ_balance_by_circ_and_owning_lib" oils_persist:tablename="money.open_circ_balance_by_circ_and_owning_lib" reporter:core="true" reporter:label="Open Circulation Billing by Circulating Library and Owning Library">
8826         <fields oils_persist:primary="id">
8827             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
8828             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
8829             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8830             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
8831             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
8832         </fields>
8833         <links>
8834             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8835             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8836             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8837         </links>
8838     </class>
8839
8840     <class id="rmobbcol" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::money::open_balance_by_circ_and_owning_lib" oils_persist:tablename="money.open_balance_by_circ_and_owning_lib" reporter:core="true" reporter:label="Open Circulation Balance by Circulating Library and Owning Library">
8841         <fields oils_persist:primary="circ_lib">
8842             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
8843             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8844             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
8845             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
8846         </fields>
8847         <links>
8848             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8849             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8850         </links>
8851     </class>
8852
8853     <class id="rmocbbhol" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::money::open_circ_balance_by_usr_home_and_owning_lib" oils_persist:tablename="money.open_circ_balance_by_usr_home_and_owning_lib" reporter:core="true" reporter:label="Open Circulation Billing by User Home Library and Owning Library">
8854         <fields oils_persist:primary="id">
8855             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
8856             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
8857             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8858             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
8859             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
8860         </fields>
8861         <links>
8862             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8863             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8864             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
8865         </links>
8866     </class>
8867
8868     <class id="rmobbhol" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::money::open_balance_by_usr_home_and_owning_lib" oils_persist:tablename="money.open_balance_by_usr_home_and_owning_lib" reporter:core="true" reporter:label="Open Circulation Balance by User Home Library and Owning Library">
8869         <fields oils_persist:primary="home_ou">
8870             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
8871             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8872             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
8873             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
8874         </fields>
8875         <links>
8876             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8877             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
8878         </links>
8879     </class>
8880         <class id="acqft" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_tag" oils_persist:tablename="acq.fund_tag" reporter:label="Fund Tag">
8881                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
8882                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
8883                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
8884                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
8885                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
8886                 </fields>
8887                 <links>
8888                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8889                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
8890                 </links>
8891                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8892                         <actions>
8893                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
8894                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
8895                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
8896                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
8897                         </actions>
8898                 </permacrud>
8899         </class>
8900         <class id="acqftm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_tag_map" oils_persist:tablename="acq.fund_tag_map" reporter:label="Fund Tag Map">
8901                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
8902                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
8903                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
8904                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
8905                 </fields>
8906                 <links>
8907                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8908                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
8909                         </links>
8910                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8911                 <actions>
8912                                 <create permission="ADMIN_ACQ_FUND_TAG">
8913                                         <context link="tag" field="owner"/>
8914                                 </create>
8915                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8916                                         <context link="tag" field="owner"/>
8917                                 </retrieve>
8918                                 <update permission="ADMIN_ACQ_FUND_TAG">
8919                                         <context link="tag" field="owner"/>
8920                                 </update>
8921                                 <delete permission="ADMIN_ACQ_FUND_TAG">
8922                                         <context link="tag" field="owner"/>
8923                                 </delete>
8924                         </actions>
8925                 </permacrud>
8926         </class>
8927         <class id="cbc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::barcode_completion" oils_persist:tablename="config.barcode_completion" reporter:label="Barcode Completions">
8928                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
8929                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8930                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
8931                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
8932                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
8933                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
8934                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8935                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
8936                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
8937                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
8938                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
8939                 </fields>
8940                 <links>
8941                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8942                 </links>
8943                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8944                         <actions>
8945                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
8946                                 <retrieve/>
8947                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
8948                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
8949                         </actions>
8950                 </permacrud>
8951         </class>
8952
8953         <!-- ********************************************************************************************************************* -->
8954
8955 </IDL>
8956
8957 <!--
8958     vim:noet:ts=4:sw=4:
8959 -->