]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
Fix typo in fm_IDL.xml
[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="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
279                 </fields>
280                 <links>
281                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
282                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
283                 </links>
284                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
285                         <actions>
286                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
287                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
288                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
289                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
290                         </actions>
291                 </permacrud>
292         </class>
293
294         <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">
295                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
296                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
297                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
298                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
299                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
300                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
301                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
302                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
303                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
304                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
305                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
306                 </fields>
307                 <links>
308                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
309                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
310                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
311             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
312             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
313                 </links>
314                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
315                         <actions>
316                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
317                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
318                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
319                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
320                         </actions>
321                 </permacrud>
322         </class>
323
324         <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">
325                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
326                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
327                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
328                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
329                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
330                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
331                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
332                 </fields>
333                 <links/>
334                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
335                         <actions>
336                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
337                 <retrieve/>
338                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
339                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
340                         </actions>
341                 </permacrud>
342         </class>
343
344         <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">
345                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
346                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
347                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
348                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
349                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
350                 </fields>
351                 <links>
352                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
353                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
354                 </links>
355                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
356                         <actions>
357                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
358                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
359                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
360                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
361                         </actions>
362                 </permacrud>
363         </class>
364
365         <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">
366                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
367                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
368                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
369                         <field reporter:label="Matched Attribute" name="matched_attr" reporter:datatype="link"/>
370                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
371                         <field reporter:label="Field Type" name="field_type" reporter:datatype="text"/>
372                 </fields>
373                 <links>
374                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
375                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
376                         <link field="matched_attr" reltype="has_a" key="id" map="" class="vqbra"/>
377                 </links>
378                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
379                         <actions>
380                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
381                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
382                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
383                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
384                         </actions>
385                 </permacrud>
386         </class>
387
388         <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">
389                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
390                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
391                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
392                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
393                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
394                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
395                 </fields>
396                 <links>
397                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
398                 </links>
399                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
400                         <actions>
401                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
402                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
403                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
404                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
405                         </actions>
406                 </permacrud>
407         </class>
408
409         <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">
410                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
411                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
412                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
413                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
414                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
415                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
416                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
417                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
418                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
419                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
420                 </fields>
421                 <links>
422                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
423                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
424             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
425             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
426                 </links>
427                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
428                         <actions>
429                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
430                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
431                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
432                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
433                         </actions>
434                 </permacrud>
435         </class>
436
437         <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">
438                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
439                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
440                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
441                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
442                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
443                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
444                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
445                 </fields>
446                 <links/>
447                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
448                         <actions>
449                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
450                 <retrieve/>
451                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
452                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
453                         </actions>
454                 </permacrud>
455         </class>
456
457         <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">
458                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
459                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
460                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
461                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
462                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
463                 </fields>
464                 <links>
465                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
466                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
467                 </links>
468                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
469                         <actions>
470                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
471                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
472                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
473                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
474                         </actions>
475                 </permacrud>
476         </class>
477
478         <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">
479                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
480                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
481                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
482                         <field reporter:label="Matched Attribute" name="matched_attr" reporter:datatype="link"/>
483                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
484                 </fields>
485                 <links>
486                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
487                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
488                         <link field="matched_attr" reltype="has_a" key="id" map="" class="vqbra"/>
489                 </links>
490                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
491                         <actions>
492                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
493                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
494                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
495                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
496                         </actions>
497                 </permacrud>
498         </class>
499
500
501         <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">
502                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
503                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
504                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
505                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
506                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
507                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
508                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
509                 </fields>
510                 <links>
511                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
512                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
513                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
514                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
515                 </links>
516         </class>
517
518     <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">
519         <fields oils_persist:primary="name">
520             <field reporter:label="Name" name="name" reporter:datatype="text"/>
521             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
522             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
523             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
524         </fields>
525         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
526             <actions>
527                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
528                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
529                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
530                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
531             </actions>
532         </permacrud>
533     </class>
534
535     <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">
536         <fields oils_persist:primary="id">
537             <field reporter:label="ID" name="id" reporter:datatype="id"/>
538             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
539             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
540             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
541             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
542         </fields>
543         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
544             <actions>
545                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
546                 <retrieve/>
547                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
548                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
549             </actions>
550         </permacrud>
551     </class>
552
553         <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">
554                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
555                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
556                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
557                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
558                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
559                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
560                 </fields>
561                 <links>
562                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
563                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
564                 </links>
565         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
566             <actions>
567                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
568                 <retrieve/>
569                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
570                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
571             </actions>
572         </permacrud>
573         </class>
574
575         <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">
576                 <fields oils_persist:primary="name">
577                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
578                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true"/>
579                         <field reporter:label="Description" name="description" reporter:datatype="text" />
580                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
581                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
582                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
583                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
584                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
585                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
586                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
587                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
588                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
589                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
590                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
591                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
592                 </fields>
593                 <links>
594                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
595                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
596                 </links>
597         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
598             <actions>
599                 <create permission="ADMIN_SVF" global_required="true"/>
600                 <retrieve/>
601                 <update permission="ADMIN_SVF" global_required="true"/>
602                 <delete permission="ADMIN_SVF" global_required="true"/>
603             </actions>
604         </permacrud>
605         </class>
606
607         <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">
608                 <fields oils_persist:primary="id">
609                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
610                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
611                 </fields>
612                 <links>
613                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
614                 </links>
615         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
616             <actions>
617                 <retrieve/>
618             </actions>
619         </permacrud>
620         </class>
621
622         <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">
623                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
624                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
625                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
626                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
627                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
628                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
629                 </fields>
630                 <links>
631                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
632                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
633                 </links>
634         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
635             <actions>
636                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
637                 <retrieve/>
638                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
639                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
640             </actions>
641         </permacrud>
642         </class>
643
644         <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">
645                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
646                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true"/>
647                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
648                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
649                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
650                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
651                 </fields>
652                 <links>
653                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
654                 </links>
655         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
656             <actions>
657                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
658                 <retrieve/>
659                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
660                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
661             </actions>
662         </permacrud>
663         </class>
664
665         <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">
666                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
667                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
668                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
669                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
670                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
671                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
672                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
673                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
674                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
675                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
676                 </fields>
677                 <links>
678                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
679                 </links>
680         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
681             <actions>
682                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
683                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
684                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
685                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
686             </actions>
687         </permacrud>
688         </class>
689
690     <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">
691         <fields oils_persist:primary="name">
692             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
693             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
694             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
695             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
696             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
697             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
698             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
699             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
700             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
701         </fields>
702         <links>
703             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
704         </links>
705         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
706             <actions>
707                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
708                 <retrieve/>
709                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
710                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
711             </actions>
712         </permacrud>
713     </class>
714
715     <class id="cza" controller="open-ils.cstore" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
716         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
717             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id"/>
718             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
719             <field reporter:label="Name" name="name" reporter:datatype="text"/>
720             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
721             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
722             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
723             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
724         </fields>
725         <links>
726             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
727         </links>
728     </class>
729
730         <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">
731                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
732                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
733                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
734                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
735                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
736                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
737                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
738                 </fields>
739                 <links>
740             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
741             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
742                 </links>
743                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
744                         <actions>
745                                 <retrieve/>
746                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
747                         </actions>
748                 </permacrud>
749         </class>
750
751         <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">
752                 <fields oils_persist:primary="key">
753                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
754                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
755                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
756                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
757                 </fields>
758                 <links/>
759                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
760                         <actions>
761                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
762                                 <retrieve/>
763                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
764                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
765                         </actions>
766                 </permacrud>
767         </class>
768
769         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
770                 <fields oils_persist:primary="module">
771                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
772                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
773                 </fields>
774                 <links/>
775         </class>
776
777         <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">
778                 <fields oils_persist:primary="module">
779                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
780                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
781                 </fields>
782                 <links/>
783                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
784                         <actions>
785                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
786                                 <retrieve/>
787                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
788                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
789                         </actions>
790                 </permacrud>
791         </class>
792
793         <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">
794                 <fields oils_persist:primary="module">
795                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
796                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
797                 </fields>
798                 <links/>
799                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
800                         <actions>
801                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
802                                 <retrieve/>
803                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
804                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
805                         </actions>
806                 </permacrud>
807         </class>
808
809         <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">
810                 <fields oils_persist:primary="module">
811                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
812                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
813                 </fields>
814                 <links/>
815                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
816                         <actions>
817                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
818                                 <retrieve/>
819                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
820                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
821                         </actions>
822                 </permacrud>
823         </class>
824
825         <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">
826                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
827                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
828                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
829                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
830                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
831                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
832                 </fields>
833                 <links>
834                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
835                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
836                 </links>
837                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
838                         <actions>
839                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
840                     <context link="event_def" field="owner"/>
841                 </create>
842                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
843                     <context link="event_def" field="owner"/>
844                 </retrieve>
845                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
846                     <context link="event_def" field="owner"/>
847                 </update>
848                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
849                     <context link="event_def" field="owner"/>
850                 </delete>
851                         </actions>
852                 </permacrud>
853         </class>
854
855         <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">
856                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
857                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
858                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
859                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
860                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
861                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
862                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
863                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
864                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
865                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
866                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
867                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
868                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
869                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
870                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
871                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
872                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
873                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
874                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
875                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
876                 </fields>
877                 <links>
878                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
879                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
880                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
881                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
882                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
883                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
884                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
885                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
886                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
887                 </links>
888                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
889                         <actions>
890                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
891                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
892                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
893                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
894                         </actions>
895                 </permacrud>
896         </class>
897
898         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
899                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
900                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
901                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
902                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
903                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
904                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
905                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
906                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
907                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
908                         <field reporter:label="State" name="state" reporter:datatype="text"/>
909                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
910                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
911                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
912                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
913                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
914                 </fields>
915                 <links>
916                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
917                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
918                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
919                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
920                 </links>
921         </class>
922
923         <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">
924                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
925                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
926                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
927                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
928                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
929                 </fields>
930                 <links>
931                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
932                 </links>
933                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
934                         <actions>
935                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
936                     <context link="event_def" field="owner"/>
937                 </create>
938                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
939                     <context link="event_def" field="owner"/>
940                 </retrieve>
941                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
942                     <context link="event_def" field="owner"/>
943                 </update>
944                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
945                     <context link="event_def" field="owner"/>
946                 </delete>
947                         </actions>
948                 </permacrud>
949         </class>
950
951         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
952                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
953                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
954                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
955                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
956                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
957                 </fields>
958                 <links>
959                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
960                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
961                 </links>
962         </class>
963
964         <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">
965                 <fields oils_persist:primary="code">
966                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
967                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
968                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
969                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
970                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
971                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
972                 </fields>
973                 <links/>
974         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
975             <actions>
976                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
977                 <retrieve/>
978                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
979                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
980             </actions>
981         </permacrud>
982         </class>
983
984         <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">
985                 <fields oils_persist:primary="code">
986                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
987                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
988                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
989                 </fields>
990                 <links/>
991         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
992             <actions>
993                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
994                 <retrieve/>
995                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
996                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
997             </actions>
998         </permacrud>
999         </class>
1000
1001         <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">
1002                 <fields oils_persist:primary="code">
1003                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1004                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1005                 </fields>
1006                 <links/>
1007         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1008             <actions>
1009                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1010                 <retrieve/>
1011                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1012                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1013             </actions>
1014         </permacrud>
1015         </class>
1016
1017         <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">
1018                 <fields oils_persist:primary="code">
1019                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1020                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1021                 </fields>
1022                 <links/>
1023         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1024             <actions>
1025                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1026                 <retrieve/>
1027                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1028                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1029             </actions>
1030         </permacrud>
1031         </class>
1032
1033         <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">
1034                 <fields oils_persist:primary="code">
1035                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1036                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1037                 </fields>
1038                 <links/>
1039         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1040             <actions>
1041                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1042                 <retrieve/>
1043                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1044                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1045             </actions>
1046         </permacrud>
1047         </class>
1048
1049         <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">
1050                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1051                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1052                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1053                 </fields>
1054                 <links/>
1055         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1056             <actions>
1057                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1058                 <retrieve/>
1059                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1060                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1061             </actions>
1062         </permacrud>
1063         </class>
1064
1065         <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">
1066                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1067                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1068                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1069                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1070                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1071                 </fields>
1072         <links>
1073             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1074             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1075             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1076         </links>
1077         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1078             <actions>
1079                 <create permission="UPDATE_COPY">
1080                     <context link="target_copy" field="circ_lib"/>
1081                 </create>
1082                 <retrieve/>
1083                 <update permission="UPDATE_COPY">
1084                     <context link="target_copy" field="circ_lib"/>
1085                 </update>
1086                 <delete permission="UPDATE_COPY">
1087                     <context link="target_copy" field="circ_lib"/>
1088                 </delete>
1089             </actions>
1090         </permacrud>
1091         </class>
1092
1093         <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">
1094                 <fields oils_persist:primary="code">
1095                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1096                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1097                 </fields>
1098                 <links/>
1099         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1100             <actions>
1101                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1102                 <retrieve/>
1103                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1104                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1105             </actions>
1106         </permacrud>
1107         </class>
1108
1109         <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">
1110                 <fields oils_persist:primary="code">
1111                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1112                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1113                 </fields>
1114                 <links/>
1115         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1116             <actions>
1117                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1118                 <retrieve/>
1119                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1120                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1121             </actions>
1122         </permacrud>
1123         </class>
1124
1125         <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">
1126                 <fields oils_persist:primary="code">
1127                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1128                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1129                 </fields>
1130                 <links/>
1131         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1132             <actions>
1133                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1134                 <retrieve/>
1135                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1136                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1137             </actions>
1138         </permacrud>
1139         </class>
1140
1141     <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">
1142         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1143             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1144             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1145             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1146             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1147             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1148             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1149             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1150             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1151             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1152             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1153             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1154             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1155             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1156             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1157         </fields>
1158         <links/>
1159         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1160             <actions>
1161                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1162                 <retrieve/>
1163                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1164                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1165             </actions>
1166         </permacrud>
1167     </class>
1168
1169     <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">
1170         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1171             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1172             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1173             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1174             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1175             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1176             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1177             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1178             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1179             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1180             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1181             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1182             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1183             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1184             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1185         </fields>
1186         <links/>
1187         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1188             <actions>
1189                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1190                 <retrieve/>
1191                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1192                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1193             </actions>
1194         </permacrud>
1195     </class>
1196
1197     <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">
1198         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1199             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1200             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1201             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1202             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1203             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1204         </fields>
1205         <links>
1206             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1207             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1208             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1209         </links>
1210         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1211             <actions>
1212                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1213                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1214                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1215                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1216             </actions>
1217         </permacrud>
1218     </class>
1219
1220         <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">
1221                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1222                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1223                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1224                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1225                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1226                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1227                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1228                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1229                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1230                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1231                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1232                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1233                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1234                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1235                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1236                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1237                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1238                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1239                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1240                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1241                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1242                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1243                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1244                 </fields>
1245                 <links>
1246                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1247                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1248                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1249                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1250                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1251                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1252                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1253                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1254                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1255                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1256                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1257                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1258                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1259             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1260                 </links>
1261         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1262             <actions>
1263                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1264                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1265                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1266                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1267             </actions>
1268         </permacrud>
1269         </class>
1270
1271         <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">
1272                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1273                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1274                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1275                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1276                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1277                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1278                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1279                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1280                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1281                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1282                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1283                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1284                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1285                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1286                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1287             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1288                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1289                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1290                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1291                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1292                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1293                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1294             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1295             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1296             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1297                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1298                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1299                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1300                 </fields>
1301                 <links>
1302                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1303                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1304                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1305                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1306                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1307                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1308                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1309                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1310                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1311                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1312                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1313                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1314                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1315             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1316                 </links>
1317         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1318             <actions>
1319                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1320                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1321                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1322                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1323             </actions>
1324         </permacrud>
1325         </class>
1326
1327         <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">
1328                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_id_seq">
1329                         <field reporter:label="Test ID" name="id" reporter:datatype="id"/>
1330                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="link"/>
1331                         <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1332                 </fields>
1333                 <links>
1334                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1335                 </links>
1336         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1337             <actions>
1338                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1339                     <context link="matchpoint" field="org_unit"/>
1340                 </create>
1341                 <retrieve/>
1342                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1343                     <context link="matchpoint" field="org_unit"/>
1344                 </update>
1345                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1346                     <context link="matchpoint" field="org_unit"/>
1347                 </delete>
1348             </actions>
1349         </permacrud>
1350         </class>
1351
1352         <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">
1353                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_map_id_seq">
1354                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
1355                         <field reporter:label="Circulation Modifier Subtest ID" name="circ_mod_test" reporter:datatype="link"/>
1356                         <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1357                 </fields>
1358                 <links>
1359                         <link field="circ_mod_test" reltype="has_a" key="id" map="" class="ccmcmt"/>
1360                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1361                 </links>
1362         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1363             <actions>
1364                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1365                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1366                 </create>
1367                 <retrieve/>
1368                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1369                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1370                 </update>
1371                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1372                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1373                 </delete>
1374             </actions>
1375         </permacrud>
1376         </class>
1377
1378         <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">
1379                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1380                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1381                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1382                 </fields>
1383                 <links/>
1384         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1385             <actions>
1386                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1387                 <retrieve/>
1388                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1389                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1390             </actions>
1391         </permacrud>
1392         </class>
1393
1394         <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">
1395                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1396                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1397                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1398                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1399                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1400                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1401                 </fields>
1402                 <links>
1403                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1404                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1405                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1406                 </links>
1407         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1408             <actions>
1409                 <create permission="ADMIN_SURVEY">
1410                     <context link="survey" field="owner"/>
1411                 </create>
1412                 <retrieve/>
1413                 <update permission="ADMIN_SURVEY">
1414                     <context link="survey" field="owner"/>
1415                 </update>
1416                 <delete permission="ADMIN_SURVEY">
1417                     <context link="survey" field="owner"/>
1418                 </delete>
1419             </actions>
1420         </permacrud>
1421         </class>
1422         <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">
1423                 <fields oils_persist:primary="id" oils_persist:sequence="">
1424                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1425                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1426                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1427                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1428                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1429                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1430                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1431                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1432                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1433                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1434                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1435                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1436                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1437                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1438                 </fields>
1439                 <links>
1440                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1441                 </links>
1442         </class>
1443         <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">
1444                 <fields oils_persist:primary="id" oils_persist:sequence="">
1445                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1446                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1447                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1448                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1449                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1450                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1451                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1452                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1453                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1454                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1455                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1456                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1457                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1458                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1459                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1460                 </fields>
1461                 <links>
1462                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1463                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1464                 </links>
1465         </class>
1466         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1467                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1468                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1469                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1470                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1471                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1472                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1473                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1474                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1475                 </fields>
1476                 <links>
1477                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1478                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1479                 </links>
1480         </class>
1481         <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">
1482                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
1483                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
1484                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
1485                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1486                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
1487                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
1488                 </fields>
1489                 <links>
1490                         <link field="usr" reltype="has_a" key="id" class="au"/>
1491                 </links>
1492         </class>
1493         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1494                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1495                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1496                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1497                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1498                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1499                 </fields>
1500                 <links>
1501                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1502                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1503                 </links>
1504         </class>
1505         <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">
1506                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1507                         <field name="field" reporter:datatype="link"/>
1508                         <field name="id" reporter:datatype="id" />
1509                         <field name="source" reporter:datatype="link"/>
1510                         <field name="value" reporter:datatype="text"/>
1511                 </fields>
1512                 <links>
1513                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1514                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1515                 </links>
1516         </class>
1517         <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">
1518                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1519                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1520                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1521                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1522                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1523                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1524                 </fields>
1525                 <links>
1526                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1527                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1528                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1529                 </links>
1530         </class>
1531         <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">
1532                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1533                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1534                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1535                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1536                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1537                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1538                 </fields>
1539                 <links>
1540                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1541                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1542                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1543                 </links>
1544         </class>
1545         <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">
1546                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
1547                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
1548                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
1549                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
1550                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
1551                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
1552                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
1553                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
1554                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
1555                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
1556                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
1557                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
1558                 </fields>
1559                 <links>
1560                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
1561                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
1562                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
1563                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
1564                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
1565                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1566                 </links>
1567         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1568             <actions>
1569                 <create permission="TRANSIT_COPY" context_field="owner">
1570                     <context link="target_copy" field="circ_lib"/>
1571                 </create>
1572                 <retrieve/>
1573                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
1574                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
1575             </actions>
1576         </permacrud>
1577         </class>
1578         <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">
1579                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
1580                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
1581                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
1582                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
1583                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
1584                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
1585                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
1586                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1587                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
1588                 </fields>
1589                 <links>
1590                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
1591                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1592                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
1593                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1594                 </links>
1595         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1596             <actions>
1597                 <create permission="ADMIN_SURVEY">
1598                     <context link="survey" field="owner"/>
1599                 </create>
1600                 <retrieve/>
1601                 <update permission="ADMIN_SURVEY">
1602                     <context link="survey" field="owner"/>
1603                 </update>
1604                 <delete permission="ADMIN_SURVEY">
1605                     <context link="survey" field="owner"/>
1606                 </delete>
1607             </actions>
1608         </permacrud>
1609         </class>
1610         <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">
1611                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
1612                         <field name="bucket" />
1613                         <field name="id" reporter:datatype="id" />
1614                         <field name="target_copy" reporter:datatype="link"/>
1615                         <field name="create_time" reporter:datatype="timestamp" />
1616                         <field name="pos" reporter:datatype="int" />
1617                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
1618                 </fields>
1619                 <links>
1620                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1621                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
1622             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
1623                 </links>
1624         </class>
1625         <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">
1626                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
1627                         <field name="id" reporter:datatype="id" />
1628                         <field name="item" reporter:datatype="link"/>
1629                         <field name="note" reporter:datatype="text" />
1630                 </fields>
1631                 <links>
1632                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
1633                 </links>
1634         </class>
1635         <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">
1636                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
1637                         <field name="active" reporter:datatype="bool"/>
1638                         <field name="create_date" reporter:datatype="timestamp"/>
1639                         <field name="creator" />
1640                         <field name="deleted" reporter:datatype="bool"/>
1641                         <field name="edit_date" reporter:datatype="timestamp"/>
1642                         <field name="editor" />
1643                         <field name="id" reporter:datatype="id" />
1644                         <field name="last_xact_id" />
1645                         <field name="marc" />
1646                         <field name="source" />
1647                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
1648                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
1649                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1650                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
1651                 </fields>
1652                 <links>
1653                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1654                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1655                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1656                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
1657                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
1658                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
1659                 </links>
1660                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1661                         <actions>
1662                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
1663                                 <retrieve/>
1664                                 <update permission="UPDATE_MARC" global_required="true"/>
1665                                 <delete permission="UPDATE_MARC" global_required="true"/>
1666                         </actions>
1667                 </permacrud>
1668         </class>
1669         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
1670                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
1671                         <field name="char_encoding" />
1672                         <field name="id" />
1673                         <field name="record" />
1674                         <field name="record_status" />
1675                 </fields>
1676                 <links>
1677                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
1678                 </links>
1679         </class>
1680         <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">
1681                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
1682                         <field name="id" reporter:datatype="id" />
1683                         <field name="bib" reporter:datatype="link" />
1684                         <field name="authority" reporter:datatype="link" />
1685                 </fields>
1686                 <links>
1687                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
1688                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
1689                 </links>
1690         </class>
1691         <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">
1692                 <fields oils_persist:primary="code" oils_persist:sequence="">
1693                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1694                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1695                 </fields>
1696                 <links/>
1697         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1698             <actions>
1699                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1700                 <retrieve/>
1701                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1702                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1703             </actions>
1704         </permacrud>
1705         </class>
1706         <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">
1707                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
1708                         <field name="accepting_usr" />
1709                         <field name="amount" reporter:datatype="money" />
1710                         <field name="amount_collected" reporter:datatype="money" />
1711                         <field name="approval_code" reporter:datatype="text"/>
1712                         <field name="cash_drawer" reporter:datatype="link"/>
1713                         <field name="cc_first_name" reporter:datatype="text"/>
1714                         <field name="cc_last_name" reporter:datatype="text"/>
1715                         <field name="cc_number" reporter:datatype="text"/>
1716                         <field name="cc_order_number" reporter:datatype="text"/>
1717                         <field name="cc_type" reporter:datatype="text"/>
1718                         <field name="cc_processor" reporter:datatype="text"/>
1719                         <field name="expire_month" reporter:datatype="int" />
1720                         <field name="expire_year" reporter:datatype="int" />
1721                         <field name="id" reporter:datatype="id" />
1722                         <field name="note" reporter:datatype="text"/>
1723                         <field name="payment_ts" reporter:datatype="timestamp"/>
1724                         <field name="xact" reporter:datatype="link"/>
1725                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
1726                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
1727                 </fields>
1728                 <links>
1729                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
1730                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
1731                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
1732                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
1733                 </links>
1734         </class>
1735         <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">
1736                 <fields oils_persist:primary="name">
1737                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1738                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
1739                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
1740                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
1741                 </fields>
1742                 <links/>
1743         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1744             <actions>
1745                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
1746                 <retrieve/>
1747                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
1748                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
1749             </actions>
1750         </permacrud>
1751         </class>
1752
1753         <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">
1754                 <fields oils_persist:primary="alias">
1755                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
1756                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
1757                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
1758                 </fields>
1759                 <links>
1760                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
1761                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1762                 </links>
1763         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1764             <actions>
1765                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
1766                 <retrieve/>
1767                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
1768                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
1769             </actions>
1770         </permacrud>
1771         </class>
1772
1773         <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">
1774                 <fields oils_persist:primary="name">
1775                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
1776                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1777                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
1778                 </fields>
1779                 <links>
1780                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
1781                 </links>
1782         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1783             <actions>
1784                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
1785                 <retrieve/>
1786                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
1787                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
1788             </actions>
1789         </permacrud>
1790         </class>
1791
1792         <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">
1793                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
1794                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
1795                         <field reporter:label="ID" name="id" reporter:datatype="id" />
1796                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
1797                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1798                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
1799                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
1800                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
1801                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
1802                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
1803                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
1804                 </fields>
1805                 <links>
1806                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
1807                 </links>
1808         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1809             <actions>
1810                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
1811                 <retrieve/>
1812                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
1813                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
1814             </actions>
1815         </permacrud>
1816         </class>
1817         <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">
1818                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
1819                         <field name="id" reporter:datatype="id" />
1820                         <field name="name" reporter:datatype="text"/>
1821                         <field name="xpath" reporter:datatype="text"/>
1822                         <field name="format" reporter:datatype="link"/>
1823                         <field name="first_word" reporter:datatype="bool" />
1824                 </fields>
1825                 <links/>
1826         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1827             <actions>
1828                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
1829                 <retrieve/>
1830                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
1831                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
1832             </actions>
1833         </permacrud>
1834         </class>
1835         <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">
1836                 <fields oils_persist:primary="code" oils_persist:sequence="">
1837                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1838                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1839                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1840                 </fields>
1841                 <links/>
1842         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1843             <actions>
1844                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1845                 <retrieve/>
1846                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1847                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1848             </actions>
1849         </permacrud>
1850         </class>
1851         <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">
1852                 <fields oils_persist:primary="code" oils_persist:sequence="">
1853                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1854                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1855                 </fields>
1856                 <links/>
1857         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1858             <actions>
1859                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1860                 <retrieve/>
1861                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1862                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1863             </actions>
1864         </permacrud>
1865         </class>
1866     <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">
1867         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
1868             <field reporter:label="Call number class ID" name="id" reporter_datatype="id"/>
1869             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1870             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
1871             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
1872         </fields>
1873         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1874             <actions>
1875                 <retrieve/>
1876             </actions>
1877         </permacrud>
1878     </class>
1879         <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">
1880                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
1881                         <field reporter:label="ID" name="id" reporter:datatype="id" />
1882                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1883                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
1884                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1885                 </fields>
1886                 <links>
1887                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1888                 </links>
1889         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1890             <actions>
1891                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
1892                 <retrieve/>
1893                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
1894                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
1895             </actions>
1896         </permacrud>
1897         </class>
1898         <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">
1899                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
1900                         <field reporter:label="ID" name="id" reporter:datatype="id" />
1901                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1902                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
1903                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1904                 </fields>
1905                 <links>
1906                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1907                 </links>
1908         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1909             <actions>
1910                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
1911                 <retrieve/>
1912                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
1913                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
1914             </actions>
1915         </permacrud>
1916         </class>
1917         <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">
1918                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
1919                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
1920                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
1921                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
1922                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
1923                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
1924                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
1925                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
1926                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
1927                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1928                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
1929                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1930                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
1931                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
1932                         <field reporter:label="Sort Key" name="label_sortkey" reporter:datatype="text"/>
1933                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
1934                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
1935                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
1936                 </fields>
1937                 <links>
1938                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1939                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1940                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
1941                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1942                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
1943                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
1944                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
1945                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
1946                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
1947                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
1948                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
1949                 </links>
1950         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1951             <actions>
1952                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
1953                 <retrieve/>
1954                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
1955                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
1956             </actions>
1957         </permacrud>
1958         </class>
1959         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
1960                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
1961                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
1962                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
1963                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1964                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
1965                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1966                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
1967                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
1968                 </fields>
1969                 <links>
1970                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
1971                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
1972         </links>
1973         </class>
1974         <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">
1975                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
1976                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1977                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
1978                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
1979                 </fields>
1980                 <links>
1981                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
1982                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
1983                 </links>
1984         </class>
1985         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
1986                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
1987                         <field name="id" reporter:datatype="id" />
1988                         <field name="value" oils_persist:i18n="true" />
1989                 </fields>
1990                 <links/>
1991         </class>
1992         <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">
1993                 <fields oils_persist:primary="usr" oils_persist:sequence="">
1994                         <field name="balance_owed" reporter:datatype="money" />
1995                         <field name="total_owed" reporter:datatype="money" />
1996                         <field name="total_paid" reporter:datatype="money" />
1997                         <field name="usr" reporter:datatype="link"/>
1998                 </fields>
1999                 <links>
2000                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2001         </links>
2002         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2003             <actions>
2004                 <retrieve permission="VIEW_USER">
2005                     <context link="usr" field="home_ou"/>
2006                 </retrieve>
2007             </actions>
2008         </permacrud>
2009         </class>
2010         <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">
2011                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2012                         <field name="collector" />
2013                         <field name="enter_time" reporter:datatype="timestamp"/>
2014                         <field name="id" reporter:datatype="id" />
2015                         <field name="location" reporter:datatype="link"/>
2016                         <field name="usr" reporter:datatype="link"/>
2017                 </fields>
2018                 <links>
2019                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2020                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2021                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2022                 </links>
2023         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2024             <actions>
2025                 <create permission="money.collections_tracker.create" context_field="location"/>
2026                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2027                 <delete permission="money.collections_tracker.create" context_field="location"/>
2028             </actions>
2029         </permacrud>
2030         </class>
2031         <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">
2032                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2033                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2034                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2035                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2036                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2037                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2038                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2039                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2040                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2041                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2042                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2043                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2044                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2045                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2046                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2047                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2048                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2049                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2050                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2051                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2052                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2053                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2054                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2055                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2056                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2057                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2058                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2059                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2060                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2061                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2062                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2063                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2064                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2065                 </fields>
2066                 <links>
2067                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2068                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2069                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2070                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2071                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2072                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2073                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2074                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2075                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2076                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2077                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2078                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2079                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2080                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
2081                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
2082                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
2083                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
2084                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
2085                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
2086                 </links>
2087         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2088             <actions>
2089                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2090                 <retrieve/>
2091                 <update permission="UPDATE_MARC" global_required="true"/>
2092             </actions>
2093         </permacrud>
2094         </class>
2095         <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">
2096                 <fields oils_persist:primary="id">
2097                         <field name="dow_0_close" />
2098                         <field name="dow_0_open" />
2099                         <field name="dow_1_close" />
2100                         <field name="dow_1_open" />
2101                         <field name="dow_2_close" />
2102                         <field name="dow_2_open" />
2103                         <field name="dow_3_close" />
2104                         <field name="dow_3_open" />
2105                         <field name="dow_4_close" />
2106                         <field name="dow_4_open" />
2107                         <field name="dow_5_close" />
2108                         <field name="dow_5_open" />
2109                         <field name="dow_6_close" />
2110                         <field name="dow_6_open" />
2111                         <field name="id" reporter:datatype="id" />
2112                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2113                 </fields>
2114                 <links>
2115                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2116                 </links>
2117         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2118             <actions>
2119                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2120                 <retrieve/>
2121                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2122                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2123             </actions>
2124         </permacrud>
2125         </class>
2126         <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">
2127                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
2128                         <field name="id" reporter:datatype="id" />
2129                         <field name="record" reporter:datatype="link"/>
2130                         <field name="label" reporter:datatype="text"/>
2131                         <field name="label_sortkey" reporter:datatype="text"/>
2132                 </fields>
2133                 <links>
2134                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2135                 </links>
2136         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2137             <actions>
2138                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
2139                 <retrieve/>
2140                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
2141                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
2142             </actions>
2143         </permacrud>
2144         </class>
2145         <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">
2146                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
2147                         <field name="id" reporter:datatype="id" />
2148                         <field name="target_copy" reporter:datatype="link" />
2149                         <field name="part" reporter:datatype="link"/>
2150                 </fields>
2151                 <links>
2152                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2153                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
2154                 </links>
2155         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2156             <actions>
2157                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
2158                 <retrieve/>
2159                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
2160                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
2161             </actions>
2162         </permacrud>
2163         </class>
2164         <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">
2165                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
2166                         <field name="close_end" reporter:datatype="timestamp" />
2167                         <field name="close_start" reporter:datatype="timestamp" />
2168                         <field name="id" reporter:datatype="id" />
2169                         <field name="org_unit" reporter:datatype="org_unit"/>
2170                         <field name="reason" reporter:datatype="text"/>
2171                 </fields>
2172                 <links>
2173                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2174                 </links>
2175         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2176             <actions>
2177                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2178                 <retrieve/>
2179                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2180                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2181             </actions>
2182         </permacrud>
2183         </class>
2184         <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">
2185                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
2186                         <field name="extended" reporter:datatype="interval"/>
2187                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
2188                         <field name="max_renewals" reporter:datatype="int" />
2189                         <field name="name" reporter:datatype="text"/>
2190                         <field name="normal" reporter:datatype="interval"/>
2191                         <field name="shrt" reporter:datatype="interval"/>
2192                 </fields>
2193                 <links>
2194                 </links>
2195         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2196             <actions>
2197                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2198                 <retrieve/>
2199                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2200                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2201             </actions>
2202         </permacrud>
2203         </class>
2204
2205         <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">
2206                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
2207                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2208                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2209             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
2210                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2211             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
2212                 </fields>
2213                 <links>
2214             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2215                 </links>
2216                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2217             <actions>
2218                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2219                 <retrieve/>
2220                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2221                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2222             </actions>
2223                 </permacrud>
2224         </class>
2225
2226         <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">
2227                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
2228                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2229                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2230                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2231             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
2232                 </fields>
2233                 <links>
2234                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2235                 </links>
2236                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2237             <actions>
2238                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2239                 <retrieve/>
2240                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2241                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2242             </actions>
2243                 </permacrud>
2244         </class>
2245
2246         <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">
2247                 <fields oils_persist:primary="id" oils_persist:sequence="">
2248                         <field name="balance_owed" reporter:datatype="money"/>
2249                         <field name="id" reporter:datatype="id" />
2250                         <field name="last_billing_note" reporter:datatype="text"/>
2251                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
2252                         <field name="last_billing_type" reporter:datatype="text"/>
2253                         <field name="last_payment_note" reporter:datatype="text"/>
2254                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
2255                         <field name="last_payment_type" reporter:datatype="text"/>
2256                         <field name="total_owed" reporter:datatype="money"/>
2257                         <field name="total_paid" reporter:datatype="money"/>
2258                         <field name="usr" reporter:datatype="link"/>
2259                         <field name="xact_finish" reporter:datatype="timestamp" />
2260                         <field name="xact_start" reporter:datatype="timestamp" />
2261                         <field name="xact_type" reporter:datatype="text"/>
2262                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
2263                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
2264                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
2265                         <field name="billing_location" reporter:datatype="link"/>
2266                 </fields>
2267                 <links>
2268                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2269                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
2270                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
2271                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
2272                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2273                 </links>
2274         </class>
2275         <class id="au" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
2276                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
2277                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
2278                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
2279                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
2280                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
2281                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
2282                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
2283                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
2284                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2285                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
2286                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
2287                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
2288                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2289                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
2290                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
2291                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
2292                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
2293                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
2294                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
2295                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2296                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
2297                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
2298                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
2299                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
2300                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
2301                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
2302                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
2303                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
2304                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
2305                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
2306                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
2307                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
2308                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
2309                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
2310                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
2311                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
2312                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
2313                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
2314                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
2315                         <field reporter:label="Password" name="passwd"  reporter:datatype="text"/>
2316                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
2317                         <field reporter:label="Prefix" name="prefix"  reporter:datatype="text"/>
2318                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
2319                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
2320                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
2321                         <field reporter:label="Suffix/Title" name="suffix"  reporter:datatype="text"/>
2322                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
2323                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
2324                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
2325                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
2326                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
2327                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
2328                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2329                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2330                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
2331                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
2332                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2333                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2334                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
2335                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
2336                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
2337                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
2338                 </fields>
2339                 <links>
2340                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
2341                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
2342                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
2343                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
2344                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
2345                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
2346                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
2347                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
2348                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
2349                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
2350                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
2351                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
2352                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
2353                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
2354                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
2355                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
2356                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
2357                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
2358                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
2359                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
2360                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
2361                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
2362                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
2363                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
2364                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
2365                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
2366                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
2367                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
2368                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
2369                 </links>
2370         </class>
2371
2372         <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">
2373                 <fields oils_persist:primary="name">
2374                         <field name="name" reporter:datatype="text"/>
2375                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2376                 </fields>
2377                 <links/>
2378                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2379                         <actions>
2380                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2381                                 <retrieve/>
2382                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2383                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2384                         </actions>
2385                 </permacrud>
2386         </class>
2387         <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">
2388                 <fields oils_persist:primary="name">
2389                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
2390                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
2391                         <field name="description" reporter:label="Description" reporter:datatype="text"/>
2392                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
2393                         <field name="fm_class" reporter:label="Fielmapper Class" reporter:datatype="text"/>
2394                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
2395                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
2396                 </fields>
2397                 <links>
2398                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
2399                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2400                 </links>
2401                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2402                         <actions>
2403                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2404                                 <retrieve/>
2405                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2406                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2407                         </actions>
2408                 </permacrud>
2409         </class>
2410         <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">
2411                 <fields oils_persist:primary="name">
2412                         <field name="name" reporter:datatype="text"/>
2413                         <field name="label" reporter:datatype="text"/>
2414                         <field name="description" reporter:datatype="text"/>
2415                         <field name="datatype" reporter:datatype="text"/>
2416                         <field name="view_perm" reporter:datatype="link"/>
2417                         <field name="update_perm" reporter:datatype="link"/>
2418                         <field name="fm_class" reporter:datatype="text"/>
2419                         <field name="grp" reporter:datatype="link"/>
2420                 </fields>
2421                 <links>
2422                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
2423                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
2424                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
2425                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2426                 </links>
2427                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2428                         <actions>
2429                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2430                                 <retrieve/>
2431                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2432                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2433                         </actions>
2434                 </permacrud>
2435         </class>
2436         <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">
2437                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
2438                         <field name="id" />
2439                         <field name="name"  reporter:datatype="text"/>
2440                         <field name="org_unit" reporter:datatype="org_unit"/>
2441                         <field name="value"  reporter:datatype="text"/>
2442                 </fields>
2443                 <links>
2444                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2445                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
2446                 </links>
2447         </class>
2448         <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">
2449                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
2450                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2451                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
2452                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2453                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
2454                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2455                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
2456                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
2457                 </fields>
2458                 <links>
2459                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
2460                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2461                 </links>
2462         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2463             <actions>
2464                 <create permission="CREATE_COPY_NOTE">
2465                     <context link="owning_copy" field="circ_lib"/>
2466                 </create>
2467                 <retrieve permission="VIEW_COPY_NOTES">
2468                     <context link="owning_copy" field="circ_lib"/>
2469                 </retrieve>
2470                 <update permission="UPDATE_COPY_NOTE">
2471                     <context link="owning_copy" field="circ_lib"/>
2472                 </update>
2473                 <delete permission="DELETE_COPY_NOTE">
2474                     <context link="owning_copy" field="circ_lib"/>
2475                 </delete>
2476             </actions>
2477         </permacrud>
2478         </class>
2479         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
2480                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
2481                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
2482                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
2483                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
2484                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2485                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
2486                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
2487                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
2488                 </fields>
2489                 <links>
2490                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2491                 </links>
2492         </class>
2493         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
2494                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
2495                         <field name="fingerprint"  reporter:datatype="text"/>
2496                         <field name="id" reporter:datatype="id" />
2497                         <field name="master_record" reporter:datatype="link"/>
2498                         <field name="mods"  reporter:datatype="text"/>
2499                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
2500                 </fields>
2501                 <links>
2502                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
2503                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
2504                 </links>
2505         </class>
2506         <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">
2507                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
2508                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2509                         <field name="name"  reporter:datatype="text"/>
2510                 </fields>
2511                 <links/>
2512         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2513             <actions>
2514                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
2515                 <retrieve/>
2516                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
2517                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
2518             </actions>
2519         </permacrud>
2520         </class>
2521         <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">
2522                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
2523                         <field name="code"  reporter:datatype="text"/>
2524                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
2525                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
2526                 </fields>
2527                 <links/>
2528         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2529             <actions>
2530                 <create permission="CREATE_PERM" global_required="true"/>
2531                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
2532                 <update permission="UPDATE_PERM" global_required="true"/>
2533                 <delete permission="DELETE_PERM" global_required="true"/>
2534             </actions>
2535         </permacrud>
2536         </class>
2537         <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">
2538                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
2539                         <field name="id" reporter:datatype="id" />
2540                         <field name="metarecord" reporter:datatype="link"/>
2541                         <field name="source" reporter:datatype="link"/>
2542                 </fields>
2543                 <links>
2544                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2545                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
2546                 </links>
2547         </class>
2548         <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">
2549                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
2550                         <field name="id" reporter:datatype="id" />
2551                         <field name="field" reporter:datatype="link"/>
2552                         <field name="source" reporter:datatype="link"/>
2553                         <field name="value"  reporter:datatype="text"/>
2554                 </fields>
2555                 <links>
2556                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2557                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2558                 </links>
2559         </class>
2560         <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">
2561                 <oils_persist:source_definition>
2562                         SELECT * FROM metabib.author_field_entry
2563                                                 UNION ALL
2564                         SELECT * FROM metabib.keyword_field_entry
2565                                                 UNION ALL
2566                         SELECT * FROM metabib.identifier_field_entry
2567                                                 UNION ALL
2568                         SELECT * FROM metabib.title_field_entry
2569                                                 UNION ALL
2570                         SELECT * FROM metabib.subject_field_entry
2571                                                 UNION ALL
2572                         SELECT * FROM metabib.series_field_entry
2573                 </oils_persist:source_definition>
2574                 <fields>
2575                         <field name="field" reporter:datatype="link"/>
2576                         <field name="id" reporter:datatype="id" />
2577                         <field name="source" reporter:datatype="link"/>
2578                         <field name="value"  reporter:datatype="text"/>
2579                 </fields>
2580                 <links>
2581                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2582                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2583                 </links>
2584         </class>
2585         <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">
2586                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
2587                         <field name="field" reporter:datatype="link"/>
2588                         <field name="id" reporter:datatype="id" />
2589                         <field name="source" reporter:datatype="link"/>
2590                         <field name="value"  reporter:datatype="text"/>
2591                 </fields>
2592                 <links>
2593                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2594                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2595                 </links>
2596         </class>
2597         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
2598                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2599                         <field name="accepting_usr" reporter:datatype="link"/>
2600                         <field name="amount" reporter:datatype="money" />
2601                         <field name="amount_collected" reporter:datatype="money" />
2602                         <field name="cash_drawer" reporter:datatype="link"/>
2603                         <field name="id" reporter:datatype="id" />
2604                         <field name="note"  reporter:datatype="text"/>
2605                         <field name="payment_ts" reporter:datatype="timestamp"/>
2606                         <field name="xact" reporter:datatype="link"/>
2607                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2608                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2609                 </fields>
2610                 <links>
2611                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2612                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2613                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2614                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2615                 </links>
2616         </class>
2617         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
2618                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2619                         <field name="accepting_usr" reporter:datatype="link"/>
2620                         <field name="amount" reporter:datatype="money" />
2621                         <field name="amount_collected" reporter:datatype="money" />
2622                         <field name="id" reporter:datatype="id" />
2623                         <field name="note"  reporter:datatype="text"/>
2624                         <field name="payment_ts" reporter:datatype="timestamp"/>
2625                         <field name="xact" reporter:datatype="link"/>
2626                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2627                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2628                 </fields>
2629                 <links>
2630                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2631                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2632                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2633                 </links>
2634         </class>
2635         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
2636                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
2637                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
2638                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2639                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2640                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
2641                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2642                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2643                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
2644                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2645                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
2646                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2647                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2648                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
2649                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2650                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
2651                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
2652                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
2653                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
2654                 </fields>
2655                 <links>
2656                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2657                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
2658                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
2659                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
2660                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
2661                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
2662                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
2663                 </links>
2664         </class>
2665
2666         <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">
2667                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
2668                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2669                         <field name="name"  reporter:datatype="text"/>
2670                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
2671                         <field name="block_list" reporter:datatype="text"/>
2672                         <field name="org_depth" reporter:datatype="int"/>
2673                 </fields>
2674                 <links/>
2675         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2676             <actions>
2677                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2678                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
2679                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2680                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2681             </actions>
2682         </permacrud>
2683         </class>
2684         <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">
2685                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
2686                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
2687                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
2688                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
2689                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
2690                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
2691                 </fields>
2692                 <links>
2693                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
2694                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
2695                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2696         </links>
2697         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2698             <actions>
2699                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2700                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2701                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2702                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2703             </actions>
2704         </permacrud>
2705         </class>
2706         <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">
2707                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
2708                         <field name="holdable" reporter:datatype="bool"/>
2709                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2710                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2711                         <field name="opac_visible" reporter:datatype="bool"/>
2712                 </fields>
2713                 <links/>
2714         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2715             <actions>
2716                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
2717                 <retrieve/>
2718                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
2719                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
2720             </actions>
2721         </permacrud>
2722         </class>
2723         <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">
2724                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
2725                         <field name="id" reporter:datatype="id" reporter:label="ID" />
2726                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
2727                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
2728                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
2729                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
2730                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
2731                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
2732                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
2733                 </fields>
2734                 <links>
2735                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2736                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2737                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2738                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
2739                 </links>
2740                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2741                         <actions>
2742                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
2743                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
2744                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
2745                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
2746                         </actions>
2747                 </permacrud>
2748         </class>
2749         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
2750                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
2751                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
2752                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
2753                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
2754                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
2755                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
2756                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
2757                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
2758                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
2759                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
2760                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2761                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
2762                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
2763                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
2764                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
2765                 </fields>
2766                 <links>
2767                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2768                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
2769                 </links>
2770         </class>
2771
2772         <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">
2773                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
2774                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2775                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
2776                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2777                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
2778                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
2779                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
2780                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
2781                 </fields>
2782                 <links>
2783                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
2784                 </links>
2785         </class>
2786
2787         <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">
2788                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
2789                         <field name="call_number" />
2790                         <field name="create_date" reporter:datatype="timestamp"/>
2791                         <field name="creator" reporter:datatype="link"/>
2792                         <field name="id" reporter:datatype="id" />
2793                         <field name="pub" reporter:datatype="bool"/>
2794                         <field name="title"  reporter:datatype="text"/>
2795                         <field name="value"  reporter:datatype="text"/>
2796                 </fields>
2797                 <links>
2798                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2799                 </links>
2800         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2801             <actions>
2802                 <create permission="CREATE_VOLUME_NOTE">
2803                     <context link="call_number" field="owning_lib"/>
2804                 </create>
2805                 <retrieve permission="VIEW_VOLUME_NOTES">
2806                     <context link="call_number" field="owning_lib"/>
2807                 </retrieve>
2808                 <update permission="UPDATE_VOLUME_NOTE">
2809                     <context link="call_number" field="owning_lib"/>
2810                 </update>
2811                 <delete permission="DELETE_VOLUME_NOTE">
2812                     <context link="call_number" field="owning_lib"/>
2813                 </delete>
2814             </actions>
2815         </permacrud>
2816         </class>
2817         <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">
2818                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
2819                         <field name="create_date" reporter:datatype="timestamp"/>
2820                         <field name="creator" reporter:datatype="link"/>
2821                         <field name="edit_date" reporter:datatype="timestamp"/>
2822                         <field name="editor" reporter:datatype="link"/>
2823                         <field name="id" reporter:datatype="id" />
2824                         <field name="record" reporter:datatype="link"/>
2825                         <field name="value" reporter:datatype="text"/>
2826                 </fields>
2827                 <links>
2828                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2829                 </links>
2830         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2831             <actions>
2832                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2833                 <retrieve/>
2834                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2835                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2836             </actions>
2837         </permacrud>
2838         </class>
2839         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
2840         <oils_persist:source_definition>
2841 SELECT  usr,
2842         SUM(
2843             CASE
2844                 WHEN (
2845                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
2846                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
2847                 ) THEN 1
2848                 ELSE 0
2849             END
2850         ) AS out,
2851
2852         SUM(
2853             CASE
2854                 WHEN (
2855                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
2856                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
2857                 ) THEN 1
2858                 ELSE 0
2859             END
2860         ) AS overdue,
2861
2862         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
2863         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
2864         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
2865   FROM  action.circulation
2866   WHERE checkin_time IS NULL
2867   GROUP BY 1
2868         </oils_persist:source_definition>
2869         <fields oils_persist:primary="usr">
2870             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
2871             <field reporter:label="Out" name="out" reporter:datatype="text"/>
2872             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
2873             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
2874             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
2875             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
2876         </fields>
2877         <links>
2878             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2879         </links>
2880         </class>
2881         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
2882         <oils_persist:source_definition>
2883 SELECT  usr,
2884         ARRAY_TO_STRING(ARRAY_ACCUM(
2885             CASE
2886                 WHEN (
2887                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
2888                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
2889                 ) THEN id
2890                 ELSE 0
2891             END
2892         ),',') AS out,
2893
2894         ARRAY_TO_STRING(ARRAY_ACCUM(
2895             CASE
2896                 WHEN (
2897                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
2898                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
2899                 ) THEN id
2900                 ELSE 0
2901             END
2902         ),',') AS overdue,
2903
2904         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END),',') AS lost,
2905         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END),',') AS claims_returned,
2906         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id ELSE 0 END),',') AS long_overdue
2907   FROM  action.circulation
2908   WHERE checkin_time IS NULL
2909   GROUP BY 1
2910         </oils_persist:source_definition>
2911         <fields oils_persist:primary="usr">
2912             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
2913             <field reporter:label="Out" name="out" reporter:datatype="text"/>
2914             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
2915             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
2916             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
2917             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
2918         </fields>
2919         <links>
2920             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2921         </links>
2922         </class>
2923         <class id="circ" controller="open-ils.cstore" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
2924                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2925                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2926                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2927                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2928                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2929                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2930                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2931                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2932                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2933                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2934                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2935                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2936                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2937                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2938                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2939                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2940                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2941                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2942                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2943                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
2944                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2945                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2946                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2947                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
2948                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2949                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2950                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2951                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2952                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
2953                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
2954                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
2955                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2956                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2957                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2958                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2959                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2960                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2961                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
2962                 </fields>
2963                 <links>
2964                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2965                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2966                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2967                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2968                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2969                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2970                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2971                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2972                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2973                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2974                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2975                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2976                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2977                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2978                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2979                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2980                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
2981                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
2982                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
2983                 </links>
2984         </class>
2985         <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">
2986                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2987                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2988                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2989                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2990                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2991                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2992                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2993                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2994                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2995                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2996                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2997                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2998                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2999                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3000                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3001                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3002                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3003                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3004                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3005                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3006                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3007                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3008                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3009                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3010                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3011                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3012                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3013                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3014                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3015                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3016                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3017                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3018                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3019                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3020                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3021                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3022                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3023                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3024                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3025                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3026                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3027                 </fields>
3028                 <links>
3029                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3030                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3031                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3032                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3033                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3034                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3035                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3036                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3037                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3038                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3039                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3040                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3041                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3042                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3043                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3044                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3045                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3046                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3047                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3048                 </links>
3049         </class>
3050         <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">
3051                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3052                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3053                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3054                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3055                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3056                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3057                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3058                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3059                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3060                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3061                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3062                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3063                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3064                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3065                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3066                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3067                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3068                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3069                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3070                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3071                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3072                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3073                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3074                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3075                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3076                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3077                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3078                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3079                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3080                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3081                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3082                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3083                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3084                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3085                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3086                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3087                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3088                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3089                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3090                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3091                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3092                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3093                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3094                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3095                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3096                 </fields>
3097                 <links>
3098                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3099                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3100                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3101                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3102                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3103                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3104                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3105                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3106                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3107                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3108                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3109                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3110                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3111                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3112                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3113                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3114                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3115                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3116                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3117                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3118                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3119                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
3120                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3121                 </links>
3122         </class>
3123
3124         <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">
3125                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
3126                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3127                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
3128                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3129                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3130                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3131                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3132                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
3133                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
3134                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
3135                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
3136                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3137                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3138                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3139                 </fields>
3140                 <links>
3141                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3142                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3143                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
3144                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
3145                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
3146                 </links>
3147                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3148                         <actions>
3149                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
3150                                 <retrieve />
3151                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
3152                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
3153                         </actions>
3154                 </permacrud>
3155         </class>
3156
3157         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
3158                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
3159                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
3160                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3161                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
3162                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
3163                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3164                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3165                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
3166                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
3167                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3168                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3169                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3170                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
3171                 </fields>
3172                 <links>
3173                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3174                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
3175                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
3176                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
3177                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
3178                 </links>
3179                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3180                         <actions>
3181                                 <create permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
3182                                 <retrieve />
3183                                 <update permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
3184                                 <delete permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
3185                         </actions>
3186                 </permacrud>
3187         </class>
3188         
3189         <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">
3190                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
3191                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
3192                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3193                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
3194                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
3195                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
3196                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
3197                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3198                 </fields>
3199                 <links>
3200                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3201                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
3202                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
3203                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
3204                 </links>
3205                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3206                         <actions>
3207                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
3208                                 <retrieve />
3209                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
3210                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
3211                         </actions>
3212                 </permacrud>
3213         </class>
3214         
3215         <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">
3216                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
3217                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
3218                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3219                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
3220                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
3221                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3222                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3223                 </fields>
3224                 <links>
3225                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3226                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
3227                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
3228                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
3229                 </links>
3230                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3231                         <actions>
3232                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
3233                                 <retrieve />
3234                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
3235                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
3236                         </actions>
3237                 </permacrud>
3238         </class>
3239         
3240         <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">
3241                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
3242                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
3243                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
3244                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
3245                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
3246                 </fields>
3247                 <links>
3248                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
3249                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
3250                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
3251                 </links>
3252                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3253                         <actions>
3254                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
3255                                 <retrieve />
3256                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
3257                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
3258                         </actions>
3259                 </permacrud>
3260         </class>
3261         
3262         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
3263                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3264                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3265                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3266                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
3267                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
3268                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3269                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3270                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3271                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3272                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3273                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
3274                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
3275                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
3276                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
3277                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
3278                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
3279                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
3280                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
3281                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
3282                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3283                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3284                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3285                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
3286                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
3287                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
3288                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
3289                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
3290                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
3291                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3292                 </fields>
3293                 <links>
3294                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3295                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3296                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3297                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3298                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3299                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
3300                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
3301                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3302                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3303                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
3304                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
3305                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
3306                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
3307                 </links>
3308                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3309                         <actions>
3310                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3311                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3312                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3313                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3314                         </actions>
3315                 </permacrud>
3316         </class>
3317         
3318         <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">
3319                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
3320                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
3321                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
3322                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
3323                 </fields>
3324                 <links>
3325                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3326                         <link field="attr_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_RESERVATION_ATTR_MAP" global_required='true'/>
3331                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3332                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3333                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3334                         </actions>
3335                 </permacrud>
3336         </class>
3337
3338         <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">
3339                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
3340                         <field name="bucket" reporter:datatype="link"/>
3341                         <field name="id" reporter:datatype="id" />
3342                         <field name="target_call_number" reporter:datatype="link" />
3343                         <field name="create_time" reporter:datatype="timestamp" />
3344                         <field name="pos" reporter:datatype="int" />
3345                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
3346                 </fields>
3347                 <links>
3348                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
3349                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
3350             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
3351                 </links>
3352         </class>
3353         <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">
3354                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
3355                         <field name="id" reporter:datatype="id" />
3356                         <field name="item" reporter:datatype="link"/>
3357                         <field name="note" reporter:datatype="text" />
3358                 </fields>
3359                 <links>
3360                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
3361                 </links>
3362         </class>
3363         <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">
3364                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
3365                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3366                         <field name="btype" reporter:datatype="text"/>
3367                         <field name="id" reporter:datatype="id" />
3368                         <field name="name" reporter:datatype="text"/>
3369                         <field name="owner" reporter:datatype="link"/>
3370                         <field name="pub" reporter:datatype="bool"/>
3371                         <field name="create_time" reporter:datatype="timestamp" />
3372                 </fields>
3373                 <links>
3374                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3375                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
3376                 </links>
3377         </class>
3378         <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">
3379                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
3380                         <field name="id" reporter:datatype="id" />
3381                         <field name="bucket" reporter:datatype="link"/>
3382                         <field name="note" reporter:datatype="text" />
3383                 </fields>
3384                 <links>
3385                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
3386                 </links>
3387         </class>
3388         <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">
3389                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
3390                         <field name="hold" reporter:datatype="link"/>
3391                         <field name="id" reporter:datatype="id" />
3392                         <field name="target_copy" reporter:datatype="link"/>
3393                 </fields>
3394                 <links>
3395                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3396                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3397                 </links>
3398         </class>
3399         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
3400                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
3401                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
3402                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
3403                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
3404                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
3405                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
3406                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
3407                 </fields>
3408                 <links>
3409                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3410                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
3411                 </links>
3412         </class>
3413         <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">
3414                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
3415                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
3416                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
3417                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
3418                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3419                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3420                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
3421                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
3422                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
3423                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3424                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
3425                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
3426                 </fields>
3427                 <links>
3428                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3429                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
3430                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
3431                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
3432                 </links>
3433         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3434             <actions>
3435                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
3436                 <retrieve/>
3437                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
3438                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
3439             </actions>
3440         </permacrud>
3441         </class>
3442
3443     <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">
3444         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
3445             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
3446             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
3447             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
3448             <field reporter:label="Position" name="position" reporter:datatype="int"/>
3449         </fields>
3450         <links>
3451             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3452             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
3453         </links>
3454         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3455             <actions>
3456                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3457                 <retrieve/>
3458                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3459                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3460             </actions>
3461         </permacrud>
3462     </class>
3463
3464         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
3465                 <fields>
3466                         <field name="sre_id" oils_persist:virtual="true" />
3467                         <field name="location" oils_persist:virtual="true" />
3468                         <field name="owning_lib" oils_persist:virtual="true" />
3469                         <field name="basic_holdings" oils_persist:virtual="true" />
3470                         <field name="basic_holdings_add" oils_persist:virtual="true" />
3471                         <field name="supplement_holdings" oils_persist:virtual="true" />
3472                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
3473                         <field name="index_holdings" oils_persist:virtual="true" />
3474                         <field name="index_holdings_add" oils_persist:virtual="true" />
3475                         <field name="online" oils_persist:virtual="true" />
3476                         <field name="missing" oils_persist:virtual="true" />
3477                         <field name="incomplete" oils_persist:virtual="true" />
3478                 </fields>
3479         </class>
3480
3481         <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">
3482                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
3483                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
3484                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
3485                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3486                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3487                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3488                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
3489                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3490                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3491                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3492                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
3493                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
3494                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
3495                 </fields>
3496                 <links>
3497                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3498                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3499                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3500                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3501                 </links>
3502                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3503                         <actions>
3504                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
3505                                 <retrieve/>
3506                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
3507                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
3508                         </actions>
3509                 </permacrud>
3510         </class>
3511
3512         <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">
3513                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
3514                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3515                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3516                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
3517                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3518                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3519                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3520                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
3521                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
3522                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
3523                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
3524                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
3525                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
3526                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
3527                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
3528                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
3529                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
3530                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
3531                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
3532                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
3533                 </fields>
3534                 <links>
3535                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3536                 </links>
3537                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3538                         <actions>
3539                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
3540                                         <context link="subscription" field="owning_lib" />
3541                                 </create>
3542                                 <retrieve />
3543                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
3544                                         <context link="subscription" field="owning_lib" />
3545                                 </update>
3546                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
3547                                         <context link="subscription" field="owning_lib" />
3548                                 </delete>
3549                         </actions>
3550                 </permacrud>
3551         </class>
3552
3553         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
3554                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
3555                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3556                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
3557                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3558                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3559                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
3560                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
3561                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
3562                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
3563                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
3564                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3565                 </fields>
3566                 <links>
3567                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3568                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
3569                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
3570                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
3571                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
3572                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
3573                 </links>
3574                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3575                         <actions>
3576                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3577                                 <retrieve />
3578                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3579                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3580                         </actions>
3581                 </permacrud>
3582         </class>
3583
3584         <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">
3585                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
3586                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3587                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3588                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3589                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3590                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3591                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3592                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3593                 </fields>
3594                 <links>
3595                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3596                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3597                 </links>
3598                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3599                 </permacrud>
3600         </class>
3601
3602         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
3603                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
3604                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3605                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
3606                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
3607                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3608                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
3609                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3610                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
3611                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
3612                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
3613                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
3614                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
3615                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
3616                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
3617                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3618                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3619                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3620                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3621                 </fields>
3622                 <links>
3623                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
3624                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3625                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
3626                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
3627                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
3628                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
3629                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
3630                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
3631                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
3632                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
3633                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
3634                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
3635                 </links>
3636                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3637                         <actions>
3638                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3639                                 <retrieve />
3640                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3641                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3642                         </actions>
3643                 </permacrud>
3644         </class>
3645
3646         <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">
3647                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
3648                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3649                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3650                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3651                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3652                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3653                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3654                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3655                 </fields>
3656                 <links>
3657                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3658                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3659                 </links>
3660                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3661                         <actions>
3662                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
3663                                         <context link="distribution" field="holding_lib" />
3664                                 </create>
3665                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
3666                                         <context link="distribution" field="holding_lib" />
3667                                 </retrieve>
3668                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
3669                                         <context link="distribution" field="holding_lib" />
3670                                 </update>
3671                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
3672                                         <context link="distribution" field="holding_lib" />
3673                                 </delete>
3674                         </actions>
3675                 </permacrud>
3676         </class>
3677
3678         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
3679                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
3680                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3681                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3682                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
3683                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
3684                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
3685                 </fields>
3686                 <links>
3687                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3688                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
3689                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
3690                 </links>
3691                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3692                         <actions>
3693                                 <create permission="ADMIN_SERIAL_STREAM">
3694                                         <context link="distribution" field="holding_lib" />
3695                                 </create>
3696                                 <retrieve />
3697                                 <update permission="ADMIN_SERIAL_STREAM">
3698                                         <context link="distribution" field="holding_lib" />
3699                                 </update>
3700                                 <delete permission="ADMIN_SERIAL_STREAM">
3701                                         <context link="distribution" field="holding_lib" />
3702                                 </delete>
3703                         </actions>
3704                 </permacrud>
3705         </class>
3706
3707         <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">
3708                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
3709                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3710                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
3711                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
3712                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
3713                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
3714                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3715                 </fields>
3716                 <links>
3717                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
3718                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
3719                 </links>
3720                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3721                         <actions>
3722                                 <create permission="ADMIN_SERIAL_STREAM">
3723                                         <context link="stream" jump="distribution" field="holding_lib" />
3724                                 </create>
3725                                 <retrieve permission="RECEIVE_SERIAL">
3726                                         <context link="stream" jump="distribution" field="holding_lib" />
3727                                 </retrieve>
3728                                 <update permission="ADMIN_SERIAL_STREAM">
3729                                         <context link="stream" jump="distribution" field="holding_lib" />
3730                                 </update>
3731                                 <delete permission="ADMIN_SERIAL_STREAM">
3732                                         <context link="stream" jump="distribution" field="holding_lib" />
3733                                 </delete>
3734                         </actions>
3735                 </permacrud>
3736         </class>
3737
3738         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
3739                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
3740                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3741                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3742                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3743                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3744                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
3745                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3746                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
3747                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3748                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
3749                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
3750                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
3751                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
3752                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
3753                 </fields>
3754                 <links>
3755                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3756                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3757                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3758                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
3759                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
3760                 </links>
3761                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3762                         <actions>
3763                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
3764                                         <context link="subscription" field="owning_lib" />
3765                                 </create>
3766                                 <retrieve/>
3767                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
3768                                         <context link="subscription" field="owning_lib" />
3769                                 </update>
3770                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
3771                                         <context link="subscription" field="owning_lib" />
3772                                 </delete>
3773                         </actions>
3774                 </permacrud>
3775         </class>
3776
3777         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
3778                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
3779                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3780                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
3781                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
3782                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3783                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
3784                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
3785                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3786                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
3787                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
3788                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
3789                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3790                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3791                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3792                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
3793                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3794                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
3795                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
3796                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
3797                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3798                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3799                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
3800                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
3801                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
3802                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
3803                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
3804                         <field reporter:label="Price" name="price" reporter:datatype="money" />
3805                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
3806                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
3807                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
3808                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
3809                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
3810                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
3811                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
3812                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
3813                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
3814                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3815                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3816                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3817                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
3818                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3819                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3820                 </fields>
3821                 <links>
3822                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
3823                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3824                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3825                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3826                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3827                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
3828                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3829                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
3830                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
3831                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
3832                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
3833                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
3834                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
3835                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
3836                 </links>
3837                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3838                         <actions>
3839                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
3840                                 <retrieve/>
3841                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
3842                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
3843                         </actions>
3844                 </permacrud>
3845         </class>
3846
3847         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
3848                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
3849                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3850                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3851                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3852                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3853                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
3854                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
3855                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
3856                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
3857                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
3858                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
3859                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
3860                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
3861                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3862                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
3863                 </fields>
3864                 <links>
3865                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3866                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3867                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
3868                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
3869                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
3870                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3871                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
3872                 </links>
3873                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3874                         <actions>
3875                                 <create permission="ADMIN_SERIAL_ITEM">
3876                                         <context link="stream" jump="distribution" field="holding_lib" />
3877                                 </create>
3878                                 <retrieve permission="ADMIN_SERIAL_ITEM">
3879                                         <context link="stream" jump="distribution" field="holding_lib" />
3880                                 </retrieve>
3881                                 <update permission="ADMIN_SERIAL_ITEM">
3882                                         <context link="stream" jump="distribution" field="holding_lib" />
3883                                 </update>
3884                                 <delete permission="ADMIN_SERIAL_ITEM">
3885                                         <context link="stream" jump="distribution" field="holding_lib" />
3886                                 </delete>
3887                         </actions>
3888                 </permacrud>
3889         </class>
3890
3891         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
3892                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
3893                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3894                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
3895                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3896                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3897                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3898                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3899                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3900                 </fields>
3901                 <links>
3902                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
3903                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3904                 </links>
3905                 <!-- Not available via PCRUD at this time -->
3906         </class>
3907
3908         <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">
3909                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
3910                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3911                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3912                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
3913                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
3914                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
3915                 </fields>
3916                 <links>
3917                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3918                 </links>
3919                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3920                         <actions>
3921                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
3922                                         <context link="distribution" field="holding_lib" />
3923                                 </create>
3924                                 <retrieve/>
3925                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
3926                                         <context link="distribution" field="holding_lib" />
3927                                 </update>
3928                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
3929                                         <context link="distribution" field="holding_lib" />
3930                                 </create>
3931                         </actions>
3932                 </permacrud>
3933         </class>
3934
3935         <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">
3936                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
3937                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3938                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3939                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
3940                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
3941                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
3942                 </fields>
3943                 <links>
3944                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3945                 </links>
3946                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3947                         <actions>
3948                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
3949                                         <context link="distribution" field="holding_lib" />
3950                                 </create>
3951                                 <retrieve/>
3952                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
3953                                         <context link="distribution" field="holding_lib" />
3954                                 </update>
3955                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
3956                                         <context link="distribution" field="holding_lib" />
3957                                 </create>
3958                         </actions>
3959                 </permacrud>
3960         </class>
3961
3962         <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">
3963                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
3964                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3965                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3966                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
3967                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
3968                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
3969                 </fields>
3970                 <links>
3971                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3972                 </links>
3973                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3974                         <actions>
3975                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
3976                                         <context link="distribution" field="holding_lib" />
3977                                 </create>
3978                                 <retrieve/>
3979                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
3980                                         <context link="distribution" field="holding_lib" />
3981                                 </update>
3982                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
3983                                         <context link="distribution" field="holding_lib" />
3984                                 </create>
3985                         </actions>
3986                 </permacrud>
3987         </class>
3988
3989         <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">
3990                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
3991                         <field name="id" reporter:datatype="id" />
3992                         <field name="owning_copy" reporter:datatype="link"/>
3993                         <field name="stat_cat" reporter:datatype="link"/>
3994                         <field name="stat_cat_entry" reporter:datatype="link"/>
3995                 </fields>
3996                 <links>
3997                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3998                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
3999                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4000                 </links>
4001         </class>
4002         <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">
4003                 <fields oils_persist:primary="code">
4004                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
4005                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4006                 </fields>
4007                 <links/>
4008         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4009             <actions>
4010                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
4011                 <retrieve/>
4012                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
4013                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
4014             </actions>
4015         </permacrud>
4016         </class>
4017         <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">
4018                 <fields oils_persist:primary="code">
4019                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
4020                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4021                 </fields>
4022                 <links/>
4023         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4024             <actions>
4025                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4026                 <retrieve/>
4027                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4028                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4029             </actions>
4030         </permacrud>
4031         </class>
4032         <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">
4033                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
4034                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
4035                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
4036                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
4037                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
4038                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
4039                 </fields>
4040                 <links>
4041             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4042         </links>
4043         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4044             <actions>
4045                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4046                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4047                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4048                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4049             </actions>
4050         </permacrud>
4051         </class>
4052         <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">
4053                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
4054                         <field name="id" reporter:datatype="id" />
4055                         <field name="name" reporter:datatype="text"/>
4056                 </fields>
4057                 <links/>
4058         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4059             <actions>
4060                 <create permission="CREATE_LASSO" global_required="true"/>
4061                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
4062                 <update permission="UPDATE_LASSO" global_required="true"/>
4063                 <delete permission="DELETE_LASSO" global_required="true"/>
4064             </actions>
4065         </permacrud>
4066         </class>
4067         <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">
4068                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
4069                         <field name="id" reporter:datatype="id" />
4070                         <field name="lasso" reporter:datatype="link"/>
4071                         <field name="org_unit" reporter:datatype="org_unit"/>
4072                 </fields>
4073                 <links>
4074                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
4075                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4076                 </links>
4077         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4078             <actions>
4079                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
4080                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
4081                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
4082                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
4083             </actions>
4084         </permacrud>
4085         </class>
4086         <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">
4087                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4088                         <field name="id" reporter:datatype="id" />
4089                         <field name="from_org" reporter:datatype="org_unit"/>
4090                         <field name="to_org" reporter:datatype="org_unit"/>
4091                         <field name="prox" reporter:datatype="int" />
4092                 </fields>
4093                 <links>
4094                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
4095                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
4096                 </links>
4097         </class>
4098         <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">
4099                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4100                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4101                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
4102                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
4103                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
4104                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
4105                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
4106                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
4107                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
4108                 </fields>
4109                 <links/>
4110         </class>
4111         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
4112                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
4113                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
4114                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
4115                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
4116                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
4117                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
4118                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4119                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
4120                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4121                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
4122                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
4123                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
4124                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
4125                 </fields>
4126                 <links>
4127                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4128                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
4129                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
4130                 </links>
4131         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4132             <actions>
4133                 <create permission="ADMIN_SURVEY" context_field="owner"/>
4134                 <retrieve/>
4135                 <update permission="ADMIN_SURVEY" context_field="owner"/>
4136                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
4137             </actions>
4138         </permacrud>
4139         </class>
4140         <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">
4141                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
4142                         <field name="address_type"  reporter:datatype="text"/>
4143                         <field name="city"  reporter:datatype="text"/>
4144                         <field name="country"  reporter:datatype="text"/>
4145                         <field name="county"  reporter:datatype="text"/>
4146                         <field name="id" reporter:datatype="id" />
4147                         <field name="org_unit" reporter:datatype="org_unit"/>
4148                         <field name="post_code"  reporter:datatype="text"/>
4149                         <field name="state"  reporter:datatype="text"/>
4150                         <field name="street1"  reporter:datatype="text"/>
4151                         <field name="street2"  reporter:datatype="text"/>
4152                         <field name="valid" reporter:datatype="bool"/>
4153                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
4154                 </fields>
4155                 <links>
4156                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4157                 </links>
4158         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4159             <actions>
4160                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
4161                 <retrieve/>
4162                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
4163                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
4164             </actions>
4165         </permacrud>
4166         </class>
4167         <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">
4168                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
4169                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
4170                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
4171                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
4172                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
4173                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4174                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
4175                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
4176                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
4177                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
4178                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
4179                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
4180                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
4181                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
4182                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
4183                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
4184                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
4185                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
4186                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
4187                         <field reporter:label="Item Selection Depth" name="selection_depth" />
4188                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
4189                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
4190                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
4191                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
4192                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
4193                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
4194                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
4195                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
4196                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
4197                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
4198                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
4199                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
4200                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
4201                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
4202                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
4203                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
4204                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
4205                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
4206                 </fields>
4207                 <links>
4208                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
4209                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
4210                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4211                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
4212                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
4213                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4214                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4215                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4216                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
4217                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
4218                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
4219                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
4220                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
4221                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
4222                 </links>
4223         </class>
4224         <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">
4225                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
4226                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4227                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
4228                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4229                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
4230                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
4231                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
4232                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
4233                 </fields>
4234                 <links>
4235                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4236                 </links>
4237                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4238                         <actions>
4239                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
4240                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
4241                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
4242                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
4243                         </actions>
4244                 </permacrud>
4245         </class>
4246         <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">
4247                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
4248                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
4249                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
4250                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
4251                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
4252                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
4253                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
4254                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4255                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
4256                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
4257                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
4258                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
4259                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
4260                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4261                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
4262                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
4263                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
4264                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4265                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
4266                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
4267                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
4268                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
4269                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
4270                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
4271                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
4272                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
4273                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
4274                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4275                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4276                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4277                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
4278                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
4279                 </fields>
4280                 <links>
4281                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
4282                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
4283                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
4284                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
4285                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
4286                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
4287                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
4288                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
4289                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
4290                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
4291                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
4292                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
4293                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
4294                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
4295                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
4296                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
4297                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
4298                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
4299                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
4300                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
4301                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
4302                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
4303                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
4304                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
4305                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
4306                 </links>
4307         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4308             <actions>
4309                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
4310                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT">
4311                     <context field="id"/>
4312                     <context field="parent_ou"/>
4313                                 </retrieve>
4314                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
4315                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
4316             </actions>
4317         </permacrud>
4318         </class>
4319         <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">
4320                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
4321                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4322                         <field name="btype" reporter:datatype="text"/>
4323                         <field name="id" reporter:datatype="id" />
4324                         <field name="name"  reporter:datatype="text"/>
4325                         <field name="owner" reporter:datatype="link"/>
4326                         <field name="pub" reporter:datatype="bool"/>
4327                         <field name="create_time" reporter:datatype="timestamp" />
4328                 </fields>
4329                 <links>
4330                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4331                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
4332                 </links>
4333         </class>
4334         <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">
4335                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
4336                         <field name="id" reporter:datatype="id" />
4337                         <field name="bucket" reporter:datatype="link"/>
4338                         <field name="note" reporter:datatype="text" />
4339                 </fields>
4340                 <links>
4341                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4342                 </links>
4343         </class>
4344         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
4345                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
4346                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4347                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4348                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4349                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4350                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4351                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
4352                 </fields>
4353                 <links>
4354                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4355                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
4356                 </links>
4357         </class>
4358         <class id="ac" controller="open-ils.cstore" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
4359                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
4360                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
4361                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4362                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
4363                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4364                 </fields>
4365                 <links>
4366                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4367                 </links>
4368         </class>
4369         <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">
4370                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
4371                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4372                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4373                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4374                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4375                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4376                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
4377                 </fields>
4378                 <links>
4379                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4380                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
4381                 </links>
4382         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4383             <actions>
4384                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
4385                 <retrieve />
4386                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
4387                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
4388             </actions>
4389         </permacrud>
4390         </class>
4391         <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">
4392                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
4393                         <field name="field" reporter:datatype="link"/>
4394                         <field name="id" reporter:datatype="id" />
4395                         <field name="source" reporter:datatype="link"/>
4396                         <field name="value"  reporter:datatype="text"/>
4397                 </fields>
4398                 <links>
4399                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4400                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4401                 </links>
4402         </class>
4403         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
4404                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
4405                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4406                         <field name="btype" reporter:datatype="text"/>
4407                         <field name="id" reporter:datatype="id" />
4408                         <field name="name"  reporter:datatype="text"/>
4409                         <field name="owner" reporter:datatype="link"/>
4410                         <field name="pub" reporter:datatype="bool"/>
4411                         <field name="create_time" reporter:datatype="timestamp" />
4412                 </fields>
4413                 <links>
4414                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4415                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
4416                 </links>
4417         </class>
4418         <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">
4419                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
4420                         <field name="id" reporter:datatype="id" />
4421                         <field name="bucket" reporter:datatype="link"/>
4422                         <field name="note" reporter:datatype="text" />
4423                 </fields>
4424                 <links>
4425                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
4426                 </links>
4427         </class>
4428         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
4429                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4430                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4431                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4432                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4433                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
4434                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
4435                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4436                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
4437                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4438                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4439                 </fields>
4440                 <links>
4441                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4442                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4443                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4444                 </links>
4445         </class>
4446         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
4447                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
4448                         <field name="id" reporter:datatype="id" />
4449                         <field name="ind1" />
4450                         <field name="ind2" />
4451                         <field name="record" />
4452                         <field name="subfield" />
4453                         <field name="tag" />
4454                         <field name="value" />
4455                 </fields>
4456                 <links>
4457                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4458                 </links>
4459         </class>
4460         <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">
4461                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
4462                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
4463                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4464                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
4465                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4466                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
4467                 </fields>
4468                 <links>
4469                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4470                 </links>
4471         </class>
4472         <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">
4473                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
4474                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
4475                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
4476                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
4477                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
4478                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4479                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4480                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
4481                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
4482                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
4483                 </fields>
4484                 <links>
4485                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
4486                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
4487                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
4488                 </links>
4489         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4490             <actions>
4491                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
4492                 <retrieve/>
4493                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
4494                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
4495             </actions>
4496         </permacrud>
4497         </class>
4498         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
4499                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
4500                         <field name="create_date" reporter:datatype="timestamp"/>
4501                         <field name="creator" reporter:datatype="link"/>
4502                         <field name="edit_date" reporter:datatype="timestamp"/>
4503                         <field name="editor" reporter:datatype="link"/>
4504                         <field name="id" reporter:datatype="id" />
4505                         <field name="pub" reporter:datatype="bool"/>
4506                         <field name="record" reporter:datatype="link"/>
4507                         <field name="value"  reporter:datatype="text"/>
4508                 </fields>
4509                 <links>
4510                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4511                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4512                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4513                 </links>
4514         </class>
4515         <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">
4516                 <fields oils_persist:primary="usr" oils_persist:sequence="">
4517                         <field name="balance_owed" reporter:datatype="money" />
4518                         <field name="total_owed" reporter:datatype="money" />
4519                         <field name="total_paid" reporter:datatype="money" />
4520                         <field name="usr" reporter:datatype="link"/>
4521                 </fields>
4522                 <links>
4523                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4524                 </links>
4525         </class>
4526         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
4527                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4528                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
4529                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4530                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
4531                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4532                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
4533                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
4534                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4535                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4536                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4537                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4538                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4539                 </fields>
4540                 <links>
4541                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4542                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4543                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4544                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4545                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
4546                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4547                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4548                 </links>
4549         </class>
4550         <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">
4551                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
4552                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
4553                         <field name="quality" reporter:datatype="int" />
4554                         <field name="source" reporter:datatype="text"/>
4555                         <field name="transcendant" reporter:datatype="bool"/>
4556                 </fields>
4557                 <links/>
4558         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4559             <actions>
4560                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
4561                 <retrieve/>
4562                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
4563                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
4564             </actions>
4565         </permacrud>
4566         </class>
4567         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
4568                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4569                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4570                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4571                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4572                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4573                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4574                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
4575                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
4576                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4577                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4578                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4579                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4580                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4581                 </fields>
4582                 <links>
4583                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
4584                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
4585                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4586                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4587                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4588                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4589                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4590                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4591                 </links>
4592         </class>
4593         <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">
4594                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
4595                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
4596                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
4597                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
4598                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
4599                 </fields>
4600                 <links>
4601                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
4602                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4603                 </links>
4604         </class>
4605         <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">
4606                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
4607                         <field name="bucket" reporter:datatype="link"/>
4608                         <field name="id" reporter:datatype="id" />
4609                         <field name="target_user" reporter:datatype="link"/>
4610                         <field name="create_time" reporter:datatype="timestamp" />
4611                         <field name="pos" reporter:datatype="int" />
4612                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4613                 </fields>
4614                 <links>
4615                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
4616                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
4617             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
4618                 </links>
4619         </class>
4620         <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">
4621                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
4622                         <field name="id" reporter:datatype="id" />
4623                         <field name="item" reporter:datatype="link"/>
4624                         <field name="note" reporter:datatype="text" />
4625                 </fields>
4626                 <links>
4627                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
4628                 </links>
4629         </class>
4630         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
4631                 <fields oils_persist:primary="usr" oils_persist:sequence="">
4632                         <field name="balance_owed" reporter:datatype="money" />
4633                         <field name="total_owed" reporter:datatype="money" />
4634                         <field name="total_paid" reporter:datatype="money" />
4635                         <field name="usr" reporter:datatype="link"/>
4636                 </fields>
4637                 <links>
4638                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4639                 </links>
4640         </class>
4641         <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">
4642                 <fields oils_persist:primary="code" oils_persist:sequence="">
4643                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
4644                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4645                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
4646                 </fields>
4647                 <links/>
4648         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4649             <actions>
4650                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4651                 <retrieve/>
4652                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4653                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4654             </actions>
4655         </permacrud>
4656         </class>
4657         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
4658                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4659                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4660                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4661                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4662                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4663                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4664                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4665                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
4666                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4667                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4668                 </fields>
4669                 <links>
4670                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4671                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4672                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4673                 </links>
4674         </class>
4675         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
4676                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4677                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4678                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4679                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4680                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4681                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4682                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4683                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
4684                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4685                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4686                 </fields>
4687                 <links>
4688                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4689                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4690                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4691                 </links>
4692         </class>
4693         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
4694                 <fields oils_persist:primary="id" oils_persist:sequence="">
4695                         <field name="checkin_lib" reporter:datatype="link"/>
4696                         <field name="checkin_staff" reporter:datatype="link"/>
4697                         <field name="checkin_time" reporter:datatype="timestamp"/>
4698                         <field name="circ_lib"  reporter:datatype="org_unit"/>
4699                         <field name="circ_staff" reporter:datatype="link"/>
4700                         <field name="desk_renewal" reporter:datatype="bool"/>
4701                         <field name="due_date" reporter:datatype="timestamp"/>
4702                         <field name="duration" reporter:datatype="interval"/>
4703                         <field name="duration_rule" reporter:datatype="link"/>
4704                         <field name="fine_interval" reporter:datatype="interval"/>
4705                         <field name="id" reporter:datatype="id" />
4706                         <field name="max_fine" reporter:datatype="money" />
4707                         <field name="max_fine_rule" reporter:datatype="link"/>
4708                         <field name="opac_renewal" reporter:datatype="bool"/>
4709                         <field name="phone_renewal" reporter:datatype="bool"/>
4710                         <field name="recurring_fine" reporter:datatype="money" />
4711                         <field name="recurring_fine_rule" reporter:datatype="link"/>
4712                         <field name="renewal_remaining" reporter:datatype="int" />
4713             <field name="grace_period" reporter:datatype="interval" />
4714                         <field name="stop_fines" reporter:datatype="text"/>
4715                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
4716                         <field name="target_copy" reporter:datatype="link"/>
4717                         <field name="usr" reporter:datatype="link"/>
4718                         <field name="xact_finish" reporter:datatype="timestamp" />
4719                         <field name="xact_start" reporter:datatype="timestamp" />
4720                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
4721                 </fields>
4722                 <links>
4723                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
4724                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4725                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4726                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4727                 </links>
4728         </class>
4729         <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">
4730                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
4731                         <field name="field" reporter:datatype="link"/>
4732                         <field name="id" reporter:datatype="id" />
4733                         <field name="source" reporter:datatype="link"/>
4734                         <field name="value" reporter:datatype="text"/>
4735                 </fields>
4736                 <links>
4737                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4738                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4739                 </links>
4740         </class>
4741         <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">
4742                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
4743                         <field name="high" reporter:datatype="money" />
4744                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
4745                         <field name="low" reporter:datatype="money" />
4746                         <field name="name" reporter:datatype="text"/>
4747                         <field name="normal" reporter:datatype="money" />
4748                         <field name="recurrence_interval" reporter:datatype="interval"/>
4749             <field name="grace_period" reporter:datatype="interval" />
4750                 </fields>
4751                 <links/>
4752         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4753             <actions>
4754                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
4755                 <retrieve/>
4756                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
4757                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
4758             </actions>
4759         </permacrud>
4760         </class>
4761         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
4762                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4763                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4764                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4765                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4766                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
4767                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
4768                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4769                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4770                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4771                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
4772                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4773                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4774                 </fields>
4775                 <links>
4776                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4777                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4778                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4779                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4780                 </links>
4781         </class>
4782         <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">
4783                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4784                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4785                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4786                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4787                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4788                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4789                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4790                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4791                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4792                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4793                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4794                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4795                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4796                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4797                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4798                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4799                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4800                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4801                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4802                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4803                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4804                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4805                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
4806                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4807                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4808                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4809                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4810                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4811                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4812                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4813                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4814                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4815                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4816                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4817                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4818                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4819                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4820                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4821                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4822                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
4823                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4824                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
4825                 </fields>
4826                 <links>
4827                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4828                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4829                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4830                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4831                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4832                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4833                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4834                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4835                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4836                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4837                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4838                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4839                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4840                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4841                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
4842                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
4843                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
4844                 </links>
4845         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4846             <actions>
4847                 <create permission="CREATE_COPY">
4848                     <context link="call_number" field="owning_lib"/>
4849                 </create>
4850                 <retrieve/>
4851                 <update permission="UPDATE_COPY">
4852                     <context link="call_number" field="owning_lib"/>
4853                 </update>
4854                 <delete permission="DELETE_COPY">
4855                     <context link="call_number" field="owning_lib"/>
4856                 </delete>
4857             </actions>
4858         </permacrud>
4859         </class>
4860
4861         <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">
4862                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
4863                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
4864                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
4865                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4866                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4867                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4868                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4869                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4870                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
4871                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
4872                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
4873                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4874                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4875                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
4876                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
4877                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
4878                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
4879                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
4880                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4881                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
4882                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
4883                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
4884                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4885                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4886                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
4887                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
4888                 </fields>
4889                 <links>
4890                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4891                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4892                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4893                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4894                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4895                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4896                 </links>
4897                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4898                         <actions>
4899                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
4900                                 <retrieve />
4901                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
4902                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
4903                         </actions>
4904                 </permacrud>
4905         </class>
4906
4907         <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">
4908                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
4909                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
4910                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4911                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
4912                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
4913                 </fields>
4914                 <links/>
4915         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4916             <actions>
4917                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
4918                 <retrieve/>
4919                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
4920                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
4921             </actions>
4922         </permacrud>
4923         </class>
4924         <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">
4925                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
4926                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
4927                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4928                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
4929                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
4930                 </fields>
4931                 <links/>
4932         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4933             <actions>
4934                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
4935                 <retrieve/>
4936                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
4937                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
4938             </actions>
4939         </permacrud>
4940         </class>
4941         <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">
4942                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
4943                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
4944                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4945                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4946                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4947                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
4948                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
4949                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
4950                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
4951                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
4952                 </fields>
4953                 <links>
4954                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
4955                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
4956                 </links>
4957         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4958             <actions>
4959                 <create permission="CREATE_PERM" global_required="true"/>
4960                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
4961                 <update permission="UPDATE_PERM" global_required="true"/>
4962                 <delete permission="DELETE_PERM" global_required="true"/>
4963             </actions>
4964         </permacrud>
4965         </class>
4966         <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">
4967                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
4968                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
4969                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
4970                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
4971                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
4972                 </fields>
4973                 <links>
4974                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
4975                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
4976                 </links>
4977         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4978             <actions>
4979                 <create permission="ADMIN_SURVEY">
4980                     <context link="question" jump="survey" field="owner"/>
4981                 </create>
4982                 <retrieve/>
4983                 <update permission="ADMIN_SURVEY">
4984                     <context link="question" jump="survey" field="owner"/>
4985                 </update>
4986                 <delete permission="ADMIN_SURVEY">
4987                     <context link="question" jump="survey" field="owner"/>
4988                 </delete>
4989             </actions>
4990         </permacrud>
4991         </class>
4992         <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">
4993                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
4994                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4995                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
4996                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
4997                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
4998                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
4999                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
5000                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
5001                 </fields>
5002                 <links>
5003                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
5004                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
5005                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
5006                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5007                 </links>
5008         </class>
5009         <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">
5010                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5011                         <field name="balance_owed" reporter:datatype="money" />
5012                         <field name="total_owed" reporter:datatype="money" />
5013                         <field name="total_paid" reporter:datatype="money" />
5014                         <field name="usr" reporter:datatype="link"/>
5015                 </fields>
5016                 <links>
5017                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5018                 </links>
5019         </class>
5020         <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">
5021                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
5022                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
5023                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
5024                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
5025                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5026                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5027                 </fields>
5028                 <links>
5029                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5030                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5031                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5032                 </links>
5033         </class>
5034         <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">
5035                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
5036                         <field name="field" reporter:datatype="link"/>
5037                         <field name="id" reporter:datatype="id" />
5038                         <field name="source" reporter:datatype="link"/>
5039                         <field name="value" reporter:datatype="text"/>
5040                 </fields>
5041                 <links>
5042                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5043                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5044                 </links>
5045         </class>
5046         <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">
5047                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
5048                         <field name="field" reporter:datatype="link"/>
5049                         <field name="id" reporter:datatype="id" />
5050                         <field name="source" reporter:datatype="link"/>
5051                         <field name="value" reporter:datatype="text"/>
5052                 </fields>
5053                 <links>
5054                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5055                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5056                 </links>
5057         </class>
5058         <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">
5059                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
5060                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5061                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
5062                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
5063                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
5064                 </fields>
5065                 <links>
5066                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
5067                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5068                 </links>
5069         </class>
5070         <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">
5071                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
5072                         <field name="depth" reporter:datatype="int" />
5073                         <field name="grantable" reporter:datatype="bool"/>
5074                         <field name="grp" reporter:datatype="link"/>
5075                         <field name="id" reporter:datatype="id" />
5076                         <field name="perm" reporter:datatype="link"/>
5077                 </fields>
5078                 <links>
5079                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
5080                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5081                 </links>
5082         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5083             <actions>
5084                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
5085                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
5086                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
5087                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
5088             </actions>
5089         </permacrud>
5090         </class>
5091         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
5092                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
5093                         <field name="items" oils_persist:virtual="true" />
5094                         <field name="btype" reporter:datatype="text"/>
5095                         <field name="id" reporter:datatype="id" />
5096                         <field name="name" reporter:datatype="text"/>
5097                         <field name="owner" reporter:datatype="link"/>
5098                         <field name="pub" reporter:datatype="bool"/>
5099                         <field name="create_time" reporter:datatype="timestamp" />
5100                 </fields>
5101                 <links>
5102                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5103                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
5104                 </links>
5105         </class>
5106         <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">
5107                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
5108                         <field name="id" reporter:datatype="id" />
5109                         <field name="bucket" reporter:datatype="link"/>
5110                         <field name="note" reporter:datatype="text" />
5111                 </fields>
5112                 <links>
5113                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
5114                 </links>
5115         </class>
5116         <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">
5117                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
5118                         <field name="id" reporter:datatype="int" />
5119                         <field name="usr" reporter:datatype="link"/>
5120                         <field name="work_ou" reporter:datatype="link"/>
5121                 </fields>
5122                 <links>
5123                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5124                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
5125                 </links>
5126         </class>
5127         <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">
5128                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
5129                         <field name="depth" reporter:datatype="int"/>
5130                         <field name="grantable" reporter:datatype="bool"/>
5131                         <field name="id" reporter:datatype="id" />
5132                         <field name="perm" reporter:datatype="link"/>
5133                         <field name="usr" reporter:datatype="link"/>
5134                 </fields>
5135                 <links>
5136                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5137                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5138                 </links>
5139         </class>
5140         <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">
5141                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
5142                         <field name="object_id" reporter:datatype="text"/>
5143                         <field name="grantable" reporter:datatype="bool"/>
5144                         <field name="id" reporter:datatype="id" />
5145                         <field name="perm" reporter:datatype="link"/>
5146                         <field name="usr" reporter:datatype="link"/>
5147                         <field name="object_type" reporter:datatype="text"/>
5148                 </fields>
5149                 <links>
5150                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5151                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5152                 </links>
5153         </class>
5154         <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">
5155                 <fields oils_persist:primary="id" oils_persist:sequence="">
5156                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5157                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5158                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5159                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5160                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5161                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5162                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5163                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5164                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5165                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5166                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5167                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5168                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5169                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5170                 </fields>
5171                 <links>
5172                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5173                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5174                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5175                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5176                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5177                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5178                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5179                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5180                 </links>
5181         </class>
5182         <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">
5183                 <fields oils_persist:primary="id" oils_persist:sequence="">
5184                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5185                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5186                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5187                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5188                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5189                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5190                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5191                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5192                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5193                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5194                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5195                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5196                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5197                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5198                 </fields>
5199                 <links>
5200                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5201                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5202                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5203                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5204                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5205                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5206                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5207                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5208                 </links>
5209         </class>
5210         <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">
5211                 <fields oils_persist:primary="id" oils_persist:sequence="">
5212                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5213                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5214                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5215                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5216                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5217                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5218                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5219                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5220                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5221                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5222                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5223                 </fields>
5224                 <links>
5225                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5226                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5227                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5228                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5229                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5230                 </links>
5231         </class>
5232         <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">
5233                 <fields oils_persist:primary="id" oils_persist:sequence="">
5234                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5235                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5236                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5237                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5238                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5239                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5240                         <field reporter:label="Accepting User" name="accepting_usr" />
5241                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
5242                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5243                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5244                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5245                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5246                 </fields>
5247                 <links>
5248                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5249                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5250                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5251                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5252                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5253                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5254                 </links>
5255         </class>
5256         <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">
5257                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
5258                         <field name="bucket" reporter:datatype="link"/>
5259                         <field name="id" reporter:datatype="id" />
5260                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
5261                         <field name="create_time" reporter:datatype="timestamp" />
5262                         <field name="pos" reporter:datatype="int" />
5263                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5264                 </fields>
5265                 <links>
5266                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
5267                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
5268             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
5269                 </links>
5270         </class>
5271         <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">
5272                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
5273                         <field name="id" reporter:datatype="id" />
5274                         <field name="item" reporter:datatype="link"/>
5275                         <field name="note" reporter:datatype="text" />
5276                 </fields>
5277                 <links>
5278                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
5279                 </links>
5280         </class>
5281         <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">
5282                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
5283                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
5284                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5285                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5286                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
5287                 </fields>
5288                 <links>
5289                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5290                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5291                 </links>
5292         </class>
5293
5294         <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">
5295                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
5296                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
5297                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5298                 </fields>
5299                 <links/>
5300         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5301             <actions>
5302                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5303                 <retrieve/>
5304                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5305                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5306             </actions>
5307         </permacrud>
5308         </class>
5309
5310
5311         <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">
5312                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
5313                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
5314                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
5315                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
5316                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
5317                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
5318                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
5319                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
5320                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
5321                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
5322                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
5323                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
5324                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
5325                 </fields>
5326                 <links>
5327                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
5328                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
5329                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
5330                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
5331                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
5332                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
5333                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
5334                 </links>
5335         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5336             <actions>
5337                 <create permission="TRANSIT_COPY">
5338                     <context link="target_copy" field="owner"/>
5339                 </create>
5340                 <retrieve/>
5341                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
5342                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
5343             </actions>
5344         </permacrud>
5345         </class>
5346         <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">
5347                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
5348                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
5349                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
5350                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
5351                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
5352                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
5353                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
5354                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
5355                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
5356                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
5357                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
5358                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
5359                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
5360                 </fields>
5361                 <links>
5362                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
5363                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5364                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
5365                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
5366                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
5367                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
5368                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5369                 </links>
5370         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5371             <actions>
5372                 <create permission="TRANSIT_COPY" context_field="owner">
5373                     <context link="target_copy" field="circ_lib"/>
5374                 </create>
5375                 <retrieve/>
5376                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
5377                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
5378             </actions>
5379         </permacrud>
5380         </class>
5381         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
5382                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
5383                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5384                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
5385                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
5386                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
5387                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5388                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
5389                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5390                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
5391                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5392                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
5393                 </fields>
5394                 <links>
5395                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5396                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
5397                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
5398                 </links>
5399         </class>
5400         <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">
5401                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
5402                         <field name="grp" />
5403                         <field name="id" reporter:datatype="id" />
5404                         <field name="usr" />
5405                 </fields>
5406                 <links>
5407                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
5408                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5409                 </links>
5410         </class>
5411         <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">
5412                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
5413                         <field name="id" reporter:datatype="id" />
5414                         <field name="fq_field" reporter:datatype="text"/>
5415                         <field name="identity_value" reporter:datatype="text"/>
5416                         <field name="translation" reporter:datatype="text"/>
5417                         <field name="string" reporter:datatype="text"/>
5418                 </fields>
5419                 <links>
5420                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
5421                 </links>
5422         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5423             <actions>
5424                 <create permission="CREATE_TRANSLATION" global_required="true"/>
5425                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
5426                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
5427                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
5428             </actions>
5429         </permacrud>
5430         </class>
5431         <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">
5432                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
5433                         <field name="id" reporter:datatype="id" />
5434                         <field name="fm_class" reporter:datatype="text"/>
5435                         <field name="field" reporter:datatype="text"/>
5436                         <field name="owner" reporter:datatype="org_unit"/>
5437                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
5438                 </fields>
5439                 <links>
5440                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5441                 </links>
5442         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5443             <actions>
5444                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5445                 <retrieve/>
5446                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5447                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5448             </actions>
5449         </permacrud>
5450         </class>
5451         <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">
5452                 <fields oils_persist:primary="code">
5453                         <field name="code" reporter:datatype="id" />
5454                         <field name="marc_code" reporter:datatype="text"/>
5455                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5456                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5457                 </fields>
5458                 <links/>
5459         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5460             <actions>
5461                 <create permission="CREATE_LOCALE" global_required="true"/>
5462                 <retrieve/>
5463                 <update permission="UPDATE_LOCALE" global_required="true"/>
5464                 <delete permission="DELETE_LOCALE" global_required="true"/>
5465             </actions>
5466         </permacrud>
5467         </class>
5468         <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">
5469                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
5470                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
5471                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
5472                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
5473             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
5474                 </fields>
5475                 <links>
5476                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5477                 </links>
5478         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5479             <actions>
5480                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
5481                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
5482                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
5483                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
5484             </actions>
5485         </permacrud>
5486         </class>
5487
5488         <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">
5489                 <fields oils_persist:primary="id">
5490                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
5491                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5492                 </fields>
5493                 <links/>
5494         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5495             <actions>
5496                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5497                 <retrieve/>
5498                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5499                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5500             </actions>
5501         </permacrud>
5502         </class>
5503
5504         <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">
5505                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
5506                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
5507                         <field reporter:label="User" name="usr" reporter:datatype="link" />
5508                         <field reporter:label="Request Type" name="request_type" reporter:datatype="link" />
5509                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
5510                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
5511                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
5512                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
5513                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
5514                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
5515                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
5516                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
5517                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
5518                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
5519                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
5520                         <field reporter:label="Title" name="title" reporter:datatype="text" />
5521                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
5522                         <field reporter:label="Author" name="author" reporter:datatype="text" />
5523                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
5524                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
5525                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
5526                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
5527                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
5528                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
5529                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
5530                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5531                 </fields>
5532                 <links>
5533                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5534                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5535                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5536                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
5537                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
5538                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5539                 </links>
5540         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5541             <actions>
5542                 <create permission="user_request.create">
5543                     <context link="usr" field="home_ou"/>
5544                                 </create>
5545                 <retrieve permission="user_request.view">
5546                     <context link="usr" field="home_ou"/>
5547                                 </retrieve>
5548                 <update permission="user_request.update">
5549                     <context link="usr" field="home_ou"/>
5550                                 </update>
5551                 <delete permission="user_request.delete">
5552                     <context link="usr" field="home_ou"/>
5553                                 </delete>
5554             </actions>
5555         </permacrud>
5556         </class>
5557
5558         <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">
5559                 <fields oils_persist:primary="code">
5560                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
5561                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5562                 </fields>
5563                 <links/>
5564         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5565             <actions>
5566                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5567                 <retrieve/>
5568                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5569                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5570             </actions>
5571         </permacrud>
5572         </class>
5573
5574         <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">
5575                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
5576                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
5577                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
5578                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
5579                         <field reporter:label="Ratio" name="ratio" />
5580                 </fields>
5581                 <links>
5582                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
5583                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
5584                 </links>
5585                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5586                         <actions>
5587                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5588                                 <retrieve/>
5589                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5590                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5591                         </actions>
5592                 </permacrud>
5593         </class>
5594
5595         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
5596                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
5597                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
5598                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
5599                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
5600                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
5601                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5602                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
5603                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
5604                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
5605                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
5606                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
5607                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
5608                         <field reporter:label="URL" name="url" reporter:datatype="text" />
5609                         <field reporter:label="Email" name="email" reporter:datatype="text" />
5610                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
5611                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
5612                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
5613                 </fields>
5614                 <links>
5615                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
5616                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5617             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
5618             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
5619             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
5620                 </links>
5621         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5622             <actions>
5623                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
5624                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
5625                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
5626                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
5627             </actions>
5628         </permacrud>
5629         </class>
5630
5631         <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">
5632                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
5633                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
5634                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5635                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5636                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5637                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5638                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5639                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
5640                 </fields>
5641                 <links>
5642                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5643                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5644                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5645                 </links>
5646         </class>
5647
5648         <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">
5649                 <fields oils_persist:primary="code">
5650                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
5651                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5652                 </fields>
5653                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5654             <actions>
5655                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5656                 <retrieve/>
5657                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5658                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5659             </actions>
5660                 </permacrud>
5661         </class>
5662
5663         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
5664                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
5665                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
5666                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
5667                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5668                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
5669                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
5670                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
5671                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
5672                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
5673                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
5674                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
5675                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5676                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
5677                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
5678                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
5679                 </fields>
5680                 <links>
5681                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
5682                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5683                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
5684                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
5685                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
5686                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
5687                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
5688                 </links>
5689         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5690             <actions>
5691                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
5692                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
5693                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
5694                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
5695             </actions>
5696         </permacrud>
5697         </class>
5698
5699         <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">
5700                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
5701                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5702                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
5703                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
5704                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
5705                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
5706                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
5707                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5708                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
5709                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
5710                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
5711                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
5712                 </fields>
5713                 <links>
5714                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
5715                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5716                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5717                 </links>
5718         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5719             <actions>
5720                 <create   permission="ADMIN_INVOICE">
5721                                         <context link="invoice" field="receiver"/>
5722                                 </create>
5723                 <retrieve permission="ADMIN_INVOICE">
5724                                         <context link="invoice" field="receiver"/>
5725                                 </retrieve>
5726                 <update   permission="ADMIN_INVOICE">
5727                                         <context link="invoice" field="receiver"/>
5728                                 </update>
5729                                 <delete   permission="ADMIN_INVOICE">
5730                                         <context link="invoice" field="receiver"/>
5731                                 </delete>
5732             </actions>
5733         </permacrud>
5734         </class>
5735
5736         <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">
5737                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
5738                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5739                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
5740                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
5741                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
5742                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
5743                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
5744                         <field reporter:label="Author" name="author" reporter:datatype="text" />
5745                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5746                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
5747                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
5748                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
5749                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
5750                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
5751                         <field reporter:label="Target" name="target" reporter:datatype="int" />
5752                 </fields>
5753                 <links>
5754                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
5755                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5756                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
5757                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
5758                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5759                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
5760                 </links>
5761         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5762             <actions>
5763                 <create   permission="ADMIN_INVOICE">
5764                                         <context link="invoice" field="receiver"/>
5765                                 </create>
5766                 <retrieve permission="ADMIN_INVOICE">
5767                                         <context link="invoice" field="receiver"/>
5768                                 </retrieve>
5769                 <update   permission="ADMIN_INVOICE">
5770                                         <context link="invoice" field="receiver"/>
5771                                 </update>
5772                                 <delete   permission="ADMIN_INVOICE">
5773                                         <context link="invoice" field="receiver"/>
5774                                 </delete>
5775             </actions>
5776         </permacrud>
5777         </class>
5778
5779         <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">
5780                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
5781                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
5782                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
5783                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
5784                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
5785                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5786                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5787                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
5788                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
5789                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
5790                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
5791                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
5792                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
5793                 </fields>
5794                 <links>
5795                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5796                 </links>
5797         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5798             <actions>
5799                 <create permission="ADMIN_PROVIDER">
5800                     <context link="provider" field="owner"/>
5801                 </create>
5802                 <retrieve permission="ADMIN_PROVIDER">
5803                     <context link="provider" field="owner"/>
5804                 </retrieve>
5805                 <update permission="ADMIN_PROVIDER">
5806                     <context link="provider" field="owner"/>
5807                 </update>
5808                 <delete permission="ADMIN_PROVIDER">
5809                     <context link="provider" field="owner"/>
5810                 </delete>
5811             </actions>
5812         </permacrud>
5813         </class>
5814
5815         <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">
5816                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
5817                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5818                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5819                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5820                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
5821                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
5822                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
5823         </fields>
5824                 <links>
5825                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5826                 </links>
5827         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5828             <actions>
5829                 <create permission="ADMIN_PROVIDER">
5830                     <context link="provider" field="owner"/>
5831                 </create>
5832                 <retrieve permission="ADMIN_PROVIDER">
5833                     <context link="provider" field="owner"/>
5834                 </retrieve>
5835                 <update permission="ADMIN_PROVIDER">
5836                     <context link="provider" field="owner"/>
5837                 </update>
5838                 <delete permission="ADMIN_PROVIDER">
5839                     <context link="provider" field="owner"/>
5840                 </delete>
5841             </actions>
5842         </permacrud>
5843     </class>
5844         <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">
5845                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
5846                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
5847                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
5848                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
5849                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
5850                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
5851                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
5852                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
5853                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
5854                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
5855                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
5856                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
5857                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
5858                 </fields>
5859                 <links>
5860                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
5861                 </links>
5862         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5863             <actions>
5864                 <create permission="ADMIN_PROVIDER">
5865                     <context link="contact" jump='provider' field="owner"/>
5866                 </create>
5867                 <retrieve permission="ADMIN_PROVIDER">
5868                     <context link="contact" jump='provider' field="owner"/>
5869                 </retrieve>
5870                 <update permission="ADMIN_PROVIDER">
5871                     <context link="contact" jump='provider' field="owner"/>
5872                 </update>
5873                 <delete permission="ADMIN_PROVIDER">
5874                     <context link="contact" jump='provider' field="owner"/>
5875                 </delete>
5876             </actions>
5877         </permacrud>
5878         </class>
5879
5880         <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">
5881                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
5882                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
5883                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
5884                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
5885                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
5886                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
5887                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
5888                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
5889                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5890                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
5891                 </fields>
5892                 <links>
5893                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
5894                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
5895                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
5896                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
5897                 </links>
5898                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5899                 </permacrud>
5900         </class>
5901
5902         <class id="acqfc" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
5903                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
5904                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
5905                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
5906                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
5907                 </fields>
5908                 <links>
5909             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
5910                 </links>
5911                 <!--
5912                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
5913                         But here's what it should look like if we ever do use pcrud.
5914                 -->
5915                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5916                         <actions>
5917                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5918                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5919                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5920                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5921                         </actions>
5922                 </permacrud>
5923         </class>
5924
5925         <class id="acqfy" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
5926                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
5927                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
5928                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
5929                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
5930                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
5931                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
5932                 </fields>
5933                 <links>
5934                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
5935                 </links>
5936                 <!--
5937                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
5938                         But here's what it should look like if we ever do use pcrud.
5939                 -->
5940                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5941                         <actions>
5942                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5943                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5944                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5945                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5946                         </actions>
5947                 </permacrud>
5948         </class>
5949
5950         <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">
5951                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
5952                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
5953                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
5954                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
5955                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
5956                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5957                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
5958                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
5959                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
5960                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5961                 </fields>
5962                 <links>
5963                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
5964                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5965             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
5966             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
5967                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
5968                 </links>
5969         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5970             <actions>
5971                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
5972                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
5973                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
5974                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
5975             </actions>
5976         </permacrud>
5977         </class>
5978
5979         <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">
5980                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
5981                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
5982                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
5983                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5984                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5985                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
5986                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
5987                 </fields>
5988                 <links>
5989                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5990                 </links>
5991                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5992                         <actions>
5993                                 <create permission="ADMIN_FUNDING_SOURCE">
5994                     <context link="funding_source" field="owner"/>
5995                 </create>
5996                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
5997                     <context link="funding_source" field="owner"/>
5998                 </retrieve>
5999                                 <update permission="ADMIN_FUNDING_SOURCE">
6000                     <context link="funding_source" field="owner"/>
6001                 </update>
6002                                 <delete permission="ADMIN_FUNDING_SOURCE">
6003                     <context link="funding_source" field="owner"/>
6004                 </delete>
6005                         </actions>
6006                 </permacrud>
6007         </class>
6008
6009         <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">
6010                 <fields oils_persist:primary="id">
6011                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
6012                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
6013                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
6014                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
6015                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
6016                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6017                 </fields>
6018                 <links>
6019                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6020                 </links>
6021                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6022                 </permacrud>
6023         </class>
6024
6025         <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">
6026                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
6027                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
6028                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6029                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
6030                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
6031                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6032                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
6033                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
6034                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6035                 </fields>
6036                 <links>
6037                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6038                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6039                 </links>
6040                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6041                         <actions>
6042                                 <create permission="ADMIN_ACQ_FUND">
6043                     <context link="fund" field="org"/>
6044                 </create>
6045                                 <retrieve permission="ADMIN_ACQ_FUND">
6046                     <context link="fund" field="org"/>
6047                 </retrieve>
6048                                 <update permission="ADMIN_ACQ_FUND">
6049                     <context link="fund" field="org"/>
6050                 </update>
6051                                 <delete permission="ADMIN_ACQ_FUND">
6052                     <context link="fund" field="org"/>
6053                 </delete>
6054                         </actions>
6055                 </permacrud>
6056         </class>
6057
6058         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
6059                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
6060                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6061                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
6062                         <field reporter:label="Name" name="name" reporter:datatype="text" />
6063                         <field reporter:label="Year" name="year" reporter:datatype="int" />
6064                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
6065                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6066                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
6067                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
6068                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6069                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
6070                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
6071                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
6072                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
6073                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
6074                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
6075                 </fields>
6076                 <links>
6077                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
6078                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6079             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
6080             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
6081             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
6082                 </links>
6083         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6084             <actions>
6085                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
6086                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
6087                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
6088                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
6089             </actions>
6090         </permacrud>
6091         </class>
6092
6093         <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">
6094                 <fields oils_persist:primary="fund">
6095                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6096                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6097                 </fields>
6098                 <links>
6099                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6100                 </links>
6101         </class>
6102
6103         <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">
6104                 <fields oils_persist:primary="fund">
6105                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6106                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
6107                 </fields>
6108                 <links>
6109                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6110                 </links>
6111         </class>
6112
6113         <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">
6114                 <fields oils_persist:primary="fund">
6115                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6116                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
6117                 </fields>
6118                 <links>
6119                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6120                 </links>
6121         </class>
6122
6123         <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">
6124                 <fields oils_persist:primary="fund">
6125                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6126                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6127                 </fields>
6128                 <links>
6129                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6130                 </links>
6131         </class>
6132
6133         <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">
6134                 <fields oils_persist:primary="fund">
6135                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6136                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
6137                 </fields>
6138                 <links>
6139                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6140                 </links>
6141         </class>
6142
6143    <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">
6144         <fields oils_persist:primary="fund">
6145             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6146             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6147         </fields>
6148         <links>
6149             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6150         </links>
6151     </class>
6152
6153    <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">
6154         <fields oils_persist:primary="fund">
6155             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6156             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
6157         </fields>
6158         <links>
6159             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6160         </links>
6161     </class>
6162
6163    <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">
6164         <fields oils_persist:primary="fund">
6165             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6166             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6167         </fields>
6168         <links>
6169             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6170         </links>
6171     </class>
6172
6173    <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">
6174         <fields oils_persist:primary="fund">
6175             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6176             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
6177         </fields>
6178         <links>
6179             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6180         </links>
6181     </class>
6182
6183    <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">
6184         <fields oils_persist:primary="fund">
6185             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6186             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
6187         </fields>
6188         <links>
6189             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6190         </links>
6191     </class>
6192
6193         <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">
6194                 <fields oils_persist:primary="funding_source">
6195                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6196                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
6197                 </fields>
6198                 <links>
6199                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6200                 </links>
6201         </class>
6202
6203         <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">
6204                 <fields oils_persist:primary="funding_source">
6205                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6206                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
6207                 </fields>
6208                 <links>
6209                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6210                 </links>
6211         </class>
6212
6213         <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">
6214                 <fields oils_persist:primary="funding_source">
6215                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6216                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
6217                 </fields>
6218                 <links>
6219                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6220                 </links>
6221         </class>
6222
6223         <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">
6224                 <fields oils_persist:primary="fund">
6225                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6226                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
6227                 </fields>
6228                 <links>
6229                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6230                 </links>
6231         </class>
6232
6233         <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">
6234                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
6235                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
6236                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6237                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6238                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6239                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
6240                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6241                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6242                 </fields>
6243                 <links>
6244                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
6245                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6246                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6247                 </links>
6248                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6249                         <actions>
6250                                 <create permission="ADMIN_ACQ_FUND">
6251                     <context link="fund" field="org"/>
6252                 </create>
6253                                 <retrieve permission="ADMIN_ACQ_FUND">
6254                     <context link="fund" field="org"/>
6255                 </retrieve>
6256                                 <update permission="ADMIN_ACQ_FUND">
6257                     <context link="fund" field="org"/>
6258                 </update>
6259                                 <delete permission="ADMIN_ACQ_FUND">
6260                     <context link="fund" field="org"/>
6261                 </delete>
6262                         </actions>
6263                 </permacrud>
6264         </class>
6265
6266     <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">
6267         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
6268             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
6269             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6270             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
6271             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
6272             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
6273             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
6274             <field reporter:label="Note" name="note" reporter:datatype="text" />
6275             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6276         </fields>
6277         <links>
6278             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
6279             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
6280             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6281         </links>
6282                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6283                         <actions>
6284                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6285                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6286                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6287                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6288                         </actions>
6289                 </permacrud>
6290     </class>
6291
6292         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
6293                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
6294                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
6295                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
6296                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
6297                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6298                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6299                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6300                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
6301                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
6302                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6303                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6304                 </fields>
6305                 <links>
6306                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6307                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6308                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6309                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6310                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
6311                 </links>
6312                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6313                         <actions>
6314                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
6315                         </actions>
6316                 </permacrud>
6317         </class>
6318
6319         <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">
6320                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
6321                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6322                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
6323                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6324                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6325                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
6326                 </fields>
6327                 <links>
6328                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6329                 </links>
6330                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6331                         <actions>
6332                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6333                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
6334                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6335                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6336                         </actions>
6337                 </permacrud>
6338         </class>
6339
6340         <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">
6341                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
6342                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
6343                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
6344                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6345                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6346                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6347                         <field reporter:label="State" name="state" reporter:datatype="text" />
6348                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
6349                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6350                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6351                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
6352                         <field reporter:label="Name" name="name" reporter:datatype="text" />
6353                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6354                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6355                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
6356                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6357                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
6358                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
6359                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
6360                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
6361                 </fields>
6362                 <links>
6363                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6364                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6365                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6366                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
6367                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6368                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
6369                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
6370                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
6371                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
6372                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6373                 </links>
6374                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6375                         <actions>
6376                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6377                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
6378                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6379                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6380                         </actions>
6381                 </permacrud>
6382         </class>
6383
6384         <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">
6385                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
6386                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
6387                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
6388                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
6389                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
6390                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
6391                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6392                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6393                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
6394                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
6395                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
6396                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6397                         <field reporter:label="State" name="state" reporter:datatype="text"/>
6398                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
6399                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6400                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
6401                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6402                 </fields>
6403                 <links>
6404                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
6405                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6406                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6407                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6408                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
6409                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6410                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6411                 </links>
6412                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6413             <actions>
6414                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
6415             </actions>
6416                 </permacrud>
6417         </class>
6418
6419         <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">
6420                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
6421                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
6422                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
6423                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6424                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6425                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6426                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6427                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
6428                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
6429                 </fields>
6430                 <links>
6431                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6432                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6433                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6434                 </links>
6435                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6436             <actions>
6437                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6438                     <context link="purchase_order" field="ordering_agency"/>
6439                 </retrieve>
6440                 <create permission="CREATE_PURCHASE_ORDER">
6441                     <context link="purchase_order" field="ordering_agency"/>
6442                 </create>
6443                 <update permission="CREATE_PURCHASE_ORDER">
6444                     <context link="purchase_order" field="ordering_agency"/>
6445                 </update>
6446                 <delete permission="CREATE_PURCHASE_ORDER">
6447                     <context link="purchase_order" field="ordering_agency"/>
6448                 </delete>
6449             </actions>
6450                 </permacrud>
6451         </class>
6452
6453         <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">
6454                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
6455                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6456                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6457                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6458                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
6459                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6460                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
6461                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6462                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
6463                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
6464                         <field reporter:label="Target" name="target" reporter:datatype="int" />
6465                 </fields>
6466                 <links>
6467                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6468                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6469                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
6470                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6471                 </links>
6472                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6473             <actions>
6474                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6475                     <context link="purchase_order" field="ordering_agency"/>
6476                 </retrieve>
6477                 <create permission="CREATE_PURCHASE_ORDER">
6478                     <context link="purchase_order" field="ordering_agency"/>
6479                 </create>
6480                 <update permission="CREATE_PURCHASE_ORDER">
6481                     <context link="purchase_order" field="ordering_agency"/>
6482                 </update>
6483                 <delete permission="CREATE_PURCHASE_ORDER">
6484                     <context link="purchase_order" field="ordering_agency"/>
6485                 </delete>
6486             </actions>
6487                 </permacrud>
6488         </class>
6489
6490         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
6491                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
6492                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
6493                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
6494                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
6495                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
6496                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6497                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6498                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6499                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
6500                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
6501                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
6502                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
6503                         <field reporter:label="State" name="state" reporter:datatype="text" />
6504                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6505                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6506                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
6507                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6508                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
6509                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
6510                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
6511                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
6512                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
6513                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
6514                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
6515                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
6516                 </fields>
6517                 <links>
6518                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
6519                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6520                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6521                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6522                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6523                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
6524                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
6525                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
6526                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
6527                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
6528                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6529                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
6530                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
6531                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
6532                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
6533                 </links>
6534                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6535                         <actions>
6536                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
6537                                         <context link="purchase_order" field="ordering_agency"/>
6538                                         <context link="picklist" field="org_unit"/>
6539                                 </retrieve>
6540                         </actions>
6541                 </permacrud>
6542         </class>
6543
6544         <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">
6545                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
6546                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
6547                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
6548                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
6549                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
6550                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6551                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6552                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
6553                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6554                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6555                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
6556                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
6557                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
6558                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
6559                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
6560                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
6561                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
6562                         <field reporter:label="State" name="state" reporter:datatype="text"/>
6563                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
6564                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
6565                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
6566                 </fields>
6567                 <links>
6568                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
6569                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6570                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6571                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
6572                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6573                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6574                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
6575                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
6576                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6577                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
6578                 </links>
6579                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6580                         <actions>
6581                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6582                                         <context link="purchase_order" field="ordering_agency"/>
6583                                         <context link="picklist" field="org_unit"/>
6584                                 </retrieve>
6585                         </actions>
6586                 </permacrud>
6587         </class>
6588
6589         <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">
6590                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
6591                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
6592                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
6593                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6594                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
6595                 </fields>
6596                 <links>
6597                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6598                 </links>
6599                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6600                         <actions>
6601                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6602                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
6603                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6604                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6605                         </actions>
6606                 </permacrud>
6607         </class>
6608
6609         <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">
6610                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
6611                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
6612                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
6613                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6614                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6615                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6616                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6617                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
6618                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
6619                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
6620                 </fields>
6621                 <links>
6622                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6623                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6624                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6625                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
6626                 </links>
6627         </class>
6628
6629         <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">
6630                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
6631                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
6632                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
6633                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
6634                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
6635                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
6636                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
6637                 </fields>
6638                 <links>
6639                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6640                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
6641                 </links>
6642         </class>
6643
6644         <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">
6645                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
6646                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
6647                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6648                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
6649                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
6650                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
6651                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
6652                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6653                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
6654                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
6655                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
6656                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
6657                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6658                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
6659                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6660                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
6661                 </fields>
6662                 <links>
6663                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6664                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
6665                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6666                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6667                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6668                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6669                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6670                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6671                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
6672                 </links>
6673         </class>
6674
6675         <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">
6676                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6677                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6678                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6679                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6680                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6681                 </fields>
6682                 <links/>
6683                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6684                         <actions>
6685                                 <retrieve />
6686                         </actions>
6687                 </permacrud>
6688         </class>
6689
6690         <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">
6691                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6692                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6693                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6694                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6695                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
6696                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6697             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
6698                 </fields>
6699                 <links/>
6700         <permacrud>
6701             <actions>
6702                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
6703                 <retrieve />
6704                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
6705                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
6706             </actions>
6707         </permacrud>
6708         </class>
6709
6710         <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">
6711                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6712                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6713                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6714                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6715                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
6716                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6717                 </fields>
6718                 <links/>
6719         </class>
6720         <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">
6721                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6722                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6723                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6724                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6725                         <field reporter:label="User" name="usr" reporter:datatype="link" />
6726                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6727                 </fields>
6728                 <links>
6729                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6730                 </links>
6731         </class>
6732
6733         <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">
6734             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6735                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6736                 <field reporter:label="Code" name="code" reporter:datatype="text" />
6737                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6738                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
6739                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6740                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6741         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
6742
6743             </fields>
6744             <links>
6745                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6746             </links>
6747             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6748                 <actions>
6749                     <create permission="ADMIN_PROVIDER">
6750                         <context link="provider" field="owner"/>
6751                     </create>
6752                     <retrieve permission="ADMIN_PROVIDER">
6753                         <context link="provider" field="owner"/>
6754                     </retrieve>
6755                     <update permission="ADMIN_PROVIDER">
6756                         <context link="provider" field="owner"/>
6757                     </update>
6758                     <delete permission="ADMIN_PROVIDER">
6759                         <context link="provider" field="owner"/>
6760                     </delete>
6761                 </actions>
6762             </permacrud>
6763         </class>
6764         
6765         <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">
6766             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
6767                 <field reporter:label="ID" name="id" reporter:datatype="id" />
6768                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6769                 <field reporter:label="Name" name="name" reporter:datatype="text" />
6770                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
6771             </fields>
6772             <links>
6773                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6774             </links>
6775             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6776                 <actions>
6777                     <create permission="ADMIN_PROVIDER">
6778                         <context link="provider" field="owner"/>
6779                     </create>
6780                     <retrieve permission="ADMIN_PROVIDER">
6781                         <context link="provider" field="owner"/>
6782                     </retrieve>
6783                     <update permission="ADMIN_PROVIDER">
6784                         <context link="provider" field="owner"/>
6785                     </update>
6786                     <delete permission="ADMIN_PROVIDER">
6787                         <context link="provider" field="owner"/>
6788                     </delete>
6789                 </actions>
6790             </permacrud>
6791         </class>
6792         
6793         <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">
6794             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6795                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6796                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6797                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6798                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6799                 </fields>
6800                 <links/>
6801         </class>
6802
6803         <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">
6804                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
6805                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
6806                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
6807                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
6808                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
6809                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
6810                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
6811                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
6812                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
6813                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
6814                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
6815                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
6816                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
6817                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
6818                 </fields>
6819                 <links>
6820                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6821                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6822                 </links>
6823         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6824             <actions>
6825                 <create permission="ADMIN_PROVIDER">
6826                     <context link="provider" field="owner"/>
6827                 </create>
6828                 <retrieve permission="ADMIN_PROVIDER">
6829                     <context link="provider" field="owner"/>
6830                 </retrieve>
6831                 <update permission="ADMIN_PROVIDER">
6832                     <context link="provider" field="owner"/>
6833                 </update>
6834                 <delete permission="ADMIN_PROVIDER">
6835                     <context link="provider" field="owner"/>
6836                 </delete>
6837             </actions>
6838         </permacrud>
6839         </class>
6840
6841         <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">
6842                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
6843                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
6844                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
6845                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
6846                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
6847                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
6848                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
6849                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
6850                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
6851                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
6852                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
6853                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
6854                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
6855                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
6856                 </fields>
6857                 <links>
6858                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
6859                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6860                 </links>
6861         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6862             <actions>
6863                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
6864                     <context link="account" jump="provider" field="owner"/>
6865                 </retrieve>
6866                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
6867                     <context link="account" jump="provider" field="owner"/>
6868                 </update>
6869                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
6870                     <context link="account" jump="provider" field="owner"/>
6871                 </delete>
6872             </actions>
6873         </permacrud>
6874         </class>
6875
6876
6877         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
6878                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
6879                         <field name="id" reporter:datatype="id" />
6880                         <field name="parent" reporter:datatype="link"/>
6881                         <field name="owner" reporter:datatype="link"/>
6882                         <field name="create_time" reporter:datatype="timestamp"/>
6883                         <field name="name" reporter:datatype="text"/>
6884                         <field name="shared" reporter:datatype="bool"/>
6885                         <field name="share_with" reporter:datatype="link"/>
6886                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6887                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
6888                 </fields>
6889                 <links>
6890                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6891                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
6892                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
6893                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
6894                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
6895                 </links>
6896         </class>
6897         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
6898                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
6899                         <field name="id" reporter:datatype="id" />
6900                         <field name="parent" reporter:datatype="link"/>
6901                         <field name="owner" reporter:datatype="link"/>
6902                         <field name="create_time" reporter:datatype="timestamp"/>
6903                         <field name="name" reporter:datatype="text"/>
6904                         <field name="shared" reporter:datatype="bool"/>
6905                         <field name="share_with" reporter:datatype="link"/>
6906                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6907                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
6908                 </fields>
6909                 <links>
6910                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6911                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
6912                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
6913                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
6914                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
6915                 </links>
6916         </class>
6917         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
6918                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
6919                         <field name="id" reporter:datatype="id" />
6920                         <field name="parent" reporter:datatype="link"/>
6921                         <field name="owner" reporter:datatype="link"/>
6922                         <field name="create_time" reporter:datatype="timestamp"/>
6923                         <field name="name" reporter:datatype="text"/>
6924                         <field name="shared" reporter:datatype="bool"/>
6925                         <field name="share_with" reporter:datatype="link"/>
6926                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6927                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
6928                 </fields>
6929                 <links>
6930                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6931                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
6932                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
6933                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
6934                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
6935                 </links>
6936         </class>
6937         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
6938                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
6939                         <field name="id" reporter:datatype="id" />
6940                         <field name="owner" reporter:datatype="link"/>
6941                         <field name="create_time" reporter:datatype="timestamp"/>
6942                         <field name="name" reporter:datatype="text"/>
6943                         <field name="data" reporter:datatype="text"/>
6944                         <field name="folder" reporter:datatype="link"/>
6945                         <field name="description" reporter:datatype="text"/>
6946                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
6947                 </fields>
6948                 <links>
6949                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6950                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
6951                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
6952                 </links>
6953         </class>
6954         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
6955                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
6956                         <field name="id" reporter:datatype="id" />
6957                         <field name="owner" reporter:datatype="link"/>
6958                         <field name="create_time" reporter:datatype="timestamp"/>
6959                         <field name="template" reporter:datatype="link"/>
6960                         <field name="data" reporter:datatype="text"/>
6961                         <field name="folder" reporter:datatype="link"/>
6962                         <field name="recur" reporter:datatype="bool"/>
6963                         <field name="recurrence" reporter:datatype="interval"/>
6964                         <field name="name" reporter:datatype="text"/>
6965                         <field name="description" reporter:datatype="text"/>
6966                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
6967                 </fields>
6968                 <links>
6969                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6970                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
6971                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
6972                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
6973                 </links>
6974         </class>
6975         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
6976                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
6977                         <field name="id" reporter:datatype="id" />
6978                         <field name="runner" reporter:datatype="link"/>
6979                         <field name="start_time" reporter:datatype="timestamp"/>
6980                         <field name="complete_time" reporter:datatype="timestamp"/>
6981                         <field name="run_time" reporter:datatype="timestamp"/>
6982                         <field name="email" reporter:datatype="text"/>
6983                         <field name="excel_format" reporter:datatype="bool"/>
6984                         <field name="csv_format" reporter:datatype="bool"/>
6985                         <field name="html_format" reporter:datatype="bool"/>
6986                         <field name="error_code" reporter:datatype="int"/>
6987                         <field name="error_text" reporter:datatype="text"/>
6988                         <field name="report" reporter:datatype="link"/>
6989                         <field name="folder" reporter:datatype="link"/>
6990                         <field name="chart_pie" reporter:datatype="bool"/>
6991                         <field name="chart_bar" reporter:datatype="bool"/>
6992                         <field name="chart_line" reporter:datatype="bool"/>
6993                 </fields>
6994                 <links>
6995                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
6996                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
6997                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
6998                 </links>
6999         </class>
7000         <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">
7001                 <fields oils_persist:primary="id">
7002                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7003                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7004                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7005                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7006                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7007                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7008                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7009                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7010                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7011                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7012                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7013                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7014                 </fields>
7015                 <links>
7016                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7017                 </links>
7018         </class>
7019         <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">
7020                 <fields oils_persist:primary="id">
7021                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7022                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7023                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7024                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7025                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7026                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7027                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7028                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7029                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7030                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7031                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7032                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7033                 </fields>
7034                 <links>
7035                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7036                 </links>
7037         </class>
7038         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
7039                 <fields oils_persist:primary="id">
7040                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7041                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
7042                         <field reporter:label="Fingerprint" name="fingerprint" />
7043                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7044                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7045                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7046                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7047                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
7048                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7049                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7050                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7051                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
7052                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
7053                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
7054                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7055                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7056                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
7057                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
7058                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
7059                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
7060                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
7061                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
7062                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7063                 </fields>
7064                 <links>
7065                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
7066                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7067                 </links>
7068         </class>
7069         <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">
7070                 <fields oils_persist:primary="id">
7071                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
7072                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
7073                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
7074                 </fields>
7075                 <links>
7076                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
7077                 </links>
7078         </class>
7079         <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">
7080                 <fields oils_persist:primary="id">
7081                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
7082                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
7083                 </fields>
7084                 <links>
7085                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
7086                 </links>
7087         </class>
7088         <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">
7089                 <fields oils_persist:primary="id">
7090                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
7091                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
7092                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
7093                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
7094                 </fields>
7095                 <links>
7096                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
7097                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
7098                 </links>
7099         </class>
7100         <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">
7101                 <fields oils_persist:primary="xact">
7102                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7103                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
7104                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
7105                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
7106                 </fields>
7107                 <links>
7108                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7109                 </links>
7110         </class>
7111         <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">
7112                 <fields oils_persist:primary="xact">
7113                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7114                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
7115                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
7116                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
7117                 </fields>
7118                 <links>
7119                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7120                 </links>
7121         </class>
7122         <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)">
7123                 <fields oils_persist:primary="id">
7124                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
7125                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
7126                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
7127                 </fields>
7128                 <links>
7129                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
7130                 </links>
7131         </class>
7132         <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">
7133                 <fields oils_persist:primary="id">
7134                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
7135                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
7136                 </fields>
7137                 <links>
7138                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
7139                 </links>
7140         </class>
7141         <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">
7142                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
7143                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
7144                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
7145                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
7146                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
7147                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
7148                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
7149                 </fields>
7150                 <links>
7151                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7152                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
7153                 </links>
7154                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7155                         <actions>
7156                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7157                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7158                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7159                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7160                         </actions>
7161                 </permacrud>
7162         </class>
7163         <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">
7164                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
7165                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
7166                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
7167                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
7168                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
7169                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7170                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
7171                 </fields>
7172                 <links>
7173                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
7174                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7175                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7176                 </links>
7177                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7178                         <actions>
7179                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
7180                                         <context link="formula" field="owner"/>
7181                                 </create>
7182                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
7183                                         <context link="formula" field="owner"/>
7184                                 </retrieve>
7185                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
7186                                         <context link="formula" field="owner"/>
7187                                 </update>
7188                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
7189                                         <context link="formula" field="owner"/>
7190                                 </delete>
7191                         </actions>
7192                 </permacrud>
7193         </class>
7194
7195         <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">
7196                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
7197                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7198                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7199                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7200                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
7201                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
7202                 </fields>
7203                 <links>
7204                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7205                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
7206                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7207                 </links>
7208                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7209                         <actions>
7210                                 <create permission="CREATE_PURCHASE_ORDER">
7211                                         <context link="formula" field="owner"/>
7212                 </create>
7213                                 <retrieve permission="CREATE_PURCHASE_ORDER">
7214                                         <context link="formula" field="owner"/>
7215                 </retrieve>
7216                                 <update permission="CREATE_PURCHASE_ORDER">
7217                                         <context link="formula" field="owner"/>
7218                 </update>
7219                                 <delete permission="CREATE_PURCHASE_ORDER">
7220                                         <context link="formula" field="owner"/>
7221                 </delete>
7222                         </actions>
7223                 </permacrud>
7224         </class>
7225
7226         <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">
7227                 <fields oils_persist:primary="id">
7228                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
7229                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7230                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
7231                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
7232                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
7233                 </fields>
7234                 <links>
7235                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7236                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7237                 </links>
7238                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7239                 </permacrud>
7240         </class>
7241
7242         <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">
7243                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
7244                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
7245                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7246                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7247                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7248                 </fields>
7249                 <links>
7250                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7251                 </links>
7252                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7253                         <actions>
7254                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7255                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
7256                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7257                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7258                         </actions>
7259                 </permacrud>
7260         </class>
7261
7262         <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">
7263                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
7264                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
7265                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7266                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7267                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7268                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
7269                 </fields>
7270                 <links>
7271                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7272                 </links>
7273                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7274                         <actions>
7275                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7276                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
7277                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7278                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7279                         </actions>
7280                 </permacrud>
7281         </class>
7282
7283         <class id="acqcl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
7284                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
7285                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
7286                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
7287                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
7288                 </fields>
7289                 <links>
7290                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
7291                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
7292                 </links>
7293                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7294                 </permacrud>
7295         </class>
7296
7297         <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">
7298                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
7299                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
7300                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
7301                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
7302                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
7303                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7304                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7305                 </fields>
7306                 <links>
7307                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
7308                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
7309                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7310                 </links>
7311                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7312                 </permacrud>
7313         </class>
7314
7315         <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">
7316                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
7317                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
7318                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
7319                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
7320                 </fields>
7321                 <links>
7322                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
7323                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
7324                 </links>
7325                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7326                 </permacrud>
7327         </class>
7328
7329         <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">
7330                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
7331                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
7332                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
7333                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
7334                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
7335                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7336                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7337                 </fields>
7338                 <links>
7339                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
7340                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
7341                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7342                 </links>
7343                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7344                 </permacrud>
7345         </class>
7346
7347         <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">
7348                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
7349                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
7350                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7351                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
7352                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7353                 </fields>
7354                 <links>
7355                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7356                 </links>
7357                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7358             <actions>
7359                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7360                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
7361                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7362                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7363             </actions>
7364                 </permacrud>
7365         </class>
7366
7367         <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">
7368                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
7369                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
7370                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
7371                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
7372                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
7373                 </fields>
7374                 <links>
7375                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7376                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
7377                 </links>
7378                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7379                         <actions>
7380                                 <create permission="ADMIN_CLAIM_POLICY">
7381                                         <context link="claim_policy" field="org_unit"/>
7382                 </create>
7383                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
7384                                         <context link="claim_policy" field="org_unit"/>
7385                 </retrieve>
7386                                 <update permission="ADMIN_CLAIM_POLICY">
7387                                         <context link="claim_policy" field="org_unit"/>
7388                 </update>
7389                                 <delete permission="ADMIN_CLAIM_POLICY">
7390                                         <context link="claim_policy" field="org_unit"/>
7391                 </delete>
7392                         </actions>
7393                 </permacrud>
7394         </class>
7395
7396     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
7397         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
7398             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7399             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7400             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7401             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
7402             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
7403             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
7404             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
7405             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
7406             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
7407             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
7408             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
7409             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
7410             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
7411             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
7412             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7413         </fields>
7414     </class>
7415
7416     <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">
7417         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
7418             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7419             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7420             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7421             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7422             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7423         </fields>
7424     </class>
7425
7426     <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">
7427         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
7428             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7429             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7430             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7431             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
7432             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
7433             <field reporter:label="City" name="city" reporter:datatype="text"/>
7434             <field reporter:label="State" name="state" reporter:datatype="text"/>
7435             <field reporter:label="Country" name="country" reporter:datatype="text"/>
7436             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7437             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7438         </fields>
7439     </class>
7440
7441     <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">
7442         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
7443             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7444             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7445             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7446             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
7447             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
7448             <field reporter:label="City" name="city" reporter:datatype="text"/>
7449             <field reporter:label="State" name="state" reporter:datatype="text"/>
7450             <field reporter:label="Country" name="country" reporter:datatype="text"/>
7451             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7452             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7453         </fields>
7454     </class>
7455
7456     <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">
7457         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
7458             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7459             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7460             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7461             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
7462             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
7463             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7464         </fields>
7465     </class>
7466
7467         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
7468                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
7469                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
7470                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7471                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
7472                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
7473                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
7474                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
7475                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
7476                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
7477                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
7478                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
7479                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
7480                 </fields>
7481                 <links>
7482                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7483                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7484                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7485                 </links>
7486                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7487                 </permacrud>
7488         </class>
7489
7490         <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">
7491                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
7492                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
7493                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
7494                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
7495                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
7496                 </fields>
7497                 <links>
7498                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
7499                 </links>
7500                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7501                 </permacrud>
7502         </class>
7503
7504     <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">
7505         <fields>
7506             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7507             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7508             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7509         </fields>
7510                 <links>
7511                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7512                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7513                 </links>
7514     </class>
7515
7516     <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">
7517         <fields>
7518             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7519             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
7520         </fields>
7521                 <links>
7522                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7523                 </links>
7524     </class>
7525
7526     <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">
7527         <fields>
7528             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7529             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7530             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7531         </fields>
7532                 <links>
7533                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7534                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7535                 </links>
7536     </class>
7537
7538     <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">
7539         <fields>
7540             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7541             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
7542         </fields>
7543                 <links>
7544                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7545                 </links>
7546     </class>
7547
7548     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
7549                 <oils_persist:source_definition>
7550
7551             SELECT  DISTINCT l.*
7552               FROM  action.unfulfilled_hold_loops l
7553                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
7554               WHERE l.count = m.max
7555
7556                 </oils_persist:source_definition>
7557         <fields>
7558             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7559             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7560             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7561         </fields>
7562                 <links>
7563                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7564                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7565                 </links>
7566     </class>
7567
7568         <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">
7569                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
7570                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
7571                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
7572                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
7573                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
7574                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
7575                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
7576                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
7577                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
7578                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
7579                 </fields>
7580                 <links>
7581                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
7582                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
7583                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
7584                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
7585                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
7586                 </links>
7587                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7588                 </permacrud>
7589         </class>
7590
7591         <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">
7592                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
7593                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
7594                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
7595                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7596                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
7597                 </fields>
7598                 <links>
7599                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
7600                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
7601                 </links>
7602                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7603                 </permacrud>
7604         </class>
7605
7606         <class id="qdt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
7607                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
7608                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
7609                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
7610                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
7611                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
7612                 </fields>
7613                 <links>
7614                 </links>
7615                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7616                 </permacrud>
7617         </class>
7618
7619         <class id="qsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
7620                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
7621                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
7622                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
7623                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7624                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
7625                 </fields>
7626                 <links>
7627                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
7628                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
7629                 </links>
7630                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7631                 </permacrud>
7632         </class>
7633         
7634         <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">
7635                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
7636                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
7637                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
7638                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
7639                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
7640                 </fields>
7641                 <links>
7642                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
7643                 </links>
7644                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7645                 </permacrud>
7646         </class>
7647         
7648         <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">
7649                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
7650                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
7651                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
7652                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7653                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
7654                 </fields>
7655                 <links>
7656                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
7657                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
7658                 </links>
7659                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7660                 </permacrud>
7661         </class>
7662
7663         <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">
7664                 <fields oils_persist:primary="name">
7665                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
7666                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
7667                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
7668                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7669                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
7670                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
7671                 </fields>
7672                 <links>
7673                 </links>
7674                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7675                 </permacrud>
7676         </class>
7677
7678         <class id="qxp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
7679                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7680                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7681                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
7682                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7683                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7684                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7685                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
7686                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
7687                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7688                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7689                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
7690                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
7691                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
7692                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
7693                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
7694                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7695                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
7696                 </fields>
7697                 <links>
7698                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7699                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7700                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
7701                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
7702                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7703                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
7704                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
7705                 </links>
7706                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7707                 </permacrud>
7708         </class>
7709
7710         <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">
7711                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
7712                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
7713                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7714                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7715                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
7716                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
7717                 </fields>
7718                 <links>
7719                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7720                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
7721                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
7722                 </links>
7723                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7724                 </permacrud>
7725         </class>
7726
7727         <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">
7728                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
7729                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
7730                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
7731                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
7732                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
7733                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
7734                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
7735                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
7736                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
7737                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7738                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
7739                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
7740                 </fields>
7741                 <links>
7742                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7743                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
7744                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
7745                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
7746                 </links>
7747                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7748                 </permacrud>
7749         </class>
7750
7751         <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">
7752                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
7753                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
7754                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
7755                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7756                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7757                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
7758                 </fields>
7759                 <links>
7760                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
7761                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
7762                 </links>
7763                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7764                 </permacrud>
7765         </class>
7766
7767         <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">
7768                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
7769                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
7770                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
7771                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7772                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
7773                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
7774                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
7775                 </fields>
7776                 <links>
7777                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7778                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
7779                 </links>
7780                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7781                 </permacrud>
7782         </class>
7783
7784         <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">
7785                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
7786                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
7787                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
7788                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7789                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
7790                 </fields>
7791                 <links>
7792                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7793                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
7794                 </links>
7795                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7796                 </permacrud>
7797         </class>
7798
7799         <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">
7800                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7801                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7802                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7803                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7804                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7805                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7806                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7807                 </fields>
7808                 <links>
7809                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7810                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7811                 </links>
7812                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7813                 </permacrud>
7814         </class>
7815
7816         <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">
7817                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7818                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7819                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7820                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7821                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7822                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
7823                 </fields>
7824                 <links>
7825                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7826                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
7827                 </links>
7828                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7829                 </permacrud>
7830         </class>
7831
7832         <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">
7833                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7834                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7835                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7836                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7837                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7838                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
7839                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7840                 </fields>
7841                 <links>
7842                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7843                 </links>
7844                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7845                 </permacrud>
7846         </class>
7847
7848         <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">
7849                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7850                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7851                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7852                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7853                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7854                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7855                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7856                 </fields>
7857                 <links>
7858                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7859                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7860                 </links>
7861                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7862                 </permacrud>
7863         </class>
7864
7865         <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">
7866                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7867                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7868                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7869                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7870                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7871                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7872                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
7873                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7874                 </fields>
7875                 <links>
7876                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7877                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7878                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
7879                 </links>
7880                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7881                 </permacrud>
7882         </class>
7883
7884         <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">
7885                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7886                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7887                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7888                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7889                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7890                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
7891                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7892                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7893                 </fields>
7894                 <links>
7895                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7896                 </links>
7897                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7898                 </permacrud>
7899         </class>
7900
7901         <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">
7902                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7903                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7904                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7905                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7906                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7907                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
7908                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7909                 </fields>
7910                 <links>
7911                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7912                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7913                 </links>
7914                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7915                 </permacrud>
7916         </class>
7917
7918         <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">
7919                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7920                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7921                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7922                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7923                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7924                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7925                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
7926                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7927                 </fields>
7928                 <links>
7929                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7930                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
7931                 </links>
7932                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7933                 </permacrud>
7934         </class>
7935
7936         <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">
7937                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7938                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7939                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7940                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7941                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7942                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7943                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
7944                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7945                 </fields>
7946                 <links>
7947                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7948                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7949                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7950                 </links>
7951                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7952                 </permacrud>
7953         </class>
7954
7955         <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">
7956                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7957                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7958                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7959                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7960                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7961                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7962                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7963                 </fields>
7964                 <links>
7965                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7966                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7967                 </links>
7968                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7969                 </permacrud>
7970         </class>
7971
7972         <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">
7973                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7974                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7975                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7976                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7977                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7978                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7979                 </fields>
7980                 <links>
7981                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7982                 </links>
7983                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7984                 </permacrud>
7985         </class>
7986
7987         <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">
7988                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7989                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7990                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7991                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7992                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7993                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
7994                 </fields>
7995                 <links>
7996                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7997                 </links>
7998                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7999                 </permacrud>
8000         </class>
8001
8002         <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">
8003                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8004                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8005                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8006                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8007                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8008                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8009                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8010                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8011                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8012                 </fields>
8013                 <links>
8014                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8015                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8016                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8017                 </links>
8018                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8019                 </permacrud>
8020         </class>
8021
8022         <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">
8023                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8024                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8025                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8026                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8027                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8028                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8029                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8030                 </fields>
8031                 <links>
8032                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8033                 </links>
8034                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8035                 </permacrud>
8036         </class>
8037
8038         <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">
8039                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8040                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8041                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8042                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8043                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8044                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8045                 </fields>
8046                 <links>
8047                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8048                 </links>
8049                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8050                 </permacrud>
8051         </class>
8052
8053         <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">
8054                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8055                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8056                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8057                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8058                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8059                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8060                 </fields>
8061                 <links>
8062                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8063                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8064                 </links>
8065                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8066                 </permacrud>
8067         </class>
8068
8069         <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">
8070                 <fields oils_persist:primary="id">
8071                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
8072                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
8073                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
8074                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
8075                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
8076                 </fields>
8077                 <links>
8078                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
8079                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8080                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
8081                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
8082                 </links>
8083         </class>
8084
8085         <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">
8086                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
8087                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8088                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
8089                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
8090                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
8091                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8092                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8093                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
8094                 </fields>
8095                 <links/>
8096                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8097                         <actions>
8098                                 <retrieve/>
8099                         </actions>
8100                 </permacrud>
8101         </class>
8102
8103         <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">
8104                 <fields oils_persist:primary="ptype_key">
8105                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
8106                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8107                 </fields>
8108                 <links/>
8109                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8110                         <actions>
8111                                 <retrieve/>
8112                         </actions>
8113                 </permacrud>
8114         </class>
8115
8116         <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">
8117                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
8118                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8119                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
8120                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
8121                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8122                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8123                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8124                 </fields>
8125                 <links>
8126                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
8127                 </links>
8128                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8129                         <actions>
8130                                 <retrieve/>
8131                         </actions>
8132                 </permacrud>
8133         </class>
8134
8135         <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">
8136                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
8137                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8138                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
8139                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
8140                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8141                 </fields>
8142                 <links>
8143                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8144                 </links>
8145                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8146                         <actions>
8147                                 <retrieve/>
8148                         </actions>
8149                 </permacrud>
8150         </class>
8151
8152         <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">
8153                 <fields oils_persist:primary="code">
8154                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
8155                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
8156                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
8157                 </fields>
8158                 <links/>
8159                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8160                         <actions>
8161                                 <retrieve/>
8162                         </actions>
8163                 </permacrud>
8164         </class>
8165
8166         <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">
8167                 <oils_persist:source_definition>
8168
8169             SELECT  b.id,
8170                     MAX(dcp.edit_date) AS last_delete_date
8171              FROM   biblio.record_entry b
8172                     JOIN asset.call_number cn ON (cn.record = b.id)
8173                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
8174              WHERE  NOT b.deleted
8175              GROUP BY b.id
8176              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
8177
8178                 </oils_persist:source_definition>
8179                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8180                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8181                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
8182                 </fields>
8183                 <links>
8184                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8185                 </links>
8186                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8187                         <actions>
8188                                 <retrieve/>
8189                         </actions>
8190                 </permacrud>
8191         </class>
8192
8193         <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">
8194                 <oils_persist:source_definition>
8195
8196             -- -- 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.
8197             -- -- 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
8198             -- -- may not.
8199             -- SELECT
8200             --     bre.id AS "bib_id",
8201             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
8202             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
8203             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
8204             -- FROM (
8205                 SELECT
8206                     y.bre AS "id",
8207                     COALESCE( x.copy_count, 0 ) AS "copy_count",
8208                     y.hold_count AS "hold_count",
8209                     (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"
8210                 FROM (
8211                         SELECT
8212                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
8213                             COUNT(*) AS "hold_count"
8214                         FROM action.hold_request h
8215                         WHERE
8216                             cancel_time IS NULL
8217                             AND fulfillment_time IS NULL
8218                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
8219                         GROUP BY 1
8220                     )y LEFT JOIN (
8221                         SELECT 
8222                             (SELECT id
8223                                 FROM biblio.record_entry 
8224                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
8225                             ) AS "bre", 
8226                             COUNT(*) AS "copy_count"
8227                         FROM asset.copy
8228                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
8229                         WHERE copy.holdable 
8230                             AND NOT copy.deleted 
8231                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
8232                         GROUP BY 1
8233                     )x ON x.bre = y.bre
8234                 -- )z RIGHT JOIN (
8235                 --     SELECT id
8236                 --     FROM biblio.record_entry
8237                 --     WHERE NOT deleted
8238                 -- )bre ON (z.bib_id = bre.id)
8239                 
8240
8241                 </oils_persist:source_definition>
8242                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8243                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8244                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
8245                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
8246                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
8247                 </fields>
8248                 <links>
8249                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8250                 </links>
8251                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8252                         <actions>
8253                                 <retrieve/>
8254                         </actions>
8255                 </permacrud>
8256         </class>
8257
8258         <!-- ********************************************************************************************************************* -->
8259         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
8260         <!-- ********************************************************************************************************************* -->
8261         <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">
8262                 <fields oils_persist:primary="id">
8263                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
8264                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
8265                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
8266                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
8267                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
8268                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
8269                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
8270                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
8271                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
8272                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
8273                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
8274                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
8275                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
8276                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
8277                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
8278                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
8279                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
8280                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
8281                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
8282                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
8283                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
8284                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
8285                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
8286                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
8287                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
8288                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
8289                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
8290                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
8291                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
8292                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
8293                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
8294                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
8295                 </fields>
8296                 <links>
8297                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8298                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
8299                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
8300                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
8301                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
8302                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
8303                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
8304                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
8305                 </links>
8306         </class>
8307
8308         <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">
8309                 <fields oils_persist:primary="id">
8310                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
8311                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8312                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
8313                 </fields>
8314                 <links>
8315                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8316                 </links>
8317         </class>
8318
8319         <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">
8320                 <fields oils_persist:primary="id">
8321                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
8322                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8323                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
8324                 </fields>
8325                 <links>
8326                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8327                 </links>
8328         </class>
8329
8330         <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">
8331                 <fields oils_persist:primary="id">
8332                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
8333
8334                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
8335                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
8336                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
8337
8338                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
8339                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
8340                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
8341
8342                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
8343                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
8344
8345                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
8346                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
8347                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
8348
8349                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
8350                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
8351
8352                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
8353                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
8354                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
8355
8356                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
8357                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
8358                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
8359
8360                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
8361                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
8362                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
8363                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
8364
8365                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
8366                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
8367
8368                 </fields>
8369                 <links>
8370                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
8371                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8372                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
8373                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
8374                 </links>
8375         </class>
8376
8377         <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">
8378                 <oils_persist:source_definition>
8379
8380             SELECT
8381                 po.ordering_agency AS ordering_agency,
8382                 po.id AS purchase_order,
8383                 li.id AS lineitem,
8384                 lid.id AS lineitem_detail,
8385                 cpa.id AS claim_policy_action
8386             FROM
8387                 acq.lineitem_detail lid
8388                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
8389                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
8390                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
8391                 JOIN acq.claim_policy_action cpa ON (
8392                     cpa.claim_policy = cp.id
8393
8394                     -- we only care about claim policy actions whose claim
8395                     -- interval we'd reached or exceeded
8396                     AND (NOW() - cpa.action_interval) &gt; po.order_date
8397
8398                     -- filter out all claim policy actions where claim events
8399                     -- have occurred on or after the action's action_interval
8400                     AND NOT EXISTS (
8401                         SELECT 1
8402                         FROM
8403                             acq.claim_event evt
8404                             JOIN acq.claim claim ON (
8405                                 claim.id = evt.claim
8406                                 AND claim.lineitem_detail = lid.id
8407                             )
8408                         WHERE
8409                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
8410                     )
8411                 )
8412             WHERE
8413                 lid.cancel_reason IS NULL
8414                 AND li.cancel_reason IS NULL -- belt/suspenders
8415                 AND po.cancel_reason IS NULL -- belt/suspenders
8416                 AND lid.recv_time IS NULL
8417                 AND po.state = 'on-order'
8418             ORDER BY 1, 2, 3, 4, 5
8419
8420                 </oils_persist:source_definition>
8421                 <fields>
8422                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8423                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8424                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8425                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8426                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
8427                 </fields>
8428                 <links>
8429                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8430                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8431                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8432                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8433                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
8434                 </links>
8435         </class>
8436
8437         <class id="acqlisum" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary" oils_persist:readonly="true" reporter:label="Lineitem Summary">
8438                 <oils_persist:source_definition>
8439
8440             SELECT 
8441                 li.id AS lineitem, 
8442                 (
8443                     SELECT COUNT(lid.id) 
8444                     FROM acq.lineitem_detail lid
8445                     WHERE lineitem = li.id
8446                 ) AS item_count,
8447                 (
8448                     SELECT COUNT(lid.id) 
8449                     FROM acq.lineitem_detail lid
8450                     WHERE recv_time IS NOT NULL AND lineitem = li.id
8451                 ) AS recv_count,
8452                 (
8453                     SELECT COUNT(lid.id) 
8454                     FROM acq.lineitem_detail lid
8455                     WHERE cancel_reason IS NOT NULL AND lineitem = li.id
8456                 ) AS cancel_count,
8457                 (
8458                     SELECT COUNT(lid.id) 
8459                     FROM acq.lineitem_detail lid
8460                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8461                     WHERE NOT debit.encumbrance AND lineitem = li.id
8462                 ) AS invoice_count,
8463                 (
8464                     SELECT COUNT(DISTINCT(lid.id)) 
8465                     FROM acq.lineitem_detail lid
8466                         JOIN acq.claim claim ON (claim.lineitem_detail = lid.id)
8467                     WHERE lineitem = li.id
8468                 ) AS claim_count,
8469                 (
8470                     SELECT (COUNT(lid.id) * li.estimated_unit_price)::NUMERIC(8,2)
8471                     FROM acq.lineitem_detail lid
8472                     WHERE lid.cancel_reason IS NULL AND lineitem = li.id
8473                 ) AS estimated_amount,
8474                 (
8475                     SELECT SUM(debit.amount)::NUMERIC(8,2)
8476                     FROM acq.lineitem_detail lid
8477                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8478                     WHERE debit.encumbrance AND lineitem = li.id
8479                 ) AS encumbrance_amount,
8480                 (
8481                     SELECT SUM(debit.amount)::NUMERIC(8,2)
8482                     FROM acq.lineitem_detail lid
8483                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8484                     WHERE NOT debit.encumbrance AND lineitem = li.id
8485                 ) AS paid_amount
8486
8487                 FROM acq.lineitem AS li
8488         </oils_persist:source_definition>
8489                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
8490                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8491                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
8492                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
8493                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
8494                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
8495                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
8496                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
8497                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
8498                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
8499                 </fields>
8500                 <links>
8501                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8502                 </links>
8503     </class>
8504
8505
8506         <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">
8507                 <oils_persist:source_definition>
8508
8509                         SELECT  t.*
8510                           FROM  action.transit_copy t
8511                                 JOIN actor.org_unit AS s ON (t.source = s.id)
8512                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
8513                           WHERE s.parent_ou &lt;&gt; d.parent_ou
8514
8515                 </oils_persist:source_definition>
8516                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8517                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
8518                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
8519                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8520                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
8521                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
8522                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
8523                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
8524                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8525                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8526                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8527                 </fields>
8528                 <links>
8529                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
8530                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8531                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8532                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8533                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8534                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
8535                 </links>
8536         </class>
8537
8538     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
8539                 <oils_persist:source_definition>
8540
8541         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
8542                 SELECT
8543                         cp.id as copy,
8544                         COUNT(circ.id),
8545                         EXTRACT(YEAR FROM circ.xact_start) AS year,
8546                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
8547                 FROM
8548                         asset.copy cp
8549                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
8550                 GROUP BY 1, 3, 4
8551                 UNION
8552                 SELECT
8553                         cp.id as copy,
8554                         COUNT(circ.id),
8555                         EXTRACT(YEAR FROM circ.xact_start) AS year,
8556                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
8557                 FROM
8558                         asset.copy cp
8559                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
8560                 GROUP BY 1, 3, 4
8561                 UNION
8562                 SELECT
8563                         id as copy,
8564                         circ_count,
8565                         -1 AS year,
8566                         false as is_renewal
8567                 FROM
8568                         extend_reporter.legacy_circ_count
8569         )x GROUP BY 1, 3, 4
8570
8571                 </oils_persist:source_definition>
8572         <fields>
8573             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
8574             <field reporter:label="Count" name="count" reporter:datatype="int"/>
8575             <field reporter:label="Year" name="year" reporter:datatype="int"/>
8576             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
8577         </fields>
8578                 <links>
8579                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
8580                 </links>
8581                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8582                         <actions>
8583                                 <retrieve/>
8584                         </actions>
8585                 </permacrud>
8586     </class>
8587
8588         <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">
8589                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
8590                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
8591                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
8592                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
8593                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
8594                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
8595                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
8596                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
8597                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
8598                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
8599                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
8600                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
8601                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
8602                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
8603                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
8604                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
8605                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
8606                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
8607                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
8608                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
8609                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
8610                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
8611                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
8612                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
8613                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
8614                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
8615                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
8616                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
8617                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
8618                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
8619                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
8620                 </fields>
8621                 <links>
8622                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
8623                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
8624                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
8625                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8626                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
8627                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8628                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8629                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
8630                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
8631                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
8632                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
8633                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
8634                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
8635                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
8636                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
8637                 </links>
8638         </class>
8639
8640     <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">
8641         <fields oils_persist:primary="id">
8642             <field reporter:label="Title" name="title" reporter:datatype="text"/>
8643             <field reporter:label="Author" name="author" reporter:datatype="text"/>
8644             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
8645             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
8646             <field reporter:label="Price" name="price" reporter:datatype="money"/>
8647             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
8648             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
8649             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
8650             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
8651             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
8652             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
8653             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
8654             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
8655             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
8656             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
8657             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
8658             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
8659             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8660             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
8661             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
8662             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
8663             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
8664             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8665             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
8666             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
8667             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
8668             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
8669             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
8670             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
8671             <field reporter:label="Status" name="status" reporter:datatype="link"/>
8672             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
8673             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
8674             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
8675             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
8676         </fields>
8677         <links>
8678             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8679             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8680             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8681             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
8682             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
8683         </links>
8684     </class>
8685
8686     <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">
8687         <fields oils_persist:primary="id">
8688             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
8689             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8690             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
8691             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
8692         </fields>
8693         <links>
8694             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8695             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8696         </links>
8697     </class>
8698
8699     <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">
8700         <fields oils_persist:primary="owning_lib">
8701             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8702             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
8703             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
8704         </fields>
8705         <links>
8706             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8707         </links>
8708     </class>
8709
8710     <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">
8711         <fields oils_persist:primary="id">
8712             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
8713             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
8714             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8715             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
8716             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
8717         </fields>
8718         <links>
8719             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8720             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8721             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8722         </links>
8723     </class>
8724
8725     <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">
8726         <fields oils_persist:primary="circ_lib">
8727             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
8728             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8729             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
8730             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
8731         </fields>
8732         <links>
8733             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8734             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8735         </links>
8736     </class>
8737
8738     <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">
8739         <fields oils_persist:primary="id">
8740             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
8741             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
8742             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8743             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
8744             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
8745         </fields>
8746         <links>
8747             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8748             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8749             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
8750         </links>
8751     </class>
8752
8753     <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">
8754         <fields oils_persist:primary="home_ou">
8755             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
8756             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8757             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
8758             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
8759         </fields>
8760         <links>
8761             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8762             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
8763         </links>
8764     </class>
8765         <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">
8766                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
8767                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
8768                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
8769                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
8770                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
8771                 </fields>
8772                 <links>
8773                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8774                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
8775                 </links>
8776                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8777                         <actions>
8778                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
8779                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
8780                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
8781                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
8782                         </actions>
8783                 </permacrud>
8784         </class>
8785         <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">
8786                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
8787                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
8788                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
8789                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
8790                 </fields>
8791                 <links>
8792                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8793                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
8794                         </links>
8795                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8796                 <actions>
8797                                 <create permission="ADMIN_ACQ_FUND_TAG">
8798                                         <context link="tag" field="owner"/>
8799                                 </create>
8800                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8801                                         <context link="tag" field="owner"/>
8802                                 </retrieve>
8803                                 <update permission="ADMIN_ACQ_FUND_TAG">
8804                                         <context link="tag" field="owner"/>
8805                                 </update>
8806                                 <delete permission="ADMIN_ACQ_FUND_TAG">
8807                                         <context link="tag" field="owner"/>
8808                                 </delete>
8809                         </actions>
8810                 </permacrud>
8811         </class>
8812
8813         <!-- ********************************************************************************************************************* -->
8814
8815 </IDL>
8816
8817 <!--
8818     vim:noet:ts=4:sw=4:
8819 -->