]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac
[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="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
2266                         <field name="billing_location" reporter:datatype="link"/>
2267                 </fields>
2268                 <links>
2269                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2270                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
2271                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
2272                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
2273                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
2274                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2275                 </links>
2276         </class>
2277         <class id="au" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
2278                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
2279                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
2280                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
2281                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
2282                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
2283                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
2284                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
2285                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
2286                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2287                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
2288                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
2289                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
2290                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2291                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
2292                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
2293                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
2294                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
2295                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
2296                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
2297                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2298                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
2299                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
2300                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
2301                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
2302                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
2303                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
2304                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
2305                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
2306                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
2307                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
2308                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
2309                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
2310                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
2311                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
2312                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
2313                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
2314                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
2315                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
2316                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
2317                         <field reporter:label="Password" name="passwd"  reporter:datatype="text"/>
2318                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
2319                         <field reporter:label="Prefix" name="prefix"  reporter:datatype="text"/>
2320                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
2321                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
2322                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
2323                         <field reporter:label="Suffix/Title" name="suffix"  reporter:datatype="text"/>
2324                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
2325                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
2326                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
2327                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
2328                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
2329                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
2330                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2331                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2332                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
2333                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
2334                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2335                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2336                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
2337                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
2338                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
2339                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
2340                 </fields>
2341                 <links>
2342                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
2343                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
2344                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
2345                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
2346                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
2347                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
2348                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
2349                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
2350                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
2351                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
2352                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
2353                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
2354                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
2355                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
2356                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
2357                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
2358                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
2359                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
2360                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
2361                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
2362                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
2363                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
2364                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
2365                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
2366                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
2367                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
2368                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
2369                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
2370                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
2371                 </links>
2372         </class>
2373
2374         <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">
2375                 <fields oils_persist:primary="name">
2376                         <field name="name" reporter:datatype="text"/>
2377                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2378                 </fields>
2379                 <links/>
2380                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2381                         <actions>
2382                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2383                                 <retrieve/>
2384                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2385                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2386                         </actions>
2387                 </permacrud>
2388         </class>
2389         <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">
2390                 <fields oils_persist:primary="name">
2391                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
2392                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
2393                         <field name="description" reporter:label="Description" reporter:datatype="text"/>
2394                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
2395                         <field name="fm_class" reporter:label="Fielmapper Class" reporter:datatype="text"/>
2396                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
2397                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
2398                 </fields>
2399                 <links>
2400                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
2401                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2402                 </links>
2403                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2404                         <actions>
2405                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2406                                 <retrieve/>
2407                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2408                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2409                         </actions>
2410                 </permacrud>
2411         </class>
2412         <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">
2413                 <fields oils_persist:primary="name">
2414                         <field name="name" reporter:datatype="text"/>
2415                         <field name="label" reporter:datatype="text"/>
2416                         <field name="description" reporter:datatype="text"/>
2417                         <field name="datatype" reporter:datatype="text"/>
2418                         <field name="view_perm" reporter:datatype="link"/>
2419                         <field name="update_perm" reporter:datatype="link"/>
2420                         <field name="fm_class" reporter:datatype="text"/>
2421                         <field name="grp" reporter:datatype="link"/>
2422                 </fields>
2423                 <links>
2424                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
2425                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
2426                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
2427                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2428                 </links>
2429                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2430                         <actions>
2431                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2432                                 <retrieve/>
2433                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2434                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2435                         </actions>
2436                 </permacrud>
2437         </class>
2438         <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">
2439                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
2440                         <field name="id" />
2441                         <field name="name"  reporter:datatype="text"/>
2442                         <field name="org_unit" reporter:datatype="org_unit"/>
2443                         <field name="value"  reporter:datatype="text"/>
2444                 </fields>
2445                 <links>
2446                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2447                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
2448                 </links>
2449         </class>
2450         <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">
2451                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
2452                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2453                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
2454                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2455                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
2456                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2457                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
2458                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
2459                 </fields>
2460                 <links>
2461                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
2462                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2463                 </links>
2464         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2465             <actions>
2466                 <create permission="CREATE_COPY_NOTE">
2467                     <context link="owning_copy" field="circ_lib"/>
2468                 </create>
2469                 <retrieve permission="VIEW_COPY_NOTES">
2470                     <context link="owning_copy" field="circ_lib"/>
2471                 </retrieve>
2472                 <update permission="UPDATE_COPY_NOTE">
2473                     <context link="owning_copy" field="circ_lib"/>
2474                 </update>
2475                 <delete permission="DELETE_COPY_NOTE">
2476                     <context link="owning_copy" field="circ_lib"/>
2477                 </delete>
2478             </actions>
2479         </permacrud>
2480         </class>
2481         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
2482                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
2483                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
2484                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
2485                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
2486                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2487                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
2488                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
2489                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
2490                 </fields>
2491                 <links>
2492                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2493                 </links>
2494         </class>
2495         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
2496                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
2497                         <field name="fingerprint"  reporter:datatype="text"/>
2498                         <field name="id" reporter:datatype="id" />
2499                         <field name="master_record" reporter:datatype="link"/>
2500                         <field name="mods"  reporter:datatype="text"/>
2501                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
2502                 </fields>
2503                 <links>
2504                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
2505                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
2506                 </links>
2507         </class>
2508         <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">
2509                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
2510                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2511                         <field name="name"  reporter:datatype="text"/>
2512                 </fields>
2513                 <links/>
2514         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2515             <actions>
2516                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
2517                 <retrieve/>
2518                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
2519                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
2520             </actions>
2521         </permacrud>
2522         </class>
2523         <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">
2524                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
2525                         <field name="code"  reporter:datatype="text"/>
2526                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
2527                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
2528                 </fields>
2529                 <links/>
2530         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2531             <actions>
2532                 <create permission="CREATE_PERM" global_required="true"/>
2533                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
2534                 <update permission="UPDATE_PERM" global_required="true"/>
2535                 <delete permission="DELETE_PERM" global_required="true"/>
2536             </actions>
2537         </permacrud>
2538         </class>
2539         <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">
2540                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
2541                         <field name="id" reporter:datatype="id" />
2542                         <field name="metarecord" reporter:datatype="link"/>
2543                         <field name="source" reporter:datatype="link"/>
2544                 </fields>
2545                 <links>
2546                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2547                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
2548                 </links>
2549         </class>
2550         <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">
2551                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
2552                         <field name="id" reporter:datatype="id" />
2553                         <field name="field" reporter:datatype="link"/>
2554                         <field name="source" reporter:datatype="link"/>
2555                         <field name="value"  reporter:datatype="text"/>
2556                 </fields>
2557                 <links>
2558                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2559                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2560                 </links>
2561         </class>
2562         <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">
2563                 <oils_persist:source_definition>
2564                         SELECT * FROM metabib.author_field_entry
2565                                                 UNION ALL
2566                         SELECT * FROM metabib.keyword_field_entry
2567                                                 UNION ALL
2568                         SELECT * FROM metabib.identifier_field_entry
2569                                                 UNION ALL
2570                         SELECT * FROM metabib.title_field_entry
2571                                                 UNION ALL
2572                         SELECT * FROM metabib.subject_field_entry
2573                                                 UNION ALL
2574                         SELECT * FROM metabib.series_field_entry
2575                 </oils_persist:source_definition>
2576                 <fields>
2577                         <field name="field" reporter:datatype="link"/>
2578                         <field name="id" reporter:datatype="id" />
2579                         <field name="source" reporter:datatype="link"/>
2580                         <field name="value"  reporter:datatype="text"/>
2581                 </fields>
2582                 <links>
2583                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2584                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2585                 </links>
2586         </class>
2587         <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">
2588                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
2589                         <field name="field" reporter:datatype="link"/>
2590                         <field name="id" reporter:datatype="id" />
2591                         <field name="source" reporter:datatype="link"/>
2592                         <field name="value"  reporter:datatype="text"/>
2593                 </fields>
2594                 <links>
2595                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2596                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2597                 </links>
2598         </class>
2599         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
2600                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2601                         <field name="accepting_usr" reporter:datatype="link"/>
2602                         <field name="amount" reporter:datatype="money" />
2603                         <field name="amount_collected" reporter:datatype="money" />
2604                         <field name="cash_drawer" reporter:datatype="link"/>
2605                         <field name="id" reporter:datatype="id" />
2606                         <field name="note"  reporter:datatype="text"/>
2607                         <field name="payment_ts" reporter:datatype="timestamp"/>
2608                         <field name="xact" reporter:datatype="link"/>
2609                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2610                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2611                 </fields>
2612                 <links>
2613                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2614                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2615                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2616                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2617                 </links>
2618         </class>
2619         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
2620                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2621                         <field name="accepting_usr" reporter:datatype="link"/>
2622                         <field name="amount" reporter:datatype="money" />
2623                         <field name="amount_collected" reporter:datatype="money" />
2624                         <field name="id" reporter:datatype="id" />
2625                         <field name="note"  reporter:datatype="text"/>
2626                         <field name="payment_ts" reporter:datatype="timestamp"/>
2627                         <field name="xact" reporter:datatype="link"/>
2628                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2629                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2630                 </fields>
2631                 <links>
2632                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2633                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2634                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2635                 </links>
2636         </class>
2637         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
2638                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
2639                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
2640                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2641                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2642                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
2643                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2644                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2645                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
2646                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2647                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
2648                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2649                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2650                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
2651                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2652                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
2653                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
2654                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
2655                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
2656                 </fields>
2657                 <links>
2658                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2659                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
2660                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
2661                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
2662                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
2663                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
2664                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
2665                 </links>
2666         </class>
2667
2668         <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">
2669                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
2670                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2671                         <field name="name"  reporter:datatype="text"/>
2672                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
2673                         <field name="block_list" reporter:datatype="text"/>
2674                         <field name="org_depth" reporter:datatype="int"/>
2675                 </fields>
2676                 <links/>
2677         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2678             <actions>
2679                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2680                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
2681                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2682                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2683             </actions>
2684         </permacrud>
2685         </class>
2686         <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">
2687                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
2688                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
2689                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
2690                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
2691                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
2692                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
2693                 </fields>
2694                 <links>
2695                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
2696                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
2697                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2698         </links>
2699         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2700             <actions>
2701                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2702                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2703                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2704                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2705             </actions>
2706         </permacrud>
2707         </class>
2708         <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">
2709                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
2710                         <field name="holdable" reporter:datatype="bool"/>
2711                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2712                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2713                         <field name="opac_visible" reporter:datatype="bool"/>
2714                 </fields>
2715                 <links/>
2716         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2717             <actions>
2718                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
2719                 <retrieve/>
2720                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
2721                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
2722             </actions>
2723         </permacrud>
2724         </class>
2725         <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">
2726                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
2727                         <field name="id" reporter:datatype="id" reporter:label="ID" />
2728                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
2729                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
2730                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
2731                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
2732                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
2733                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
2734                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
2735                 </fields>
2736                 <links>
2737                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2738                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2739                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2740                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
2741                 </links>
2742                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2743                         <actions>
2744                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
2745                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
2746                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
2747                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
2748                         </actions>
2749                 </permacrud>
2750         </class>
2751         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
2752                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
2753                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
2754                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
2755                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
2756                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
2757                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
2758                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
2759                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
2760                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
2761                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
2762                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2763                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
2764                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
2765                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
2766                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
2767                 </fields>
2768                 <links>
2769                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2770                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
2771                 </links>
2772         </class>
2773
2774         <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">
2775                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
2776                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2777                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
2778                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2779                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
2780                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
2781                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
2782                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
2783                 </fields>
2784                 <links>
2785                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
2786                 </links>
2787         </class>
2788
2789         <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">
2790                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
2791                         <field name="call_number" />
2792                         <field name="create_date" reporter:datatype="timestamp"/>
2793                         <field name="creator" reporter:datatype="link"/>
2794                         <field name="id" reporter:datatype="id" />
2795                         <field name="pub" reporter:datatype="bool"/>
2796                         <field name="title"  reporter:datatype="text"/>
2797                         <field name="value"  reporter:datatype="text"/>
2798                 </fields>
2799                 <links>
2800                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2801                 </links>
2802         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2803             <actions>
2804                 <create permission="CREATE_VOLUME_NOTE">
2805                     <context link="call_number" field="owning_lib"/>
2806                 </create>
2807                 <retrieve permission="VIEW_VOLUME_NOTES">
2808                     <context link="call_number" field="owning_lib"/>
2809                 </retrieve>
2810                 <update permission="UPDATE_VOLUME_NOTE">
2811                     <context link="call_number" field="owning_lib"/>
2812                 </update>
2813                 <delete permission="DELETE_VOLUME_NOTE">
2814                     <context link="call_number" field="owning_lib"/>
2815                 </delete>
2816             </actions>
2817         </permacrud>
2818         </class>
2819         <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">
2820                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
2821                         <field name="create_date" reporter:datatype="timestamp"/>
2822                         <field name="creator" reporter:datatype="link"/>
2823                         <field name="edit_date" reporter:datatype="timestamp"/>
2824                         <field name="editor" reporter:datatype="link"/>
2825                         <field name="id" reporter:datatype="id" />
2826                         <field name="record" reporter:datatype="link"/>
2827                         <field name="value" reporter:datatype="text"/>
2828                 </fields>
2829                 <links>
2830                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2831                 </links>
2832         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2833             <actions>
2834                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2835                 <retrieve/>
2836                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2837                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2838             </actions>
2839         </permacrud>
2840         </class>
2841         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
2842         <oils_persist:source_definition>
2843 SELECT  usr,
2844         SUM(
2845             CASE
2846                 WHEN (
2847                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
2848                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
2849                 ) THEN 1
2850                 ELSE 0
2851             END
2852         ) AS out,
2853
2854         SUM(
2855             CASE
2856                 WHEN (
2857                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
2858                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
2859                 ) THEN 1
2860                 ELSE 0
2861             END
2862         ) AS overdue,
2863
2864         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
2865         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
2866         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
2867   FROM  action.circulation
2868   WHERE checkin_time IS NULL
2869   GROUP BY 1
2870         </oils_persist:source_definition>
2871         <fields oils_persist:primary="usr">
2872             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
2873             <field reporter:label="Out" name="out" reporter:datatype="text"/>
2874             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
2875             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
2876             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
2877             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
2878         </fields>
2879         <links>
2880             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2881         </links>
2882         </class>
2883         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
2884         <oils_persist:source_definition>
2885 SELECT  usr,
2886         ARRAY_TO_STRING(ARRAY_ACCUM(
2887             CASE
2888                 WHEN (
2889                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
2890                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
2891                 ) THEN id
2892                 ELSE 0
2893             END
2894         ),',') AS out,
2895
2896         ARRAY_TO_STRING(ARRAY_ACCUM(
2897             CASE
2898                 WHEN (
2899                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
2900                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
2901                 ) THEN id
2902                 ELSE 0
2903             END
2904         ),',') AS overdue,
2905
2906         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END),',') AS lost,
2907         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END),',') AS claims_returned,
2908         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id ELSE 0 END),',') AS long_overdue
2909   FROM  action.circulation
2910   WHERE checkin_time IS NULL
2911   GROUP BY 1
2912         </oils_persist:source_definition>
2913         <fields oils_persist:primary="usr">
2914             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
2915             <field reporter:label="Out" name="out" reporter:datatype="text"/>
2916             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
2917             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
2918             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
2919             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
2920         </fields>
2921         <links>
2922             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2923         </links>
2924         </class>
2925         <class id="circ" controller="open-ils.cstore" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
2926                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2927                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2928                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2929                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2930                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2931                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2932                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2933                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2934                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2935                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2936                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2937                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2938                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2939                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2940                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2941                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2942                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2943                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2944                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2945                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
2946                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2947                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2948                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2949                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
2950                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2951                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2952                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2953                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2954                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
2955                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
2956                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
2957                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2958                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2959                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2960                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2961                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2962                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2963                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
2964                 </fields>
2965                 <links>
2966                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2967                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2968                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2969                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2970                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2971                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2972                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2973                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2974                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2975                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2976                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2977                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2978                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2979                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2980                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2981                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2982                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
2983                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
2984                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
2985                 </links>
2986         </class>
2987         <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">
2988                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2989                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2990                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2991                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2992                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2993                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2994                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2995                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2996                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2997                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2998                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2999                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3000                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3001                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3002                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3003                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3004                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3005                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3006                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3007                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3008                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3009                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3010                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3011                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3012                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3013                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3014                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3015                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3016                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3017                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3018                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3019                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3020                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3021                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3022                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3023                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3024                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3025                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3026                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3027                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3028                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3029                 </fields>
3030                 <links>
3031                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3032                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3033                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3034                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3035                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3036                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3037                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3038                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3039                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3040                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3041                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3042                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3043                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3044                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3045                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3046                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3047                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3048                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3049                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3050                 </links>
3051         </class>
3052         <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">
3053                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3054                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3055                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3056                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3057                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3058                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3059                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3060                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3061                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3062                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3063                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3064                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3065                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3066                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3067                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3068                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3069                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3070                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3071                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3072                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3073                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3074                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3075                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3076                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3077                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3078                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3079                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3080                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3081                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3082                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3083                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3084                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3085                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3086                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3087                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3088                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3089                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3090                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3091                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3092                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3093                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3094                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3095                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3096                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3097                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3098                 </fields>
3099                 <links>
3100                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3101                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3102                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3103                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3104                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3105                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3106                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3107                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3108                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3109                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3110                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3111                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3112                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3113                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3114                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3115                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3116                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3117                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3118                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3119                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3120                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3121                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
3122                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3123                 </links>
3124         </class>
3125
3126         <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">
3127                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
3128                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3129                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
3130                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3131                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3132                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3133                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3134                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
3135                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
3136                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
3137                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
3138                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3139                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3140                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3141                 </fields>
3142                 <links>
3143                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3144                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3145                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
3146                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
3147                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
3148                 </links>
3149                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3150                         <actions>
3151                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
3152                                 <retrieve />
3153                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
3154                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
3155                         </actions>
3156                 </permacrud>
3157         </class>
3158
3159         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
3160                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
3161                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
3162                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3163                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
3164                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
3165                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3166                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3167                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
3168                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
3169                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3170                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3171                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3172                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
3173                 </fields>
3174                 <links>
3175                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3176                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
3177                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
3178                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
3179                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
3180                 </links>
3181                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3182                         <actions>
3183                                 <create permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
3184                                 <retrieve />
3185                                 <update permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
3186                                 <delete permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
3187                         </actions>
3188                 </permacrud>
3189         </class>
3190         
3191         <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">
3192                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
3193                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
3194                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3195                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
3196                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
3197                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
3198                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
3199                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3200                 </fields>
3201                 <links>
3202                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3203                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
3204                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
3205                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
3206                 </links>
3207                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3208                         <actions>
3209                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
3210                                 <retrieve />
3211                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
3212                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
3213                         </actions>
3214                 </permacrud>
3215         </class>
3216         
3217         <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">
3218                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
3219                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
3220                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3221                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
3222                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
3223                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3224                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3225                 </fields>
3226                 <links>
3227                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3228                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
3229                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
3230                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
3231                 </links>
3232                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3233                         <actions>
3234                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
3235                                 <retrieve />
3236                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
3237                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
3238                         </actions>
3239                 </permacrud>
3240         </class>
3241         
3242         <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">
3243                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
3244                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
3245                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
3246                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
3247                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
3248                 </fields>
3249                 <links>
3250                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
3251                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
3252                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
3253                 </links>
3254                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3255                         <actions>
3256                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
3257                                 <retrieve />
3258                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
3259                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
3260                         </actions>
3261                 </permacrud>
3262         </class>
3263         
3264         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
3265                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3266                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3267                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3268                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
3269                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
3270                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3271                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3272                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3273                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3274                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3275                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
3276                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
3277                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
3278                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
3279                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
3280                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
3281                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
3282                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
3283                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
3284                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3285                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3286                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3287                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
3288                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
3289                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
3290                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
3291                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
3292                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
3293                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3294                 </fields>
3295                 <links>
3296                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3297                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3298                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3299                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3300                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3301                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
3302                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
3303                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3304                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3305                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
3306                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
3307                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
3308                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
3309                 </links>
3310                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3311                         <actions>
3312                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3313                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3314                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3315                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3316                         </actions>
3317                 </permacrud>
3318         </class>
3319         
3320         <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">
3321                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
3322                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
3323                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
3324                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
3325                 </fields>
3326                 <links>
3327                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3328                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
3329                 </links>
3330                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3331                         <actions>
3332                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3333                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3334                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3335                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3336                         </actions>
3337                 </permacrud>
3338         </class>
3339
3340         <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">
3341                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
3342                         <field name="bucket" reporter:datatype="link"/>
3343                         <field name="id" reporter:datatype="id" />
3344                         <field name="target_call_number" reporter:datatype="link" />
3345                         <field name="create_time" reporter:datatype="timestamp" />
3346                         <field name="pos" reporter:datatype="int" />
3347                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
3348                 </fields>
3349                 <links>
3350                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
3351                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
3352             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
3353                 </links>
3354         </class>
3355         <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">
3356                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
3357                         <field name="id" reporter:datatype="id" />
3358                         <field name="item" reporter:datatype="link"/>
3359                         <field name="note" reporter:datatype="text" />
3360                 </fields>
3361                 <links>
3362                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
3363                 </links>
3364         </class>
3365         <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">
3366                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
3367                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3368                         <field name="btype" reporter:datatype="text"/>
3369                         <field name="id" reporter:datatype="id" />
3370                         <field name="name" reporter:datatype="text"/>
3371                         <field name="owner" reporter:datatype="link"/>
3372                         <field name="pub" reporter:datatype="bool"/>
3373                         <field name="create_time" reporter:datatype="timestamp" />
3374                 </fields>
3375                 <links>
3376                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3377                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
3378                 </links>
3379         </class>
3380         <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">
3381                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
3382                         <field name="id" reporter:datatype="id" />
3383                         <field name="bucket" reporter:datatype="link"/>
3384                         <field name="note" reporter:datatype="text" />
3385                 </fields>
3386                 <links>
3387                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
3388                 </links>
3389         </class>
3390         <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">
3391                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
3392                         <field name="hold" reporter:datatype="link"/>
3393                         <field name="id" reporter:datatype="id" />
3394                         <field name="target_copy" reporter:datatype="link"/>
3395                 </fields>
3396                 <links>
3397                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3398                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3399                 </links>
3400         </class>
3401         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
3402                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
3403                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
3404                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
3405                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
3406                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
3407                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
3408                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
3409                 </fields>
3410                 <links>
3411                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3412                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
3413                 </links>
3414         </class>
3415         <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">
3416                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
3417                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
3418                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
3419                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
3420                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3421                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3422                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
3423                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
3424                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
3425                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3426                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
3427                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
3428                 </fields>
3429                 <links>
3430                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3431                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
3432                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
3433                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
3434                 </links>
3435         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3436             <actions>
3437                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
3438                 <retrieve/>
3439                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
3440                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
3441             </actions>
3442         </permacrud>
3443         </class>
3444
3445     <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">
3446         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
3447             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
3448             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
3449             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
3450             <field reporter:label="Position" name="position" reporter:datatype="int"/>
3451         </fields>
3452         <links>
3453             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3454             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
3455         </links>
3456         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3457             <actions>
3458                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3459                 <retrieve/>
3460                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3461                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3462             </actions>
3463         </permacrud>
3464     </class>
3465
3466         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
3467                 <fields>
3468                         <field name="sre_id" oils_persist:virtual="true" />
3469                         <field name="location" oils_persist:virtual="true" />
3470                         <field name="owning_lib" oils_persist:virtual="true" />
3471                         <field name="basic_holdings" oils_persist:virtual="true" />
3472                         <field name="basic_holdings_add" oils_persist:virtual="true" />
3473                         <field name="supplement_holdings" oils_persist:virtual="true" />
3474                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
3475                         <field name="index_holdings" oils_persist:virtual="true" />
3476                         <field name="index_holdings_add" oils_persist:virtual="true" />
3477                         <field name="online" oils_persist:virtual="true" />
3478                         <field name="missing" oils_persist:virtual="true" />
3479                         <field name="incomplete" oils_persist:virtual="true" />
3480                 </fields>
3481         </class>
3482
3483         <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">
3484                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
3485                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
3486                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
3487                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3488                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3489                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3490                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
3491                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3492                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3493                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3494                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
3495                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
3496                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
3497                 </fields>
3498                 <links>
3499                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3500                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3501                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3502                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3503                 </links>
3504                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3505                         <actions>
3506                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
3507                                 <retrieve/>
3508                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
3509                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
3510                         </actions>
3511                 </permacrud>
3512         </class>
3513
3514         <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">
3515                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
3516                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3517                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3518                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
3519                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3520                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3521                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3522                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
3523                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
3524                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
3525                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
3526                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
3527                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
3528                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
3529                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
3530                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
3531                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
3532                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
3533                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
3534                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
3535                 </fields>
3536                 <links>
3537                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3538                 </links>
3539                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3540                         <actions>
3541                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
3542                                         <context link="subscription" field="owning_lib" />
3543                                 </create>
3544                                 <retrieve />
3545                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
3546                                         <context link="subscription" field="owning_lib" />
3547                                 </update>
3548                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
3549                                         <context link="subscription" field="owning_lib" />
3550                                 </delete>
3551                         </actions>
3552                 </permacrud>
3553         </class>
3554
3555         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
3556                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
3557                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3558                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
3559                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3560                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3561                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
3562                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
3563                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
3564                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
3565                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
3566                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3567                 </fields>
3568                 <links>
3569                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3570                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
3571                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
3572                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
3573                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
3574                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
3575                 </links>
3576                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3577                         <actions>
3578                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3579                                 <retrieve />
3580                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3581                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3582                         </actions>
3583                 </permacrud>
3584         </class>
3585
3586         <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">
3587                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
3588                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3589                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3590                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3591                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3592                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3593                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3594                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3595                 </fields>
3596                 <links>
3597                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3598                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3599                 </links>
3600                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3601                 </permacrud>
3602         </class>
3603
3604         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
3605                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
3606                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3607                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
3608                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
3609                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3610                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
3611                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3612                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
3613                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
3614                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
3615                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
3616                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
3617                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
3618                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
3619                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3620                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3621                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3622                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3623                 </fields>
3624                 <links>
3625                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
3626                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3627                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
3628                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
3629                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
3630                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
3631                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
3632                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
3633                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
3634                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
3635                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
3636                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
3637                 </links>
3638                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3639                         <actions>
3640                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3641                                 <retrieve />
3642                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3643                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3644                         </actions>
3645                 </permacrud>
3646         </class>
3647
3648         <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">
3649                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
3650                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3651                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3652                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3653                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3654                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3655                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3656                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3657                 </fields>
3658                 <links>
3659                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3660                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3661                 </links>
3662                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3663                         <actions>
3664                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
3665                                         <context link="distribution" field="holding_lib" />
3666                                 </create>
3667                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
3668                                         <context link="distribution" field="holding_lib" />
3669                                 </retrieve>
3670                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
3671                                         <context link="distribution" field="holding_lib" />
3672                                 </update>
3673                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
3674                                         <context link="distribution" field="holding_lib" />
3675                                 </delete>
3676                         </actions>
3677                 </permacrud>
3678         </class>
3679
3680         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
3681                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
3682                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3683                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3684                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
3685                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
3686                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
3687                 </fields>
3688                 <links>
3689                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3690                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
3691                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
3692                 </links>
3693                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3694                         <actions>
3695                                 <create permission="ADMIN_SERIAL_STREAM">
3696                                         <context link="distribution" field="holding_lib" />
3697                                 </create>
3698                                 <retrieve />
3699                                 <update permission="ADMIN_SERIAL_STREAM">
3700                                         <context link="distribution" field="holding_lib" />
3701                                 </update>
3702                                 <delete permission="ADMIN_SERIAL_STREAM">
3703                                         <context link="distribution" field="holding_lib" />
3704                                 </delete>
3705                         </actions>
3706                 </permacrud>
3707         </class>
3708
3709         <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">
3710                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
3711                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3712                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
3713                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
3714                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
3715                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
3716                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3717                 </fields>
3718                 <links>
3719                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
3720                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
3721                 </links>
3722                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3723                         <actions>
3724                                 <create permission="ADMIN_SERIAL_STREAM">
3725                                         <context link="stream" jump="distribution" field="holding_lib" />
3726                                 </create>
3727                                 <retrieve permission="RECEIVE_SERIAL">
3728                                         <context link="stream" jump="distribution" field="holding_lib" />
3729                                 </retrieve>
3730                                 <update permission="ADMIN_SERIAL_STREAM">
3731                                         <context link="stream" jump="distribution" field="holding_lib" />
3732                                 </update>
3733                                 <delete permission="ADMIN_SERIAL_STREAM">
3734                                         <context link="stream" jump="distribution" field="holding_lib" />
3735                                 </delete>
3736                         </actions>
3737                 </permacrud>
3738         </class>
3739
3740         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
3741                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
3742                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3743                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3744                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3745                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3746                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
3747                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3748                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
3749                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3750                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
3751                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
3752                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
3753                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
3754                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
3755                 </fields>
3756                 <links>
3757                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3758                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3759                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3760                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
3761                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
3762                 </links>
3763                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3764                         <actions>
3765                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
3766                                         <context link="subscription" field="owning_lib" />
3767                                 </create>
3768                                 <retrieve/>
3769                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
3770                                         <context link="subscription" field="owning_lib" />
3771                                 </update>
3772                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
3773                                         <context link="subscription" field="owning_lib" />
3774                                 </delete>
3775                         </actions>
3776                 </permacrud>
3777         </class>
3778
3779         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
3780                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
3781                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3782                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
3783                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
3784                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3785                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
3786                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
3787                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3788                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
3789                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
3790                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
3791                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3792                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3793                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3794                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
3795                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3796                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
3797                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
3798                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
3799                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3800                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3801                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
3802                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
3803                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
3804                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
3805                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
3806                         <field reporter:label="Price" name="price" reporter:datatype="money" />
3807                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
3808                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
3809                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
3810                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
3811                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
3812                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
3813                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
3814                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
3815                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
3816                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3817                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3818                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3819                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
3820                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3821                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3822                 </fields>
3823                 <links>
3824                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
3825                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3826                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3827                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3828                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3829                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
3830                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3831                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
3832                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
3833                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
3834                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
3835                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
3836                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
3837                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
3838                 </links>
3839                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3840                         <actions>
3841                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
3842                                 <retrieve/>
3843                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
3844                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
3845                         </actions>
3846                 </permacrud>
3847         </class>
3848
3849         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
3850                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
3851                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3852                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3853                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3854                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3855                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
3856                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
3857                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
3858                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
3859                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
3860                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
3861                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
3862                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
3863                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3864                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
3865                 </fields>
3866                 <links>
3867                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3868                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3869                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
3870                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
3871                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
3872                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3873                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
3874                 </links>
3875                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3876                         <actions>
3877                                 <create permission="ADMIN_SERIAL_ITEM">
3878                                         <context link="stream" jump="distribution" field="holding_lib" />
3879                                 </create>
3880                                 <retrieve permission="ADMIN_SERIAL_ITEM">
3881                                         <context link="stream" jump="distribution" field="holding_lib" />
3882                                 </retrieve>
3883                                 <update permission="ADMIN_SERIAL_ITEM">
3884                                         <context link="stream" jump="distribution" field="holding_lib" />
3885                                 </update>
3886                                 <delete permission="ADMIN_SERIAL_ITEM">
3887                                         <context link="stream" jump="distribution" field="holding_lib" />
3888                                 </delete>
3889                         </actions>
3890                 </permacrud>
3891         </class>
3892
3893         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
3894                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
3895                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3896                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
3897                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3898                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3899                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3900                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3901                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3902                 </fields>
3903                 <links>
3904                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
3905                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3906                 </links>
3907                 <!-- Not available via PCRUD at this time -->
3908         </class>
3909
3910         <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">
3911                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
3912                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3913                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3914                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
3915                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
3916                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
3917                 </fields>
3918                 <links>
3919                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3920                 </links>
3921                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3922                         <actions>
3923                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
3924                                         <context link="distribution" field="holding_lib" />
3925                                 </create>
3926                                 <retrieve/>
3927                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
3928                                         <context link="distribution" field="holding_lib" />
3929                                 </update>
3930                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
3931                                         <context link="distribution" field="holding_lib" />
3932                                 </create>
3933                         </actions>
3934                 </permacrud>
3935         </class>
3936
3937         <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">
3938                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
3939                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3940                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3941                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
3942                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
3943                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
3944                 </fields>
3945                 <links>
3946                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3947                 </links>
3948                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3949                         <actions>
3950                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
3951                                         <context link="distribution" field="holding_lib" />
3952                                 </create>
3953                                 <retrieve/>
3954                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
3955                                         <context link="distribution" field="holding_lib" />
3956                                 </update>
3957                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
3958                                         <context link="distribution" field="holding_lib" />
3959                                 </create>
3960                         </actions>
3961                 </permacrud>
3962         </class>
3963
3964         <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">
3965                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
3966                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3967                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3968                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
3969                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
3970                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
3971                 </fields>
3972                 <links>
3973                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3974                 </links>
3975                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3976                         <actions>
3977                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
3978                                         <context link="distribution" field="holding_lib" />
3979                                 </create>
3980                                 <retrieve/>
3981                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
3982                                         <context link="distribution" field="holding_lib" />
3983                                 </update>
3984                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
3985                                         <context link="distribution" field="holding_lib" />
3986                                 </create>
3987                         </actions>
3988                 </permacrud>
3989         </class>
3990
3991         <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">
3992                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
3993                         <field name="id" reporter:datatype="id" />
3994                         <field name="owning_copy" reporter:datatype="link"/>
3995                         <field name="stat_cat" reporter:datatype="link"/>
3996                         <field name="stat_cat_entry" reporter:datatype="link"/>
3997                 </fields>
3998                 <links>
3999                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4000                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
4001                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4002                 </links>
4003         </class>
4004         <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">
4005                 <fields oils_persist:primary="code">
4006                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
4007                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4008                 </fields>
4009                 <links/>
4010         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4011             <actions>
4012                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
4013                 <retrieve/>
4014                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
4015                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
4016             </actions>
4017         </permacrud>
4018         </class>
4019         <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">
4020                 <fields oils_persist:primary="code">
4021                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
4022                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4023                 </fields>
4024                 <links/>
4025         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4026             <actions>
4027                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4028                 <retrieve/>
4029                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4030                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4031             </actions>
4032         </permacrud>
4033         </class>
4034         <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">
4035                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
4036                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
4037                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
4038                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
4039                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
4040                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
4041                 </fields>
4042                 <links>
4043             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4044         </links>
4045         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4046             <actions>
4047                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4048                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4049                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4050                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4051             </actions>
4052         </permacrud>
4053         </class>
4054         <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">
4055                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
4056                         <field name="id" reporter:datatype="id" />
4057                         <field name="name" reporter:datatype="text"/>
4058                 </fields>
4059                 <links/>
4060         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4061             <actions>
4062                 <create permission="CREATE_LASSO" global_required="true"/>
4063                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
4064                 <update permission="UPDATE_LASSO" global_required="true"/>
4065                 <delete permission="DELETE_LASSO" global_required="true"/>
4066             </actions>
4067         </permacrud>
4068         </class>
4069         <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">
4070                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
4071                         <field name="id" reporter:datatype="id" />
4072                         <field name="lasso" reporter:datatype="link"/>
4073                         <field name="org_unit" reporter:datatype="org_unit"/>
4074                 </fields>
4075                 <links>
4076                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
4077                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4078                 </links>
4079         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4080             <actions>
4081                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
4082                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
4083                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
4084                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
4085             </actions>
4086         </permacrud>
4087         </class>
4088         <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">
4089                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4090                         <field name="id" reporter:datatype="id" />
4091                         <field name="from_org" reporter:datatype="org_unit"/>
4092                         <field name="to_org" reporter:datatype="org_unit"/>
4093                         <field name="prox" reporter:datatype="int" />
4094                 </fields>
4095                 <links>
4096                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
4097                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
4098                 </links>
4099         </class>
4100         <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">
4101                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4102                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4103                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
4104                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
4105                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
4106                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
4107                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
4108                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
4109                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
4110                 </fields>
4111                 <links/>
4112         </class>
4113         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
4114                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
4115                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
4116                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
4117                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
4118                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
4119                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
4120                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4121                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
4122                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4123                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
4124                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
4125                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
4126                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
4127                 </fields>
4128                 <links>
4129                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4130                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
4131                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
4132                 </links>
4133         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4134             <actions>
4135                 <create permission="ADMIN_SURVEY" context_field="owner"/>
4136                 <retrieve/>
4137                 <update permission="ADMIN_SURVEY" context_field="owner"/>
4138                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
4139             </actions>
4140         </permacrud>
4141         </class>
4142         <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">
4143                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
4144                         <field name="address_type"  reporter:datatype="text"/>
4145                         <field name="city"  reporter:datatype="text"/>
4146                         <field name="country"  reporter:datatype="text"/>
4147                         <field name="county"  reporter:datatype="text"/>
4148                         <field name="id" reporter:datatype="id" />
4149                         <field name="org_unit" reporter:datatype="org_unit"/>
4150                         <field name="post_code"  reporter:datatype="text"/>
4151                         <field name="state"  reporter:datatype="text"/>
4152                         <field name="street1"  reporter:datatype="text"/>
4153                         <field name="street2"  reporter:datatype="text"/>
4154                         <field name="valid" reporter:datatype="bool"/>
4155                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
4156                 </fields>
4157                 <links>
4158                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4159                 </links>
4160         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4161             <actions>
4162                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
4163                 <retrieve/>
4164                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
4165                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
4166             </actions>
4167         </permacrud>
4168         </class>
4169         <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">
4170                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
4171                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
4172                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
4173                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
4174                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
4175                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4176                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
4177                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
4178                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
4179                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
4180                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
4181                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
4182                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
4183                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
4184                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
4185                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
4186                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
4187                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
4188                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
4189                         <field reporter:label="Item Selection Depth" name="selection_depth" />
4190                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
4191                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
4192                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
4193                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
4194                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
4195                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
4196                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
4197                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
4198                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
4199                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
4200                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
4201                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
4202                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
4203                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
4204                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
4205                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
4206                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
4207                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
4208                 </fields>
4209                 <links>
4210                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
4211                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
4212                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4213                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
4214                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
4215                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4216                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4217                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4218                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
4219                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
4220                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
4221                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
4222                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
4223                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
4224                 </links>
4225         </class>
4226         <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">
4227                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
4228                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4229                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
4230                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4231                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
4232                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
4233                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
4234                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
4235                 </fields>
4236                 <links>
4237                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4238                 </links>
4239                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4240                         <actions>
4241                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
4242                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
4243                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
4244                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
4245                         </actions>
4246                 </permacrud>
4247         </class>
4248         <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">
4249                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
4250                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
4251                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
4252                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
4253                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
4254                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
4255                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
4256                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4257                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
4258                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
4259                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
4260                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
4261                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
4262                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4263                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
4264                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
4265                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
4266                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4267                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
4268                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
4269                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
4270                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
4271                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
4272                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
4273                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
4274                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
4275                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
4276                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4277                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4278                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4279                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
4280                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
4281                 </fields>
4282                 <links>
4283                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
4284                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
4285                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
4286                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
4287                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
4288                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
4289                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
4290                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
4291                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
4292                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
4293                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
4294                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
4295                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
4296                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
4297                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
4298                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
4299                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
4300                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
4301                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
4302                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
4303                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
4304                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
4305                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
4306                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
4307                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
4308                 </links>
4309         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4310             <actions>
4311                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
4312                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT">
4313                     <context field="id"/>
4314                     <context field="parent_ou"/>
4315                                 </retrieve>
4316                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
4317                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
4318             </actions>
4319         </permacrud>
4320         </class>
4321         <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">
4322                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
4323                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4324                         <field name="btype" reporter:datatype="text"/>
4325                         <field name="id" reporter:datatype="id" />
4326                         <field name="name"  reporter:datatype="text"/>
4327                         <field name="owner" reporter:datatype="link"/>
4328                         <field name="pub" reporter:datatype="bool"/>
4329                         <field name="create_time" reporter:datatype="timestamp" />
4330                 </fields>
4331                 <links>
4332                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4333                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
4334                 </links>
4335         </class>
4336         <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">
4337                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
4338                         <field name="id" reporter:datatype="id" />
4339                         <field name="bucket" reporter:datatype="link"/>
4340                         <field name="note" reporter:datatype="text" />
4341                 </fields>
4342                 <links>
4343                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4344                 </links>
4345         </class>
4346         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
4347                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
4348                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4349                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4350                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4351                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4352                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4353                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
4354                 </fields>
4355                 <links>
4356                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4357                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
4358                 </links>
4359         </class>
4360         <class id="ac" controller="open-ils.cstore" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
4361                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
4362                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
4363                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4364                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
4365                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4366                 </fields>
4367                 <links>
4368                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4369                 </links>
4370         </class>
4371         <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">
4372                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
4373                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4374                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4375                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4376                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4377                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4378                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
4379                 </fields>
4380                 <links>
4381                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4382                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
4383                 </links>
4384         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4385             <actions>
4386                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
4387                 <retrieve />
4388                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
4389                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
4390             </actions>
4391         </permacrud>
4392         </class>
4393         <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">
4394                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
4395                         <field name="field" reporter:datatype="link"/>
4396                         <field name="id" reporter:datatype="id" />
4397                         <field name="source" reporter:datatype="link"/>
4398                         <field name="value"  reporter:datatype="text"/>
4399                 </fields>
4400                 <links>
4401                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4402                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4403                 </links>
4404         </class>
4405         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
4406                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
4407                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4408                         <field name="btype" reporter:datatype="text"/>
4409                         <field name="id" reporter:datatype="id" />
4410                         <field name="name"  reporter:datatype="text"/>
4411                         <field name="owner" reporter:datatype="link"/>
4412                         <field name="pub" reporter:datatype="bool"/>
4413                         <field name="create_time" reporter:datatype="timestamp" />
4414                 </fields>
4415                 <links>
4416                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4417                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
4418                 </links>
4419         </class>
4420         <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">
4421                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
4422                         <field name="id" reporter:datatype="id" />
4423                         <field name="bucket" reporter:datatype="link"/>
4424                         <field name="note" reporter:datatype="text" />
4425                 </fields>
4426                 <links>
4427                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
4428                 </links>
4429         </class>
4430         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
4431                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4432                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4433                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4434                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4435                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
4436                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
4437                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4438                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
4439                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4440                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4441                 </fields>
4442                 <links>
4443                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4444                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4445                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4446                 </links>
4447         </class>
4448         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
4449                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
4450                         <field name="id" reporter:datatype="id" />
4451                         <field name="ind1" />
4452                         <field name="ind2" />
4453                         <field name="record" />
4454                         <field name="subfield" />
4455                         <field name="tag" />
4456                         <field name="value" />
4457                 </fields>
4458                 <links>
4459                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4460                 </links>
4461         </class>
4462         <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">
4463                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
4464                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
4465                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4466                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
4467                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4468                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
4469                 </fields>
4470                 <links>
4471                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4472                 </links>
4473         </class>
4474         <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">
4475                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
4476                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
4477                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
4478                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
4479                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
4480                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4481                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4482                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
4483                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
4484                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
4485                 </fields>
4486                 <links>
4487                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
4488                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
4489                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
4490                 </links>
4491         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4492             <actions>
4493                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
4494                 <retrieve/>
4495                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
4496                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
4497             </actions>
4498         </permacrud>
4499         </class>
4500         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
4501                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
4502                         <field name="create_date" reporter:datatype="timestamp"/>
4503                         <field name="creator" reporter:datatype="link"/>
4504                         <field name="edit_date" reporter:datatype="timestamp"/>
4505                         <field name="editor" reporter:datatype="link"/>
4506                         <field name="id" reporter:datatype="id" />
4507                         <field name="pub" reporter:datatype="bool"/>
4508                         <field name="record" reporter:datatype="link"/>
4509                         <field name="value"  reporter:datatype="text"/>
4510                 </fields>
4511                 <links>
4512                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4513                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4514                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4515                 </links>
4516         </class>
4517         <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">
4518                 <fields oils_persist:primary="usr" oils_persist:sequence="">
4519                         <field name="balance_owed" reporter:datatype="money" />
4520                         <field name="total_owed" reporter:datatype="money" />
4521                         <field name="total_paid" reporter:datatype="money" />
4522                         <field name="usr" reporter:datatype="link"/>
4523                 </fields>
4524                 <links>
4525                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4526                 </links>
4527         </class>
4528         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
4529                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4530                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
4531                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4532                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
4533                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4534                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
4535                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
4536                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4537                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4538                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4539                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4540                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4541                 </fields>
4542                 <links>
4543                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4544                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4545                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4546                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4547                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
4548                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4549                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4550                 </links>
4551         </class>
4552         <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">
4553                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
4554                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
4555                         <field name="quality" reporter:datatype="int" />
4556                         <field name="source" reporter:datatype="text"/>
4557                         <field name="transcendant" reporter:datatype="bool"/>
4558                 </fields>
4559                 <links/>
4560         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4561             <actions>
4562                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
4563                 <retrieve/>
4564                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
4565                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
4566             </actions>
4567         </permacrud>
4568         </class>
4569         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
4570                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4571                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4572                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4573                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4574                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4575                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4576                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
4577                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
4578                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4579                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4580                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4581                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4582                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4583                 </fields>
4584                 <links>
4585                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
4586                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
4587                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4588                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4589                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4590                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4591                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4592                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4593                 </links>
4594         </class>
4595         <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">
4596                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
4597                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
4598                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
4599                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
4600                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
4601                 </fields>
4602                 <links>
4603                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
4604                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4605                 </links>
4606         </class>
4607         <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">
4608                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
4609                         <field name="bucket" reporter:datatype="link"/>
4610                         <field name="id" reporter:datatype="id" />
4611                         <field name="target_user" reporter:datatype="link"/>
4612                         <field name="create_time" reporter:datatype="timestamp" />
4613                         <field name="pos" reporter:datatype="int" />
4614                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4615                 </fields>
4616                 <links>
4617                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
4618                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
4619             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
4620                 </links>
4621         </class>
4622         <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">
4623                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
4624                         <field name="id" reporter:datatype="id" />
4625                         <field name="item" reporter:datatype="link"/>
4626                         <field name="note" reporter:datatype="text" />
4627                 </fields>
4628                 <links>
4629                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
4630                 </links>
4631         </class>
4632         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
4633                 <fields oils_persist:primary="usr" oils_persist:sequence="">
4634                         <field name="balance_owed" reporter:datatype="money" />
4635                         <field name="total_owed" reporter:datatype="money" />
4636                         <field name="total_paid" reporter:datatype="money" />
4637                         <field name="usr" reporter:datatype="link"/>
4638                 </fields>
4639                 <links>
4640                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4641                 </links>
4642         </class>
4643         <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">
4644                 <fields oils_persist:primary="code" oils_persist:sequence="">
4645                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
4646                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4647                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
4648                 </fields>
4649                 <links/>
4650         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4651             <actions>
4652                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4653                 <retrieve/>
4654                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4655                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4656             </actions>
4657         </permacrud>
4658         </class>
4659         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
4660                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4661                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4662                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4663                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4664                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4665                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4666                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4667                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
4668                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4669                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4670                 </fields>
4671                 <links>
4672                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4673                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4674                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4675                 </links>
4676         </class>
4677         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
4678                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4679                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4680                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4681                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4682                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4683                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4684                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4685                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
4686                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4687                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4688                 </fields>
4689                 <links>
4690                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4691                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4692                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4693                 </links>
4694         </class>
4695         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
4696                 <fields oils_persist:primary="id" oils_persist:sequence="">
4697                         <field name="checkin_lib" reporter:datatype="link"/>
4698                         <field name="checkin_staff" reporter:datatype="link"/>
4699                         <field name="checkin_time" reporter:datatype="timestamp"/>
4700                         <field name="circ_lib"  reporter:datatype="org_unit"/>
4701                         <field name="circ_staff" reporter:datatype="link"/>
4702                         <field name="desk_renewal" reporter:datatype="bool"/>
4703                         <field name="due_date" reporter:datatype="timestamp"/>
4704                         <field name="duration" reporter:datatype="interval"/>
4705                         <field name="duration_rule" reporter:datatype="link"/>
4706                         <field name="fine_interval" reporter:datatype="interval"/>
4707                         <field name="id" reporter:datatype="id" />
4708                         <field name="max_fine" reporter:datatype="money" />
4709                         <field name="max_fine_rule" reporter:datatype="link"/>
4710                         <field name="opac_renewal" reporter:datatype="bool"/>
4711                         <field name="phone_renewal" reporter:datatype="bool"/>
4712                         <field name="recurring_fine" reporter:datatype="money" />
4713                         <field name="recurring_fine_rule" reporter:datatype="link"/>
4714                         <field name="renewal_remaining" reporter:datatype="int" />
4715             <field name="grace_period" reporter:datatype="interval" />
4716                         <field name="stop_fines" reporter:datatype="text"/>
4717                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
4718                         <field name="target_copy" reporter:datatype="link"/>
4719                         <field name="usr" reporter:datatype="link"/>
4720                         <field name="xact_finish" reporter:datatype="timestamp" />
4721                         <field name="xact_start" reporter:datatype="timestamp" />
4722                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
4723                 </fields>
4724                 <links>
4725                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
4726                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4727                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4728                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4729                 </links>
4730         </class>
4731         <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">
4732                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
4733                         <field name="field" reporter:datatype="link"/>
4734                         <field name="id" reporter:datatype="id" />
4735                         <field name="source" reporter:datatype="link"/>
4736                         <field name="value" reporter:datatype="text"/>
4737                 </fields>
4738                 <links>
4739                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4740                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4741                 </links>
4742         </class>
4743         <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">
4744                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
4745                         <field name="high" reporter:datatype="money" />
4746                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
4747                         <field name="low" reporter:datatype="money" />
4748                         <field name="name" reporter:datatype="text"/>
4749                         <field name="normal" reporter:datatype="money" />
4750                         <field name="recurrence_interval" reporter:datatype="interval"/>
4751             <field name="grace_period" reporter:datatype="interval" />
4752                 </fields>
4753                 <links/>
4754         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4755             <actions>
4756                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
4757                 <retrieve/>
4758                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
4759                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
4760             </actions>
4761         </permacrud>
4762         </class>
4763         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
4764                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4765                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4766                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4767                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4768                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
4769                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
4770                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4771                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4772                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4773                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
4774                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4775                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4776                 </fields>
4777                 <links>
4778                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4779                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4780                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4781                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4782                 </links>
4783         </class>
4784         <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">
4785                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4786                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4787                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4788                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4789                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4790                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4791                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4792                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4793                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4794                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4795                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4796                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4797                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4798                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4799                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4800                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4801                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4802                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4803                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4804                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4805                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4806                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4807                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
4808                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4809                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4810                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4811                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4812                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4813                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4814                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4815                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4816                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4817                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4818                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4819                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4820                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4821                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4822                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4823                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4824                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
4825                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4826                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
4827                 </fields>
4828                 <links>
4829                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4830                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4831                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4832                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4833                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4834                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4835                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4836                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4837                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4838                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4839                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4840                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4841                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4842                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4843                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
4844                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
4845                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
4846                 </links>
4847         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4848             <actions>
4849                 <create permission="CREATE_COPY">
4850                     <context link="call_number" field="owning_lib"/>
4851                 </create>
4852                 <retrieve/>
4853                 <update permission="UPDATE_COPY">
4854                     <context link="call_number" field="owning_lib"/>
4855                 </update>
4856                 <delete permission="DELETE_COPY">
4857                     <context link="call_number" field="owning_lib"/>
4858                 </delete>
4859             </actions>
4860         </permacrud>
4861         </class>
4862
4863         <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">
4864                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
4865                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
4866                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
4867                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4868                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4869                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4870                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4871                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4872                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
4873                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
4874                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
4875                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4876                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4877                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
4878                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
4879                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
4880                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
4881                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
4882                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4883                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
4884                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
4885                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
4886                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4887                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4888                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
4889                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
4890                 </fields>
4891                 <links>
4892                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4893                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4894                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4895                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4896                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4897                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4898                 </links>
4899                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4900                         <actions>
4901                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
4902                                 <retrieve />
4903                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
4904                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
4905                         </actions>
4906                 </permacrud>
4907         </class>
4908
4909         <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">
4910                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
4911                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
4912                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4913                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
4914                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
4915                 </fields>
4916                 <links/>
4917         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4918             <actions>
4919                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
4920                 <retrieve/>
4921                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
4922                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
4923             </actions>
4924         </permacrud>
4925         </class>
4926         <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">
4927                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
4928                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
4929                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4930                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
4931                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
4932                 </fields>
4933                 <links/>
4934         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4935             <actions>
4936                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
4937                 <retrieve/>
4938                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
4939                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
4940             </actions>
4941         </permacrud>
4942         </class>
4943         <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">
4944                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
4945                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
4946                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4947                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4948                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4949                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
4950                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
4951                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
4952                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
4953                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
4954                 </fields>
4955                 <links>
4956                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
4957                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
4958                 </links>
4959         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4960             <actions>
4961                 <create permission="CREATE_PERM" global_required="true"/>
4962                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
4963                 <update permission="UPDATE_PERM" global_required="true"/>
4964                 <delete permission="DELETE_PERM" global_required="true"/>
4965             </actions>
4966         </permacrud>
4967         </class>
4968         <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">
4969                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
4970                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
4971                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
4972                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
4973                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
4974                 </fields>
4975                 <links>
4976                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
4977                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
4978                 </links>
4979         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4980             <actions>
4981                 <create permission="ADMIN_SURVEY">
4982                     <context link="question" jump="survey" field="owner"/>
4983                 </create>
4984                 <retrieve/>
4985                 <update permission="ADMIN_SURVEY">
4986                     <context link="question" jump="survey" field="owner"/>
4987                 </update>
4988                 <delete permission="ADMIN_SURVEY">
4989                     <context link="question" jump="survey" field="owner"/>
4990                 </delete>
4991             </actions>
4992         </permacrud>
4993         </class>
4994         <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">
4995                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
4996                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4997                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
4998                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
4999                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
5000                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
5001                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
5002                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
5003                 </fields>
5004                 <links>
5005                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
5006                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
5007                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
5008                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5009                 </links>
5010         </class>
5011         <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">
5012                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5013                         <field name="balance_owed" reporter:datatype="money" />
5014                         <field name="total_owed" reporter:datatype="money" />
5015                         <field name="total_paid" reporter:datatype="money" />
5016                         <field name="usr" reporter:datatype="link"/>
5017                 </fields>
5018                 <links>
5019                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5020                 </links>
5021         </class>
5022         <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">
5023                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
5024                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
5025                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
5026                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
5027                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5028                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5029                 </fields>
5030                 <links>
5031                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5032                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5033                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5034                 </links>
5035         </class>
5036         <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">
5037                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
5038                         <field name="field" reporter:datatype="link"/>
5039                         <field name="id" reporter:datatype="id" />
5040                         <field name="source" reporter:datatype="link"/>
5041                         <field name="value" reporter:datatype="text"/>
5042                 </fields>
5043                 <links>
5044                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5045                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5046                 </links>
5047         </class>
5048         <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">
5049                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
5050                         <field name="field" reporter:datatype="link"/>
5051                         <field name="id" reporter:datatype="id" />
5052                         <field name="source" reporter:datatype="link"/>
5053                         <field name="value" reporter:datatype="text"/>
5054                 </fields>
5055                 <links>
5056                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5057                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5058                 </links>
5059         </class>
5060         <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">
5061                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
5062                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5063                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
5064                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
5065                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
5066                 </fields>
5067                 <links>
5068                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
5069                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5070                 </links>
5071         </class>
5072         <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">
5073                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
5074                         <field name="depth" reporter:datatype="int" />
5075                         <field name="grantable" reporter:datatype="bool"/>
5076                         <field name="grp" reporter:datatype="link"/>
5077                         <field name="id" reporter:datatype="id" />
5078                         <field name="perm" reporter:datatype="link"/>
5079                 </fields>
5080                 <links>
5081                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
5082                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5083                 </links>
5084         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5085             <actions>
5086                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
5087                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
5088                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
5089                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
5090             </actions>
5091         </permacrud>
5092         </class>
5093         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
5094                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
5095                         <field name="items" oils_persist:virtual="true" />
5096                         <field name="btype" reporter:datatype="text"/>
5097                         <field name="id" reporter:datatype="id" />
5098                         <field name="name" reporter:datatype="text"/>
5099                         <field name="owner" reporter:datatype="link"/>
5100                         <field name="pub" reporter:datatype="bool"/>
5101                         <field name="create_time" reporter:datatype="timestamp" />
5102                 </fields>
5103                 <links>
5104                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5105                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
5106                 </links>
5107         </class>
5108         <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">
5109                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
5110                         <field name="id" reporter:datatype="id" />
5111                         <field name="bucket" reporter:datatype="link"/>
5112                         <field name="note" reporter:datatype="text" />
5113                 </fields>
5114                 <links>
5115                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
5116                 </links>
5117         </class>
5118         <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">
5119                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
5120                         <field name="id" reporter:datatype="int" />
5121                         <field name="usr" reporter:datatype="link"/>
5122                         <field name="work_ou" reporter:datatype="link"/>
5123                 </fields>
5124                 <links>
5125                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5126                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
5127                 </links>
5128         </class>
5129         <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">
5130                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
5131                         <field name="depth" reporter:datatype="int"/>
5132                         <field name="grantable" reporter:datatype="bool"/>
5133                         <field name="id" reporter:datatype="id" />
5134                         <field name="perm" reporter:datatype="link"/>
5135                         <field name="usr" reporter:datatype="link"/>
5136                 </fields>
5137                 <links>
5138                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5139                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5140                 </links>
5141         </class>
5142         <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">
5143                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
5144                         <field name="object_id" reporter:datatype="text"/>
5145                         <field name="grantable" reporter:datatype="bool"/>
5146                         <field name="id" reporter:datatype="id" />
5147                         <field name="perm" reporter:datatype="link"/>
5148                         <field name="usr" reporter:datatype="link"/>
5149                         <field name="object_type" reporter:datatype="text"/>
5150                 </fields>
5151                 <links>
5152                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5153                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5154                 </links>
5155         </class>
5156         <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">
5157                 <fields oils_persist:primary="id" oils_persist:sequence="">
5158                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5159                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5160                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5161                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5162                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5163                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5164                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5165                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5166                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5167                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5168                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5169                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5170                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5171                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5172                 </fields>
5173                 <links>
5174                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5175                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5176                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5177                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5178                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5179                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5180                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5181                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5182                 </links>
5183         </class>
5184         <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">
5185                 <fields oils_persist:primary="id" oils_persist:sequence="">
5186                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5187                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5188                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5189                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5190                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5191                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5192                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5193                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5194                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5195                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5196                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5197                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5198                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5199                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5200                 </fields>
5201                 <links>
5202                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5203                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5204                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5205                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5206                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5207                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5208                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5209                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5210                 </links>
5211         </class>
5212         <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">
5213                 <fields oils_persist:primary="id" oils_persist:sequence="">
5214                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5215                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5216                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5217                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5218                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5219                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5220                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5221                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5222                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5223                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5224                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5225                 </fields>
5226                 <links>
5227                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5228                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5229                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5230                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5231                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5232                 </links>
5233         </class>
5234         <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">
5235                 <fields oils_persist:primary="id" oils_persist:sequence="">
5236                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5237                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5238                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5239                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5240                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5241                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5242                         <field reporter:label="Accepting User" name="accepting_usr" />
5243                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
5244                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5245                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5246                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5247                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5248                 </fields>
5249                 <links>
5250                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5251                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5252                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5253                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5254                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5255                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5256                 </links>
5257         </class>
5258         <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">
5259                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
5260                         <field name="bucket" reporter:datatype="link"/>
5261                         <field name="id" reporter:datatype="id" />
5262                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
5263                         <field name="create_time" reporter:datatype="timestamp" />
5264                         <field name="pos" reporter:datatype="int" />
5265                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5266                 </fields>
5267                 <links>
5268                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
5269                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
5270             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
5271                 </links>
5272         </class>
5273         <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">
5274                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
5275                         <field name="id" reporter:datatype="id" />
5276                         <field name="item" reporter:datatype="link"/>
5277                         <field name="note" reporter:datatype="text" />
5278                 </fields>
5279                 <links>
5280                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
5281                 </links>
5282         </class>
5283         <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">
5284                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
5285                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
5286                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5287                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5288                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
5289                 </fields>
5290                 <links>
5291                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5292                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5293                 </links>
5294         </class>
5295
5296         <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">
5297                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
5298                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
5299                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5300                 </fields>
5301                 <links/>
5302         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5303             <actions>
5304                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5305                 <retrieve/>
5306                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5307                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5308             </actions>
5309         </permacrud>
5310         </class>
5311
5312
5313         <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">
5314                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
5315                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
5316                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
5317                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
5318                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
5319                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
5320                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
5321                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
5322                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
5323                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
5324                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
5325                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
5326                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
5327                 </fields>
5328                 <links>
5329                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
5330                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
5331                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
5332                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
5333                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
5334                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
5335                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
5336                 </links>
5337         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5338             <actions>
5339                 <create permission="TRANSIT_COPY">
5340                     <context link="target_copy" field="owner"/>
5341                 </create>
5342                 <retrieve/>
5343                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
5344                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
5345             </actions>
5346         </permacrud>
5347         </class>
5348         <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">
5349                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
5350                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
5351                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
5352                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
5353                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
5354                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
5355                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
5356                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
5357                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
5358                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
5359                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
5360                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
5361                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
5362                 </fields>
5363                 <links>
5364                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
5365                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5366                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
5367                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
5368                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
5369                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
5370                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5371                 </links>
5372         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5373             <actions>
5374                 <create permission="TRANSIT_COPY" context_field="owner">
5375                     <context link="target_copy" field="circ_lib"/>
5376                 </create>
5377                 <retrieve/>
5378                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
5379                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
5380             </actions>
5381         </permacrud>
5382         </class>
5383         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
5384                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
5385                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5386                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
5387                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
5388                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
5389                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5390                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
5391                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5392                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
5393                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5394                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
5395                 </fields>
5396                 <links>
5397                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5398                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
5399                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
5400                 </links>
5401         </class>
5402         <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">
5403                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
5404                         <field name="grp" />
5405                         <field name="id" reporter:datatype="id" />
5406                         <field name="usr" />
5407                 </fields>
5408                 <links>
5409                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
5410                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5411                 </links>
5412         </class>
5413         <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">
5414                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
5415                         <field name="id" reporter:datatype="id" />
5416                         <field name="fq_field" reporter:datatype="text"/>
5417                         <field name="identity_value" reporter:datatype="text"/>
5418                         <field name="translation" reporter:datatype="text"/>
5419                         <field name="string" reporter:datatype="text"/>
5420                 </fields>
5421                 <links>
5422                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
5423                 </links>
5424         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5425             <actions>
5426                 <create permission="CREATE_TRANSLATION" global_required="true"/>
5427                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
5428                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
5429                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
5430             </actions>
5431         </permacrud>
5432         </class>
5433         <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">
5434                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
5435                         <field name="id" reporter:datatype="id" />
5436                         <field name="fm_class" reporter:datatype="text"/>
5437                         <field name="field" reporter:datatype="text"/>
5438                         <field name="owner" reporter:datatype="org_unit"/>
5439                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
5440                 </fields>
5441                 <links>
5442                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5443                 </links>
5444         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5445             <actions>
5446                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5447                 <retrieve/>
5448                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5449                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5450             </actions>
5451         </permacrud>
5452         </class>
5453         <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">
5454                 <fields oils_persist:primary="code">
5455                         <field name="code" reporter:datatype="id" />
5456                         <field name="marc_code" reporter:datatype="text"/>
5457                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5458                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5459                 </fields>
5460                 <links/>
5461         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5462             <actions>
5463                 <create permission="CREATE_LOCALE" global_required="true"/>
5464                 <retrieve/>
5465                 <update permission="UPDATE_LOCALE" global_required="true"/>
5466                 <delete permission="DELETE_LOCALE" global_required="true"/>
5467             </actions>
5468         </permacrud>
5469         </class>
5470         <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">
5471                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
5472                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
5473                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
5474                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
5475             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
5476                 </fields>
5477                 <links>
5478                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5479                 </links>
5480         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5481             <actions>
5482                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
5483                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
5484                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
5485                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
5486             </actions>
5487         </permacrud>
5488         </class>
5489
5490         <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">
5491                 <fields oils_persist:primary="id">
5492                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
5493                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5494                 </fields>
5495                 <links/>
5496         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5497             <actions>
5498                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5499                 <retrieve/>
5500                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5501                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5502             </actions>
5503         </permacrud>
5504         </class>
5505
5506         <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">
5507                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
5508                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
5509                         <field reporter:label="User" name="usr" reporter:datatype="link" />
5510                         <field reporter:label="Request Type" name="request_type" reporter:datatype="link" />
5511                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
5512                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
5513                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
5514                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
5515                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
5516                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
5517                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
5518                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
5519                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
5520                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
5521                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
5522                         <field reporter:label="Title" name="title" reporter:datatype="text" />
5523                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
5524                         <field reporter:label="Author" name="author" reporter:datatype="text" />
5525                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
5526                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
5527                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
5528                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
5529                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
5530                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
5531                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
5532                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5533                 </fields>
5534                 <links>
5535                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5536                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5537                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5538                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
5539                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
5540                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5541                 </links>
5542         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5543             <actions>
5544                 <create permission="user_request.create">
5545                     <context link="usr" field="home_ou"/>
5546                                 </create>
5547                 <retrieve permission="user_request.view">
5548                     <context link="usr" field="home_ou"/>
5549                                 </retrieve>
5550                 <update permission="user_request.update">
5551                     <context link="usr" field="home_ou"/>
5552                                 </update>
5553                 <delete permission="user_request.delete">
5554                     <context link="usr" field="home_ou"/>
5555                                 </delete>
5556             </actions>
5557         </permacrud>
5558         </class>
5559
5560         <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">
5561                 <fields oils_persist:primary="code">
5562                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
5563                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5564                 </fields>
5565                 <links/>
5566         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5567             <actions>
5568                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5569                 <retrieve/>
5570                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5571                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5572             </actions>
5573         </permacrud>
5574         </class>
5575
5576         <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">
5577                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
5578                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
5579                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
5580                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
5581                         <field reporter:label="Ratio" name="ratio" />
5582                 </fields>
5583                 <links>
5584                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
5585                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
5586                 </links>
5587                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5588                         <actions>
5589                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5590                                 <retrieve/>
5591                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5592                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5593                         </actions>
5594                 </permacrud>
5595         </class>
5596
5597         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
5598                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
5599                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
5600                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
5601                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
5602                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
5603                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5604                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
5605                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
5606                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
5607                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
5608                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
5609                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
5610                         <field reporter:label="URL" name="url" reporter:datatype="text" />
5611                         <field reporter:label="Email" name="email" reporter:datatype="text" />
5612                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
5613                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
5614                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
5615                 </fields>
5616                 <links>
5617                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
5618                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5619             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
5620             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
5621             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
5622                 </links>
5623         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5624             <actions>
5625                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
5626                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
5627                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
5628                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
5629             </actions>
5630         </permacrud>
5631         </class>
5632
5633         <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">
5634                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
5635                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
5636                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5637                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5638                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5639                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5640                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5641                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
5642                 </fields>
5643                 <links>
5644                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5645                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5646                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5647                 </links>
5648         </class>
5649
5650         <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">
5651                 <fields oils_persist:primary="code">
5652                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
5653                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5654                 </fields>
5655                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5656             <actions>
5657                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5658                 <retrieve/>
5659                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5660                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5661             </actions>
5662                 </permacrud>
5663         </class>
5664
5665         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
5666                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
5667                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
5668                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
5669                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5670                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
5671                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
5672                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
5673                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
5674                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
5675                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
5676                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
5677                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5678                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
5679                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
5680                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
5681                 </fields>
5682                 <links>
5683                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
5684                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5685                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
5686                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
5687                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
5688                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
5689                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
5690                 </links>
5691         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5692             <actions>
5693                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
5694                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
5695                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
5696                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
5697             </actions>
5698         </permacrud>
5699         </class>
5700
5701         <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">
5702                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
5703                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5704                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
5705                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
5706                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
5707                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
5708                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
5709                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5710                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
5711                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
5712                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
5713                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
5714                 </fields>
5715                 <links>
5716                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
5717                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5718                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5719                 </links>
5720         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5721             <actions>
5722                 <create   permission="ADMIN_INVOICE">
5723                                         <context link="invoice" field="receiver"/>
5724                                 </create>
5725                 <retrieve permission="ADMIN_INVOICE">
5726                                         <context link="invoice" field="receiver"/>
5727                                 </retrieve>
5728                 <update   permission="ADMIN_INVOICE">
5729                                         <context link="invoice" field="receiver"/>
5730                                 </update>
5731                                 <delete   permission="ADMIN_INVOICE">
5732                                         <context link="invoice" field="receiver"/>
5733                                 </delete>
5734             </actions>
5735         </permacrud>
5736         </class>
5737
5738         <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">
5739                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
5740                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5741                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
5742                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
5743                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
5744                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
5745                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
5746                         <field reporter:label="Author" name="author" reporter:datatype="text" />
5747                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5748                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
5749                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
5750                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
5751                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
5752                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
5753                         <field reporter:label="Target" name="target" reporter:datatype="int" />
5754                 </fields>
5755                 <links>
5756                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
5757                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5758                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
5759                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
5760                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5761                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
5762                 </links>
5763         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5764             <actions>
5765                 <create   permission="ADMIN_INVOICE">
5766                                         <context link="invoice" field="receiver"/>
5767                                 </create>
5768                 <retrieve permission="ADMIN_INVOICE">
5769                                         <context link="invoice" field="receiver"/>
5770                                 </retrieve>
5771                 <update   permission="ADMIN_INVOICE">
5772                                         <context link="invoice" field="receiver"/>
5773                                 </update>
5774                                 <delete   permission="ADMIN_INVOICE">
5775                                         <context link="invoice" field="receiver"/>
5776                                 </delete>
5777             </actions>
5778         </permacrud>
5779         </class>
5780
5781         <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">
5782                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
5783                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
5784                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
5785                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
5786                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
5787                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5788                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5789                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
5790                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
5791                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
5792                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
5793                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
5794                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
5795                 </fields>
5796                 <links>
5797                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5798                 </links>
5799         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5800             <actions>
5801                 <create permission="ADMIN_PROVIDER">
5802                     <context link="provider" field="owner"/>
5803                 </create>
5804                 <retrieve permission="ADMIN_PROVIDER">
5805                     <context link="provider" field="owner"/>
5806                 </retrieve>
5807                 <update permission="ADMIN_PROVIDER">
5808                     <context link="provider" field="owner"/>
5809                 </update>
5810                 <delete permission="ADMIN_PROVIDER">
5811                     <context link="provider" field="owner"/>
5812                 </delete>
5813             </actions>
5814         </permacrud>
5815         </class>
5816
5817         <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">
5818                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
5819                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5820                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5821                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5822                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
5823                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
5824                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
5825         </fields>
5826                 <links>
5827                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5828                 </links>
5829         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5830             <actions>
5831                 <create permission="ADMIN_PROVIDER">
5832                     <context link="provider" field="owner"/>
5833                 </create>
5834                 <retrieve permission="ADMIN_PROVIDER">
5835                     <context link="provider" field="owner"/>
5836                 </retrieve>
5837                 <update permission="ADMIN_PROVIDER">
5838                     <context link="provider" field="owner"/>
5839                 </update>
5840                 <delete permission="ADMIN_PROVIDER">
5841                     <context link="provider" field="owner"/>
5842                 </delete>
5843             </actions>
5844         </permacrud>
5845     </class>
5846         <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">
5847                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
5848                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
5849                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
5850                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
5851                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
5852                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
5853                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
5854                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
5855                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
5856                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
5857                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
5858                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
5859                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
5860                 </fields>
5861                 <links>
5862                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
5863                 </links>
5864         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5865             <actions>
5866                 <create permission="ADMIN_PROVIDER">
5867                     <context link="contact" jump='provider' field="owner"/>
5868                 </create>
5869                 <retrieve permission="ADMIN_PROVIDER">
5870                     <context link="contact" jump='provider' field="owner"/>
5871                 </retrieve>
5872                 <update permission="ADMIN_PROVIDER">
5873                     <context link="contact" jump='provider' field="owner"/>
5874                 </update>
5875                 <delete permission="ADMIN_PROVIDER">
5876                     <context link="contact" jump='provider' field="owner"/>
5877                 </delete>
5878             </actions>
5879         </permacrud>
5880         </class>
5881
5882         <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">
5883                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
5884                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
5885                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
5886                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
5887                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
5888                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
5889                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
5890                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
5891                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5892                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
5893                 </fields>
5894                 <links>
5895                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
5896                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
5897                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
5898                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
5899                 </links>
5900                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5901                 </permacrud>
5902         </class>
5903
5904         <class id="acqfc" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
5905                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
5906                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
5907                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
5908                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
5909                 </fields>
5910                 <links>
5911             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
5912                 </links>
5913                 <!--
5914                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
5915                         But here's what it should look like if we ever do use pcrud.
5916                 -->
5917                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5918                         <actions>
5919                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5920                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5921                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5922                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5923                         </actions>
5924                 </permacrud>
5925         </class>
5926
5927         <class id="acqfy" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
5928                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
5929                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
5930                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
5931                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
5932                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
5933                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
5934                 </fields>
5935                 <links>
5936                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
5937                 </links>
5938                 <!--
5939                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
5940                         But here's what it should look like if we ever do use pcrud.
5941                 -->
5942                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5943                         <actions>
5944                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5945                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5946                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5947                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5948                         </actions>
5949                 </permacrud>
5950         </class>
5951
5952         <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">
5953                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
5954                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
5955                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
5956                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
5957                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
5958                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5959                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
5960                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
5961                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
5962                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5963                 </fields>
5964                 <links>
5965                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
5966                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5967             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
5968             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
5969                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
5970                 </links>
5971         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5972             <actions>
5973                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
5974                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
5975                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
5976                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
5977             </actions>
5978         </permacrud>
5979         </class>
5980
5981         <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">
5982                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
5983                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
5984                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
5985                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5986                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5987                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
5988                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
5989                 </fields>
5990                 <links>
5991                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5992                 </links>
5993                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5994                         <actions>
5995                                 <create permission="ADMIN_FUNDING_SOURCE">
5996                     <context link="funding_source" field="owner"/>
5997                 </create>
5998                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
5999                     <context link="funding_source" field="owner"/>
6000                 </retrieve>
6001                                 <update permission="ADMIN_FUNDING_SOURCE">
6002                     <context link="funding_source" field="owner"/>
6003                 </update>
6004                                 <delete permission="ADMIN_FUNDING_SOURCE">
6005                     <context link="funding_source" field="owner"/>
6006                 </delete>
6007                         </actions>
6008                 </permacrud>
6009         </class>
6010
6011         <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">
6012                 <fields oils_persist:primary="id">
6013                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
6014                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
6015                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
6016                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
6017                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
6018                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6019                 </fields>
6020                 <links>
6021                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6022                 </links>
6023                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6024                 </permacrud>
6025         </class>
6026
6027         <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">
6028                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
6029                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
6030                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6031                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
6032                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
6033                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6034                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
6035                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
6036                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6037                 </fields>
6038                 <links>
6039                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6040                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6041                 </links>
6042                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6043                         <actions>
6044                                 <create permission="ADMIN_ACQ_FUND">
6045                     <context link="fund" field="org"/>
6046                 </create>
6047                                 <retrieve permission="ADMIN_ACQ_FUND">
6048                     <context link="fund" field="org"/>
6049                 </retrieve>
6050                                 <update permission="ADMIN_ACQ_FUND">
6051                     <context link="fund" field="org"/>
6052                 </update>
6053                                 <delete permission="ADMIN_ACQ_FUND">
6054                     <context link="fund" field="org"/>
6055                 </delete>
6056                         </actions>
6057                 </permacrud>
6058         </class>
6059
6060         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
6061                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
6062                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6063                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
6064                         <field reporter:label="Name" name="name" reporter:datatype="text" />
6065                         <field reporter:label="Year" name="year" reporter:datatype="int" />
6066                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
6067                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6068                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
6069                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
6070                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6071                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
6072                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
6073                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
6074                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
6075                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
6076                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
6077                 </fields>
6078                 <links>
6079                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
6080                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6081             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
6082             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
6083             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
6084                 </links>
6085         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6086             <actions>
6087                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
6088                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
6089                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
6090                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
6091             </actions>
6092         </permacrud>
6093         </class>
6094
6095         <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">
6096                 <fields oils_persist:primary="fund">
6097                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6098                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6099                 </fields>
6100                 <links>
6101                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6102                 </links>
6103         </class>
6104
6105         <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">
6106                 <fields oils_persist:primary="fund">
6107                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6108                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
6109                 </fields>
6110                 <links>
6111                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6112                 </links>
6113         </class>
6114
6115         <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">
6116                 <fields oils_persist:primary="fund">
6117                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6118                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
6119                 </fields>
6120                 <links>
6121                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6122                 </links>
6123         </class>
6124
6125         <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">
6126                 <fields oils_persist:primary="fund">
6127                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6128                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6129                 </fields>
6130                 <links>
6131                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6132                 </links>
6133         </class>
6134
6135         <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">
6136                 <fields oils_persist:primary="fund">
6137                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6138                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
6139                 </fields>
6140                 <links>
6141                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6142                 </links>
6143         </class>
6144
6145    <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">
6146         <fields oils_persist:primary="fund">
6147             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6148             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6149         </fields>
6150         <links>
6151             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6152         </links>
6153     </class>
6154
6155    <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">
6156         <fields oils_persist:primary="fund">
6157             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6158             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
6159         </fields>
6160         <links>
6161             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6162         </links>
6163     </class>
6164
6165    <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">
6166         <fields oils_persist:primary="fund">
6167             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6168             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6169         </fields>
6170         <links>
6171             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6172         </links>
6173     </class>
6174
6175    <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">
6176         <fields oils_persist:primary="fund">
6177             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6178             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
6179         </fields>
6180         <links>
6181             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6182         </links>
6183     </class>
6184
6185    <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">
6186         <fields oils_persist:primary="fund">
6187             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6188             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
6189         </fields>
6190         <links>
6191             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6192         </links>
6193     </class>
6194
6195         <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">
6196                 <fields oils_persist:primary="funding_source">
6197                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6198                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
6199                 </fields>
6200                 <links>
6201                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6202                 </links>
6203         </class>
6204
6205         <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">
6206                 <fields oils_persist:primary="funding_source">
6207                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6208                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
6209                 </fields>
6210                 <links>
6211                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6212                 </links>
6213         </class>
6214
6215         <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">
6216                 <fields oils_persist:primary="funding_source">
6217                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6218                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
6219                 </fields>
6220                 <links>
6221                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6222                 </links>
6223         </class>
6224
6225         <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">
6226                 <fields oils_persist:primary="fund">
6227                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6228                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
6229                 </fields>
6230                 <links>
6231                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6232                 </links>
6233         </class>
6234
6235         <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">
6236                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
6237                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
6238                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6239                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6240                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6241                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
6242                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6243                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6244                 </fields>
6245                 <links>
6246                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
6247                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6248                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6249                 </links>
6250                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6251                         <actions>
6252                                 <create permission="ADMIN_ACQ_FUND">
6253                     <context link="fund" field="org"/>
6254                 </create>
6255                                 <retrieve permission="ADMIN_ACQ_FUND">
6256                     <context link="fund" field="org"/>
6257                 </retrieve>
6258                                 <update permission="ADMIN_ACQ_FUND">
6259                     <context link="fund" field="org"/>
6260                 </update>
6261                                 <delete permission="ADMIN_ACQ_FUND">
6262                     <context link="fund" field="org"/>
6263                 </delete>
6264                         </actions>
6265                 </permacrud>
6266         </class>
6267
6268     <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">
6269         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
6270             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
6271             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6272             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
6273             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
6274             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
6275             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
6276             <field reporter:label="Note" name="note" reporter:datatype="text" />
6277             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6278         </fields>
6279         <links>
6280             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
6281             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
6282             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6283         </links>
6284                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6285                         <actions>
6286                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6287                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6288                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6289                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6290                         </actions>
6291                 </permacrud>
6292     </class>
6293
6294         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
6295                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
6296                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
6297                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
6298                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
6299                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6300                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6301                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6302                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
6303                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
6304                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6305                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6306                 </fields>
6307                 <links>
6308                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6309                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6310                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6311                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6312                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
6313                 </links>
6314                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6315                         <actions>
6316                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
6317                         </actions>
6318                 </permacrud>
6319         </class>
6320
6321         <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">
6322                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
6323                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6324                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
6325                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6326                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6327                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
6328                 </fields>
6329                 <links>
6330                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6331                 </links>
6332                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6333                         <actions>
6334                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6335                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
6336                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6337                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6338                         </actions>
6339                 </permacrud>
6340         </class>
6341
6342         <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">
6343                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
6344                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
6345                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
6346                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6347                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6348                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6349                         <field reporter:label="State" name="state" reporter:datatype="text" />
6350                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
6351                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6352                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6353                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
6354                         <field reporter:label="Name" name="name" reporter:datatype="text" />
6355                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6356                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6357                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
6358                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6359                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
6360                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
6361                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
6362                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
6363                 </fields>
6364                 <links>
6365                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6366                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6367                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6368                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
6369                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6370                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
6371                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
6372                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
6373                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
6374                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6375                 </links>
6376                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6377                         <actions>
6378                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6379                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
6380                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6381                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6382                         </actions>
6383                 </permacrud>
6384         </class>
6385
6386         <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">
6387                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
6388                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
6389                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
6390                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
6391                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
6392                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
6393                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6394                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6395                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
6396                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
6397                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
6398                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6399                         <field reporter:label="State" name="state" reporter:datatype="text"/>
6400                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
6401                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6402                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
6403                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6404                 </fields>
6405                 <links>
6406                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
6407                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6408                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6409                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6410                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
6411                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6412                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6413                 </links>
6414                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6415             <actions>
6416                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
6417             </actions>
6418                 </permacrud>
6419         </class>
6420
6421         <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">
6422                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
6423                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
6424                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
6425                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6426                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6427                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6428                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6429                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
6430                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
6431                 </fields>
6432                 <links>
6433                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6434                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6435                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6436                 </links>
6437                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6438             <actions>
6439                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6440                     <context link="purchase_order" field="ordering_agency"/>
6441                 </retrieve>
6442                 <create permission="CREATE_PURCHASE_ORDER">
6443                     <context link="purchase_order" field="ordering_agency"/>
6444                 </create>
6445                 <update permission="CREATE_PURCHASE_ORDER">
6446                     <context link="purchase_order" field="ordering_agency"/>
6447                 </update>
6448                 <delete permission="CREATE_PURCHASE_ORDER">
6449                     <context link="purchase_order" field="ordering_agency"/>
6450                 </delete>
6451             </actions>
6452                 </permacrud>
6453         </class>
6454
6455         <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">
6456                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
6457                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6458                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6459                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6460                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
6461                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6462                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
6463                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6464                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
6465                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
6466                         <field reporter:label="Target" name="target" reporter:datatype="int" />
6467                 </fields>
6468                 <links>
6469                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6470                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6471                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
6472                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6473                 </links>
6474                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6475             <actions>
6476                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6477                     <context link="purchase_order" field="ordering_agency"/>
6478                 </retrieve>
6479                 <create permission="CREATE_PURCHASE_ORDER">
6480                     <context link="purchase_order" field="ordering_agency"/>
6481                 </create>
6482                 <update permission="CREATE_PURCHASE_ORDER">
6483                     <context link="purchase_order" field="ordering_agency"/>
6484                 </update>
6485                 <delete permission="CREATE_PURCHASE_ORDER">
6486                     <context link="purchase_order" field="ordering_agency"/>
6487                 </delete>
6488             </actions>
6489                 </permacrud>
6490         </class>
6491
6492         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
6493                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
6494                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
6495                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
6496                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
6497                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
6498                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6499                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6500                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6501                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
6502                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
6503                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
6504                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
6505                         <field reporter:label="State" name="state" reporter:datatype="text" />
6506                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6507                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6508                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
6509                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6510                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
6511                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
6512                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
6513                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
6514                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
6515                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
6516                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
6517                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
6518                 </fields>
6519                 <links>
6520                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
6521                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6522                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6523                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6524                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6525                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
6526                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
6527                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
6528                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
6529                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
6530                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6531                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
6532                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
6533                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
6534                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
6535                 </links>
6536                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6537                         <actions>
6538                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
6539                                         <context link="purchase_order" field="ordering_agency"/>
6540                                         <context link="picklist" field="org_unit"/>
6541                                 </retrieve>
6542                         </actions>
6543                 </permacrud>
6544         </class>
6545
6546         <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">
6547                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
6548                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
6549                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
6550                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
6551                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
6552                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6553                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6554                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
6555                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6556                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6557                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
6558                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
6559                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
6560                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
6561                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
6562                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
6563                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
6564                         <field reporter:label="State" name="state" reporter:datatype="text"/>
6565                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
6566                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
6567                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
6568                 </fields>
6569                 <links>
6570                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
6571                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6572                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6573                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
6574                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6575                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6576                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
6577                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
6578                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6579                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
6580                 </links>
6581                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6582                         <actions>
6583                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6584                                         <context link="purchase_order" field="ordering_agency"/>
6585                                         <context link="picklist" field="org_unit"/>
6586                                 </retrieve>
6587                         </actions>
6588                 </permacrud>
6589         </class>
6590
6591         <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">
6592                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
6593                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
6594                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
6595                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6596                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
6597                 </fields>
6598                 <links>
6599                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6600                 </links>
6601                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6602                         <actions>
6603                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6604                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
6605                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6606                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6607                         </actions>
6608                 </permacrud>
6609         </class>
6610
6611         <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">
6612                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
6613                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
6614                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
6615                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6616                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6617                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6618                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6619                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
6620                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
6621                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
6622                 </fields>
6623                 <links>
6624                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6625                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6626                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6627                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
6628                 </links>
6629         </class>
6630
6631         <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">
6632                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
6633                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
6634                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
6635                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
6636                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
6637                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
6638                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
6639                 </fields>
6640                 <links>
6641                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6642                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
6643                 </links>
6644         </class>
6645
6646         <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">
6647                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
6648                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
6649                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6650                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
6651                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
6652                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
6653                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
6654                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6655                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
6656                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
6657                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
6658                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
6659                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6660                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
6661                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6662                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
6663                 </fields>
6664                 <links>
6665                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6666                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
6667                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6668                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6669                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6670                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6671                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6672                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6673                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
6674                 </links>
6675         </class>
6676
6677         <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">
6678                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6679                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6680                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6681                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6682                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6683                 </fields>
6684                 <links/>
6685                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6686                         <actions>
6687                                 <retrieve />
6688                         </actions>
6689                 </permacrud>
6690         </class>
6691
6692         <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">
6693                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6694                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6695                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6696                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6697                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
6698                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6699             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
6700                 </fields>
6701                 <links/>
6702         <permacrud>
6703             <actions>
6704                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
6705                 <retrieve />
6706                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
6707                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
6708             </actions>
6709         </permacrud>
6710         </class>
6711
6712         <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">
6713                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6714                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6715                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6716                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6717                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
6718                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6719                 </fields>
6720                 <links/>
6721         </class>
6722         <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">
6723                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6724                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6725                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6726                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6727                         <field reporter:label="User" name="usr" reporter:datatype="link" />
6728                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6729                 </fields>
6730                 <links>
6731                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6732                 </links>
6733         </class>
6734
6735         <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">
6736             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6737                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6738                 <field reporter:label="Code" name="code" reporter:datatype="text" />
6739                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6740                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
6741                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6742                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6743         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
6744
6745             </fields>
6746             <links>
6747                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6748             </links>
6749             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6750                 <actions>
6751                     <create permission="ADMIN_PROVIDER">
6752                         <context link="provider" field="owner"/>
6753                     </create>
6754                     <retrieve permission="ADMIN_PROVIDER">
6755                         <context link="provider" field="owner"/>
6756                     </retrieve>
6757                     <update permission="ADMIN_PROVIDER">
6758                         <context link="provider" field="owner"/>
6759                     </update>
6760                     <delete permission="ADMIN_PROVIDER">
6761                         <context link="provider" field="owner"/>
6762                     </delete>
6763                 </actions>
6764             </permacrud>
6765         </class>
6766         
6767         <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">
6768             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
6769                 <field reporter:label="ID" name="id" reporter:datatype="id" />
6770                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6771                 <field reporter:label="Name" name="name" reporter:datatype="text" />
6772                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
6773             </fields>
6774             <links>
6775                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6776             </links>
6777             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6778                 <actions>
6779                     <create permission="ADMIN_PROVIDER">
6780                         <context link="provider" field="owner"/>
6781                     </create>
6782                     <retrieve permission="ADMIN_PROVIDER">
6783                         <context link="provider" field="owner"/>
6784                     </retrieve>
6785                     <update permission="ADMIN_PROVIDER">
6786                         <context link="provider" field="owner"/>
6787                     </update>
6788                     <delete permission="ADMIN_PROVIDER">
6789                         <context link="provider" field="owner"/>
6790                     </delete>
6791                 </actions>
6792             </permacrud>
6793         </class>
6794         
6795         <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">
6796             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6797                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6798                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6799                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6800                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6801                 </fields>
6802                 <links/>
6803         </class>
6804
6805         <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">
6806                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
6807                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
6808                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
6809                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
6810                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
6811                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
6812                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
6813                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
6814                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
6815                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
6816                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
6817                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
6818                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
6819                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
6820                 </fields>
6821                 <links>
6822                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6823                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6824                 </links>
6825         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6826             <actions>
6827                 <create permission="ADMIN_PROVIDER">
6828                     <context link="provider" field="owner"/>
6829                 </create>
6830                 <retrieve permission="ADMIN_PROVIDER">
6831                     <context link="provider" field="owner"/>
6832                 </retrieve>
6833                 <update permission="ADMIN_PROVIDER">
6834                     <context link="provider" field="owner"/>
6835                 </update>
6836                 <delete permission="ADMIN_PROVIDER">
6837                     <context link="provider" field="owner"/>
6838                 </delete>
6839             </actions>
6840         </permacrud>
6841         </class>
6842
6843         <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">
6844                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
6845                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
6846                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
6847                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
6848                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
6849                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
6850                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
6851                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
6852                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
6853                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
6854                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
6855                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
6856                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
6857                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
6858                 </fields>
6859                 <links>
6860                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
6861                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6862                 </links>
6863         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6864             <actions>
6865                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
6866                     <context link="account" jump="provider" field="owner"/>
6867                 </retrieve>
6868                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
6869                     <context link="account" jump="provider" field="owner"/>
6870                 </update>
6871                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
6872                     <context link="account" jump="provider" field="owner"/>
6873                 </delete>
6874             </actions>
6875         </permacrud>
6876         </class>
6877
6878
6879         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
6880                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
6881                         <field name="id" reporter:datatype="id" />
6882                         <field name="parent" reporter:datatype="link"/>
6883                         <field name="owner" reporter:datatype="link"/>
6884                         <field name="create_time" reporter:datatype="timestamp"/>
6885                         <field name="name" reporter:datatype="text"/>
6886                         <field name="shared" reporter:datatype="bool"/>
6887                         <field name="share_with" reporter:datatype="link"/>
6888                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6889                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
6890                 </fields>
6891                 <links>
6892                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6893                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
6894                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
6895                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
6896                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
6897                 </links>
6898         </class>
6899         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
6900                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
6901                         <field name="id" reporter:datatype="id" />
6902                         <field name="parent" reporter:datatype="link"/>
6903                         <field name="owner" reporter:datatype="link"/>
6904                         <field name="create_time" reporter:datatype="timestamp"/>
6905                         <field name="name" reporter:datatype="text"/>
6906                         <field name="shared" reporter:datatype="bool"/>
6907                         <field name="share_with" reporter:datatype="link"/>
6908                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6909                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
6910                 </fields>
6911                 <links>
6912                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6913                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
6914                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
6915                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
6916                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
6917                 </links>
6918         </class>
6919         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
6920                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
6921                         <field name="id" reporter:datatype="id" />
6922                         <field name="parent" reporter:datatype="link"/>
6923                         <field name="owner" reporter:datatype="link"/>
6924                         <field name="create_time" reporter:datatype="timestamp"/>
6925                         <field name="name" reporter:datatype="text"/>
6926                         <field name="shared" reporter:datatype="bool"/>
6927                         <field name="share_with" reporter:datatype="link"/>
6928                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6929                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
6930                 </fields>
6931                 <links>
6932                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6933                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
6934                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
6935                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
6936                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
6937                 </links>
6938         </class>
6939         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
6940                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
6941                         <field name="id" reporter:datatype="id" />
6942                         <field name="owner" reporter:datatype="link"/>
6943                         <field name="create_time" reporter:datatype="timestamp"/>
6944                         <field name="name" reporter:datatype="text"/>
6945                         <field name="data" reporter:datatype="text"/>
6946                         <field name="folder" reporter:datatype="link"/>
6947                         <field name="description" reporter:datatype="text"/>
6948                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
6949                 </fields>
6950                 <links>
6951                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6952                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
6953                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
6954                 </links>
6955         </class>
6956         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
6957                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
6958                         <field name="id" reporter:datatype="id" />
6959                         <field name="owner" reporter:datatype="link"/>
6960                         <field name="create_time" reporter:datatype="timestamp"/>
6961                         <field name="template" reporter:datatype="link"/>
6962                         <field name="data" reporter:datatype="text"/>
6963                         <field name="folder" reporter:datatype="link"/>
6964                         <field name="recur" reporter:datatype="bool"/>
6965                         <field name="recurrence" reporter:datatype="interval"/>
6966                         <field name="name" reporter:datatype="text"/>
6967                         <field name="description" reporter:datatype="text"/>
6968                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
6969                 </fields>
6970                 <links>
6971                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6972                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
6973                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
6974                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
6975                 </links>
6976         </class>
6977         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
6978                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
6979                         <field name="id" reporter:datatype="id" />
6980                         <field name="runner" reporter:datatype="link"/>
6981                         <field name="start_time" reporter:datatype="timestamp"/>
6982                         <field name="complete_time" reporter:datatype="timestamp"/>
6983                         <field name="run_time" reporter:datatype="timestamp"/>
6984                         <field name="email" reporter:datatype="text"/>
6985                         <field name="excel_format" reporter:datatype="bool"/>
6986                         <field name="csv_format" reporter:datatype="bool"/>
6987                         <field name="html_format" reporter:datatype="bool"/>
6988                         <field name="error_code" reporter:datatype="int"/>
6989                         <field name="error_text" reporter:datatype="text"/>
6990                         <field name="report" reporter:datatype="link"/>
6991                         <field name="folder" reporter:datatype="link"/>
6992                         <field name="chart_pie" reporter:datatype="bool"/>
6993                         <field name="chart_bar" reporter:datatype="bool"/>
6994                         <field name="chart_line" reporter:datatype="bool"/>
6995                 </fields>
6996                 <links>
6997                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
6998                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
6999                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
7000                 </links>
7001         </class>
7002         <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">
7003                 <fields oils_persist:primary="id">
7004                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7005                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7006                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7007                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7008                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7009                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7010                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7011                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7012                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7013                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7014                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7015                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7016                 </fields>
7017                 <links>
7018                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7019                 </links>
7020         </class>
7021         <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">
7022                 <fields oils_persist:primary="id">
7023                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7024                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7025                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7026                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7027                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7028                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7029                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7030                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7031                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7032                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7033                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7034                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7035                 </fields>
7036                 <links>
7037                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7038                 </links>
7039         </class>
7040         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
7041                 <fields oils_persist:primary="id">
7042                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7043                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
7044                         <field reporter:label="Fingerprint" name="fingerprint" />
7045                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7046                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7047                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7048                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7049                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
7050                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7051                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7052                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7053                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
7054                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
7055                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
7056                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7057                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7058                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
7059                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
7060                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
7061                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
7062                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
7063                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
7064                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7065                 </fields>
7066                 <links>
7067                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
7068                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7069                 </links>
7070         </class>
7071         <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">
7072                 <fields oils_persist:primary="id">
7073                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
7074                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
7075                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
7076                 </fields>
7077                 <links>
7078                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
7079                 </links>
7080         </class>
7081         <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">
7082                 <fields oils_persist:primary="id">
7083                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
7084                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
7085                 </fields>
7086                 <links>
7087                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
7088                 </links>
7089         </class>
7090         <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">
7091                 <fields oils_persist:primary="id">
7092                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
7093                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
7094                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
7095                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
7096                 </fields>
7097                 <links>
7098                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
7099                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
7100                 </links>
7101         </class>
7102         <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">
7103                 <fields oils_persist:primary="xact">
7104                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7105                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
7106                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
7107                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
7108                 </fields>
7109                 <links>
7110                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7111                 </links>
7112         </class>
7113         <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">
7114                 <fields oils_persist:primary="xact">
7115                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7116                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
7117                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
7118                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
7119                 </fields>
7120                 <links>
7121                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7122                 </links>
7123         </class>
7124         <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)">
7125                 <fields oils_persist:primary="id">
7126                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
7127                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
7128                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
7129                 </fields>
7130                 <links>
7131                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
7132                 </links>
7133         </class>
7134         <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">
7135                 <fields oils_persist:primary="id">
7136                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
7137                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
7138                 </fields>
7139                 <links>
7140                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
7141                 </links>
7142         </class>
7143         <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">
7144                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
7145                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
7146                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
7147                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
7148                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
7149                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
7150                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
7151                 </fields>
7152                 <links>
7153                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7154                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
7155                 </links>
7156                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7157                         <actions>
7158                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7159                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7160                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7161                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7162                         </actions>
7163                 </permacrud>
7164         </class>
7165         <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">
7166                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
7167                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
7168                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
7169                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
7170                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
7171                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7172                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
7173                 </fields>
7174                 <links>
7175                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
7176                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7177                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7178                 </links>
7179                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7180                         <actions>
7181                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
7182                                         <context link="formula" field="owner"/>
7183                                 </create>
7184                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
7185                                         <context link="formula" field="owner"/>
7186                                 </retrieve>
7187                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
7188                                         <context link="formula" field="owner"/>
7189                                 </update>
7190                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
7191                                         <context link="formula" field="owner"/>
7192                                 </delete>
7193                         </actions>
7194                 </permacrud>
7195         </class>
7196
7197         <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">
7198                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
7199                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7200                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7201                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7202                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
7203                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
7204                 </fields>
7205                 <links>
7206                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7207                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
7208                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7209                 </links>
7210                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7211                         <actions>
7212                                 <create permission="CREATE_PURCHASE_ORDER">
7213                                         <context link="formula" field="owner"/>
7214                 </create>
7215                                 <retrieve permission="CREATE_PURCHASE_ORDER">
7216                                         <context link="formula" field="owner"/>
7217                 </retrieve>
7218                                 <update permission="CREATE_PURCHASE_ORDER">
7219                                         <context link="formula" field="owner"/>
7220                 </update>
7221                                 <delete permission="CREATE_PURCHASE_ORDER">
7222                                         <context link="formula" field="owner"/>
7223                 </delete>
7224                         </actions>
7225                 </permacrud>
7226         </class>
7227
7228         <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">
7229                 <fields oils_persist:primary="id">
7230                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
7231                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7232                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
7233                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
7234                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
7235                 </fields>
7236                 <links>
7237                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7238                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7239                 </links>
7240                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7241                 </permacrud>
7242         </class>
7243
7244         <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">
7245                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
7246                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
7247                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7248                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7249                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7250                 </fields>
7251                 <links>
7252                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7253                 </links>
7254                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7255                         <actions>
7256                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7257                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
7258                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7259                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7260                         </actions>
7261                 </permacrud>
7262         </class>
7263
7264         <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">
7265                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
7266                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
7267                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7268                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7269                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7270                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
7271                 </fields>
7272                 <links>
7273                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7274                 </links>
7275                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7276                         <actions>
7277                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7278                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
7279                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7280                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7281                         </actions>
7282                 </permacrud>
7283         </class>
7284
7285         <class id="acqcl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
7286                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
7287                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
7288                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
7289                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
7290                 </fields>
7291                 <links>
7292                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
7293                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
7294                 </links>
7295                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7296                 </permacrud>
7297         </class>
7298
7299         <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">
7300                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
7301                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
7302                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
7303                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
7304                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
7305                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7306                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7307                 </fields>
7308                 <links>
7309                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
7310                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
7311                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7312                 </links>
7313                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7314                 </permacrud>
7315         </class>
7316
7317         <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">
7318                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
7319                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
7320                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
7321                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
7322                 </fields>
7323                 <links>
7324                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
7325                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
7326                 </links>
7327                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7328                 </permacrud>
7329         </class>
7330
7331         <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">
7332                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
7333                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
7334                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
7335                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
7336                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
7337                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7338                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7339                 </fields>
7340                 <links>
7341                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
7342                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
7343                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7344                 </links>
7345                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7346                 </permacrud>
7347         </class>
7348
7349         <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">
7350                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
7351                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
7352                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7353                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
7354                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7355                 </fields>
7356                 <links>
7357                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7358                 </links>
7359                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7360             <actions>
7361                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7362                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
7363                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7364                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7365             </actions>
7366                 </permacrud>
7367         </class>
7368
7369         <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">
7370                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
7371                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
7372                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
7373                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
7374                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
7375                 </fields>
7376                 <links>
7377                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7378                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
7379                 </links>
7380                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7381                         <actions>
7382                                 <create permission="ADMIN_CLAIM_POLICY">
7383                                         <context link="claim_policy" field="org_unit"/>
7384                 </create>
7385                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
7386                                         <context link="claim_policy" field="org_unit"/>
7387                 </retrieve>
7388                                 <update permission="ADMIN_CLAIM_POLICY">
7389                                         <context link="claim_policy" field="org_unit"/>
7390                 </update>
7391                                 <delete permission="ADMIN_CLAIM_POLICY">
7392                                         <context link="claim_policy" field="org_unit"/>
7393                 </delete>
7394                         </actions>
7395                 </permacrud>
7396         </class>
7397
7398     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
7399         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
7400             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7401             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7402             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7403             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
7404             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
7405             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
7406             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
7407             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
7408             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
7409             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
7410             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
7411             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
7412             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
7413             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
7414             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7415         </fields>
7416     </class>
7417
7418     <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">
7419         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
7420             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7421             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7422             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7423             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7424             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7425         </fields>
7426     </class>
7427
7428     <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">
7429         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
7430             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7431             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7432             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7433             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
7434             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
7435             <field reporter:label="City" name="city" reporter:datatype="text"/>
7436             <field reporter:label="State" name="state" reporter:datatype="text"/>
7437             <field reporter:label="Country" name="country" reporter:datatype="text"/>
7438             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7439             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7440         </fields>
7441     </class>
7442
7443     <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">
7444         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
7445             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7446             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7447             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7448             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
7449             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
7450             <field reporter:label="City" name="city" reporter:datatype="text"/>
7451             <field reporter:label="State" name="state" reporter:datatype="text"/>
7452             <field reporter:label="Country" name="country" reporter:datatype="text"/>
7453             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7454             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7455         </fields>
7456     </class>
7457
7458     <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">
7459         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
7460             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7461             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7462             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7463             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
7464             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
7465             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7466         </fields>
7467     </class>
7468
7469         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
7470                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
7471                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
7472                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7473                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
7474                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
7475                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
7476                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
7477                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
7478                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
7479                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
7480                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
7481                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
7482                 </fields>
7483                 <links>
7484                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7485                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7486                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7487                 </links>
7488                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7489                 </permacrud>
7490         </class>
7491
7492         <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">
7493                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
7494                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
7495                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
7496                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
7497                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
7498                 </fields>
7499                 <links>
7500                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
7501                 </links>
7502                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7503                 </permacrud>
7504         </class>
7505
7506     <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">
7507         <fields>
7508             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7509             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7510             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7511         </fields>
7512                 <links>
7513                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7514                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7515                 </links>
7516     </class>
7517
7518     <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">
7519         <fields>
7520             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7521             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
7522         </fields>
7523                 <links>
7524                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7525                 </links>
7526     </class>
7527
7528     <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">
7529         <fields>
7530             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7531             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7532             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7533         </fields>
7534                 <links>
7535                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7536                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7537                 </links>
7538     </class>
7539
7540     <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">
7541         <fields>
7542             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7543             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
7544         </fields>
7545                 <links>
7546                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7547                 </links>
7548     </class>
7549
7550     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
7551                 <oils_persist:source_definition>
7552
7553             SELECT  DISTINCT l.*
7554               FROM  action.unfulfilled_hold_loops l
7555                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
7556               WHERE l.count = m.max
7557
7558                 </oils_persist:source_definition>
7559         <fields>
7560             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7561             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7562             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7563         </fields>
7564                 <links>
7565                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7566                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7567                 </links>
7568     </class>
7569
7570         <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">
7571                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
7572                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
7573                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
7574                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
7575                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
7576                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
7577                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
7578                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
7579                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
7580                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
7581                 </fields>
7582                 <links>
7583                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
7584                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
7585                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
7586                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
7587                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
7588                 </links>
7589                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7590                 </permacrud>
7591         </class>
7592
7593         <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">
7594                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
7595                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
7596                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
7597                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7598                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
7599                 </fields>
7600                 <links>
7601                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
7602                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
7603                 </links>
7604                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7605                 </permacrud>
7606         </class>
7607
7608         <class id="qdt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
7609                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
7610                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
7611                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
7612                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
7613                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
7614                 </fields>
7615                 <links>
7616                 </links>
7617                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7618                 </permacrud>
7619         </class>
7620
7621         <class id="qsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
7622                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
7623                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
7624                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
7625                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7626                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
7627                 </fields>
7628                 <links>
7629                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
7630                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
7631                 </links>
7632                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7633                 </permacrud>
7634         </class>
7635         
7636         <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">
7637                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
7638                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
7639                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
7640                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
7641                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
7642                 </fields>
7643                 <links>
7644                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
7645                 </links>
7646                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7647                 </permacrud>
7648         </class>
7649         
7650         <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">
7651                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
7652                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
7653                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
7654                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7655                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
7656                 </fields>
7657                 <links>
7658                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
7659                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
7660                 </links>
7661                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7662                 </permacrud>
7663         </class>
7664
7665         <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">
7666                 <fields oils_persist:primary="name">
7667                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
7668                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
7669                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
7670                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7671                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
7672                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
7673                 </fields>
7674                 <links>
7675                 </links>
7676                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7677                 </permacrud>
7678         </class>
7679
7680         <class id="qxp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
7681                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7682                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7683                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
7684                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7685                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7686                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7687                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
7688                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
7689                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7690                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7691                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
7692                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
7693                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
7694                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
7695                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
7696                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7697                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
7698                 </fields>
7699                 <links>
7700                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7701                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7702                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
7703                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
7704                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7705                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
7706                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
7707                 </links>
7708                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7709                 </permacrud>
7710         </class>
7711
7712         <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">
7713                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
7714                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
7715                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7716                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7717                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
7718                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
7719                 </fields>
7720                 <links>
7721                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7722                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
7723                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
7724                 </links>
7725                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7726                 </permacrud>
7727         </class>
7728
7729         <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">
7730                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
7731                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
7732                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
7733                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
7734                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
7735                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
7736                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
7737                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
7738                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
7739                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7740                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
7741                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
7742                 </fields>
7743                 <links>
7744                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7745                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
7746                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
7747                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
7748                 </links>
7749                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7750                 </permacrud>
7751         </class>
7752
7753         <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">
7754                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
7755                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
7756                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
7757                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7758                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7759                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
7760                 </fields>
7761                 <links>
7762                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
7763                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
7764                 </links>
7765                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7766                 </permacrud>
7767         </class>
7768
7769         <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">
7770                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
7771                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
7772                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
7773                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7774                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
7775                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
7776                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
7777                 </fields>
7778                 <links>
7779                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7780                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
7781                 </links>
7782                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7783                 </permacrud>
7784         </class>
7785
7786         <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">
7787                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
7788                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
7789                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
7790                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7791                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
7792                 </fields>
7793                 <links>
7794                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7795                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
7796                 </links>
7797                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7798                 </permacrud>
7799         </class>
7800
7801         <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">
7802                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7803                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7804                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7805                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7806                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7807                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7808                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7809                 </fields>
7810                 <links>
7811                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7812                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7813                 </links>
7814                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7815                 </permacrud>
7816         </class>
7817
7818         <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">
7819                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7820                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7821                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7822                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7823                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7824                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
7825                 </fields>
7826                 <links>
7827                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7828                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
7829                 </links>
7830                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7831                 </permacrud>
7832         </class>
7833
7834         <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">
7835                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7836                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7837                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7838                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7839                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7840                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
7841                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7842                 </fields>
7843                 <links>
7844                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7845                 </links>
7846                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7847                 </permacrud>
7848         </class>
7849
7850         <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">
7851                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7852                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7853                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7854                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7855                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7856                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7857                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7858                 </fields>
7859                 <links>
7860                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7861                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7862                 </links>
7863                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7864                 </permacrud>
7865         </class>
7866
7867         <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">
7868                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7869                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7870                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7871                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7872                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7873                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7874                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
7875                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7876                 </fields>
7877                 <links>
7878                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7879                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7880                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
7881                 </links>
7882                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7883                 </permacrud>
7884         </class>
7885
7886         <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">
7887                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7888                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7889                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7890                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7891                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7892                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
7893                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7894                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7895                 </fields>
7896                 <links>
7897                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7898                 </links>
7899                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7900                 </permacrud>
7901         </class>
7902
7903         <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">
7904                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7905                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7906                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7907                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7908                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7909                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
7910                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7911                 </fields>
7912                 <links>
7913                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7914                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7915                 </links>
7916                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7917                 </permacrud>
7918         </class>
7919
7920         <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">
7921                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7922                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7923                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7924                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7925                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7926                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7927                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
7928                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7929                 </fields>
7930                 <links>
7931                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7932                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
7933                 </links>
7934                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7935                 </permacrud>
7936         </class>
7937
7938         <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">
7939                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7940                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7941                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7942                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7943                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7944                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7945                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
7946                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7947                 </fields>
7948                 <links>
7949                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7950                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7951                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7952                 </links>
7953                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7954                 </permacrud>
7955         </class>
7956
7957         <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">
7958                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7959                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7960                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7961                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7962                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7963                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7964                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7965                 </fields>
7966                 <links>
7967                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7968                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7969                 </links>
7970                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7971                 </permacrud>
7972         </class>
7973
7974         <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">
7975                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7976                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7977                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7978                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7979                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7980                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7981                 </fields>
7982                 <links>
7983                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7984                 </links>
7985                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7986                 </permacrud>
7987         </class>
7988
7989         <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">
7990                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7991                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7992                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7993                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7994                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7995                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
7996                 </fields>
7997                 <links>
7998                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7999                 </links>
8000                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8001                 </permacrud>
8002         </class>
8003
8004         <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">
8005                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8006                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8007                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8008                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8009                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8010                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8011                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8012                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8013                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8014                 </fields>
8015                 <links>
8016                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8017                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8018                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8019                 </links>
8020                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8021                 </permacrud>
8022         </class>
8023
8024         <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">
8025                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8026                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8027                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8028                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8029                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8030                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8031                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8032                 </fields>
8033                 <links>
8034                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8035                 </links>
8036                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8037                 </permacrud>
8038         </class>
8039
8040         <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">
8041                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8042                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8043                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8044                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8045                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8046                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8047                 </fields>
8048                 <links>
8049                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8050                 </links>
8051                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8052                 </permacrud>
8053         </class>
8054
8055         <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">
8056                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8057                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8058                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8059                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8060                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8061                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8062                 </fields>
8063                 <links>
8064                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8065                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8066                 </links>
8067                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8068                 </permacrud>
8069         </class>
8070
8071         <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">
8072                 <fields oils_persist:primary="id">
8073                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
8074                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
8075                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
8076                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
8077                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
8078                 </fields>
8079                 <links>
8080                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
8081                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8082                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
8083                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
8084                 </links>
8085         </class>
8086
8087         <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">
8088                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
8089                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8090                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
8091                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
8092                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
8093                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8094                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8095                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
8096                 </fields>
8097                 <links/>
8098                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8099                         <actions>
8100                                 <retrieve/>
8101                         </actions>
8102                 </permacrud>
8103         </class>
8104
8105         <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">
8106                 <fields oils_persist:primary="ptype_key">
8107                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
8108                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8109                 </fields>
8110                 <links/>
8111                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8112                         <actions>
8113                                 <retrieve/>
8114                         </actions>
8115                 </permacrud>
8116         </class>
8117
8118         <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">
8119                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
8120                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8121                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
8122                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
8123                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8124                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8125                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8126                 </fields>
8127                 <links>
8128                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
8129                 </links>
8130                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8131                         <actions>
8132                                 <retrieve/>
8133                         </actions>
8134                 </permacrud>
8135         </class>
8136
8137         <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">
8138                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
8139                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8140                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
8141                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
8142                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8143                 </fields>
8144                 <links>
8145                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8146                 </links>
8147                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8148                         <actions>
8149                                 <retrieve/>
8150                         </actions>
8151                 </permacrud>
8152         </class>
8153
8154         <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">
8155                 <fields oils_persist:primary="code">
8156                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
8157                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
8158                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
8159                 </fields>
8160                 <links/>
8161                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8162                         <actions>
8163                                 <retrieve/>
8164                         </actions>
8165                 </permacrud>
8166         </class>
8167
8168         <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">
8169                 <oils_persist:source_definition>
8170
8171             SELECT  b.id,
8172                     MAX(dcp.edit_date) AS last_delete_date
8173              FROM   biblio.record_entry b
8174                     JOIN asset.call_number cn ON (cn.record = b.id)
8175                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
8176              WHERE  NOT b.deleted
8177              GROUP BY b.id
8178              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
8179
8180                 </oils_persist:source_definition>
8181                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8182                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8183                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
8184                 </fields>
8185                 <links>
8186                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8187                 </links>
8188                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8189                         <actions>
8190                                 <retrieve/>
8191                         </actions>
8192                 </permacrud>
8193         </class>
8194
8195         <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">
8196                 <oils_persist:source_definition>
8197
8198             -- -- 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.
8199             -- -- 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
8200             -- -- may not.
8201             -- SELECT
8202             --     bre.id AS "bib_id",
8203             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
8204             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
8205             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
8206             -- FROM (
8207                 SELECT
8208                     y.bre AS "id",
8209                     COALESCE( x.copy_count, 0 ) AS "copy_count",
8210                     y.hold_count AS "hold_count",
8211                     (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"
8212                 FROM (
8213                         SELECT
8214                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
8215                             COUNT(*) AS "hold_count"
8216                         FROM action.hold_request h
8217                         WHERE
8218                             cancel_time IS NULL
8219                             AND fulfillment_time IS NULL
8220                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
8221                         GROUP BY 1
8222                     )y LEFT JOIN (
8223                         SELECT 
8224                             (SELECT id
8225                                 FROM biblio.record_entry 
8226                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
8227                             ) AS "bre", 
8228                             COUNT(*) AS "copy_count"
8229                         FROM asset.copy
8230                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
8231                         WHERE copy.holdable 
8232                             AND NOT copy.deleted 
8233                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
8234                         GROUP BY 1
8235                     )x ON x.bre = y.bre
8236                 -- )z RIGHT JOIN (
8237                 --     SELECT id
8238                 --     FROM biblio.record_entry
8239                 --     WHERE NOT deleted
8240                 -- )bre ON (z.bib_id = bre.id)
8241                 
8242
8243                 </oils_persist:source_definition>
8244                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8245                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8246                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
8247                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
8248                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
8249                 </fields>
8250                 <links>
8251                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8252                 </links>
8253                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8254                         <actions>
8255                                 <retrieve/>
8256                         </actions>
8257                 </permacrud>
8258         </class>
8259
8260         <!-- ********************************************************************************************************************* -->
8261         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
8262         <!-- ********************************************************************************************************************* -->
8263         <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">
8264                 <fields oils_persist:primary="id">
8265                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
8266                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
8267                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
8268                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
8269                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
8270                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
8271                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
8272                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
8273                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
8274                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
8275                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
8276                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
8277                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
8278                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
8279                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
8280                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
8281                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
8282                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
8283                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
8284                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
8285                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
8286                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
8287                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
8288                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
8289                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
8290                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
8291                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
8292                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
8293                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
8294                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
8295                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
8296                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
8297                 </fields>
8298                 <links>
8299                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8300                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
8301                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
8302                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
8303                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
8304                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
8305                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
8306                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
8307                 </links>
8308         </class>
8309
8310         <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">
8311                 <fields oils_persist:primary="id">
8312                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
8313                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8314                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
8315                 </fields>
8316                 <links>
8317                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8318                 </links>
8319         </class>
8320
8321         <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">
8322                 <fields oils_persist:primary="id">
8323                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
8324                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8325                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
8326                 </fields>
8327                 <links>
8328                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8329                 </links>
8330         </class>
8331
8332         <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">
8333                 <fields oils_persist:primary="id">
8334                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
8335
8336                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
8337                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
8338                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
8339
8340                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
8341                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
8342                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
8343
8344                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
8345                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
8346
8347                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
8348                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
8349                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
8350
8351                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
8352                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
8353
8354                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
8355                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
8356                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
8357
8358                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
8359                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
8360                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
8361
8362                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
8363                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
8364                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
8365                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
8366
8367                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
8368                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
8369
8370                 </fields>
8371                 <links>
8372                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
8373                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8374                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
8375                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
8376                 </links>
8377         </class>
8378
8379         <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">
8380                 <oils_persist:source_definition>
8381
8382             SELECT
8383                 po.ordering_agency AS ordering_agency,
8384                 po.id AS purchase_order,
8385                 li.id AS lineitem,
8386                 lid.id AS lineitem_detail,
8387                 cpa.id AS claim_policy_action
8388             FROM
8389                 acq.lineitem_detail lid
8390                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
8391                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
8392                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
8393                 JOIN acq.claim_policy_action cpa ON (
8394                     cpa.claim_policy = cp.id
8395
8396                     -- we only care about claim policy actions whose claim
8397                     -- interval we'd reached or exceeded
8398                     AND (NOW() - cpa.action_interval) &gt; po.order_date
8399
8400                     -- filter out all claim policy actions where claim events
8401                     -- have occurred on or after the action's action_interval
8402                     AND NOT EXISTS (
8403                         SELECT 1
8404                         FROM
8405                             acq.claim_event evt
8406                             JOIN acq.claim claim ON (
8407                                 claim.id = evt.claim
8408                                 AND claim.lineitem_detail = lid.id
8409                             )
8410                         WHERE
8411                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
8412                     )
8413                 )
8414             WHERE
8415                 lid.cancel_reason IS NULL
8416                 AND li.cancel_reason IS NULL -- belt/suspenders
8417                 AND po.cancel_reason IS NULL -- belt/suspenders
8418                 AND lid.recv_time IS NULL
8419                 AND po.state = 'on-order'
8420             ORDER BY 1, 2, 3, 4, 5
8421
8422                 </oils_persist:source_definition>
8423                 <fields>
8424                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8425                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8426                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8427                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8428                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
8429                 </fields>
8430                 <links>
8431                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8432                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8433                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8434                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8435                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
8436                 </links>
8437         </class>
8438
8439         <class id="acqlisum" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary" oils_persist:readonly="true" reporter:label="Lineitem Summary">
8440                 <oils_persist:source_definition>
8441
8442             SELECT 
8443                 li.id AS lineitem, 
8444                 (
8445                     SELECT COUNT(lid.id) 
8446                     FROM acq.lineitem_detail lid
8447                     WHERE lineitem = li.id
8448                 ) AS item_count,
8449                 (
8450                     SELECT COUNT(lid.id) 
8451                     FROM acq.lineitem_detail lid
8452                     WHERE recv_time IS NOT NULL AND lineitem = li.id
8453                 ) AS recv_count,
8454                 (
8455                     SELECT COUNT(lid.id) 
8456                     FROM acq.lineitem_detail lid
8457                     WHERE cancel_reason IS NOT NULL AND lineitem = li.id
8458                 ) AS cancel_count,
8459                 (
8460                     SELECT COUNT(lid.id) 
8461                     FROM acq.lineitem_detail lid
8462                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8463                     WHERE NOT debit.encumbrance AND lineitem = li.id
8464                 ) AS invoice_count,
8465                 (
8466                     SELECT COUNT(DISTINCT(lid.id)) 
8467                     FROM acq.lineitem_detail lid
8468                         JOIN acq.claim claim ON (claim.lineitem_detail = lid.id)
8469                     WHERE lineitem = li.id
8470                 ) AS claim_count,
8471                 (
8472                     SELECT (COUNT(lid.id) * li.estimated_unit_price)::NUMERIC(8,2)
8473                     FROM acq.lineitem_detail lid
8474                     WHERE lid.cancel_reason IS NULL AND lineitem = li.id
8475                 ) AS estimated_amount,
8476                 (
8477                     SELECT SUM(debit.amount)::NUMERIC(8,2)
8478                     FROM acq.lineitem_detail lid
8479                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8480                     WHERE debit.encumbrance AND lineitem = li.id
8481                 ) AS encumbrance_amount,
8482                 (
8483                     SELECT SUM(debit.amount)::NUMERIC(8,2)
8484                     FROM acq.lineitem_detail lid
8485                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8486                     WHERE NOT debit.encumbrance AND lineitem = li.id
8487                 ) AS paid_amount
8488
8489                 FROM acq.lineitem AS li
8490         </oils_persist:source_definition>
8491                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
8492                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8493                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
8494                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
8495                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
8496                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
8497                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
8498                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
8499                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
8500                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
8501                 </fields>
8502                 <links>
8503                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8504                 </links>
8505     </class>
8506
8507
8508         <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">
8509                 <oils_persist:source_definition>
8510
8511                         SELECT  t.*
8512                           FROM  action.transit_copy t
8513                                 JOIN actor.org_unit AS s ON (t.source = s.id)
8514                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
8515                           WHERE s.parent_ou &lt;&gt; d.parent_ou
8516
8517                 </oils_persist:source_definition>
8518                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8519                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
8520                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
8521                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8522                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
8523                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
8524                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
8525                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
8526                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8527                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8528                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8529                 </fields>
8530                 <links>
8531                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
8532                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8533                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8534                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8535                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8536                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
8537                 </links>
8538         </class>
8539
8540     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
8541                 <oils_persist:source_definition>
8542
8543         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
8544                 SELECT
8545                         cp.id as copy,
8546                         COUNT(circ.id),
8547                         EXTRACT(YEAR FROM circ.xact_start) AS year,
8548                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
8549                 FROM
8550                         asset.copy cp
8551                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
8552                 GROUP BY 1, 3, 4
8553                 UNION
8554                 SELECT
8555                         cp.id as copy,
8556                         COUNT(circ.id),
8557                         EXTRACT(YEAR FROM circ.xact_start) AS year,
8558                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
8559                 FROM
8560                         asset.copy cp
8561                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
8562                 GROUP BY 1, 3, 4
8563                 UNION
8564                 SELECT
8565                         id as copy,
8566                         circ_count,
8567                         -1 AS year,
8568                         false as is_renewal
8569                 FROM
8570                         extend_reporter.legacy_circ_count
8571         )x GROUP BY 1, 3, 4
8572
8573                 </oils_persist:source_definition>
8574         <fields>
8575             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
8576             <field reporter:label="Count" name="count" reporter:datatype="int"/>
8577             <field reporter:label="Year" name="year" reporter:datatype="int"/>
8578             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
8579         </fields>
8580                 <links>
8581                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
8582                 </links>
8583                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8584                         <actions>
8585                                 <retrieve/>
8586                         </actions>
8587                 </permacrud>
8588     </class>
8589
8590         <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">
8591                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
8592                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
8593                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
8594                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
8595                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
8596                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
8597                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
8598                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
8599                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
8600                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
8601                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
8602                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
8603                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
8604                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
8605                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
8606                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
8607                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
8608                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
8609                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
8610                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
8611                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
8612                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
8613                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
8614                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
8615                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
8616                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
8617                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
8618                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
8619                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
8620                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
8621                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
8622                 </fields>
8623                 <links>
8624                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
8625                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
8626                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
8627                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8628                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
8629                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8630                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8631                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
8632                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
8633                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
8634                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
8635                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
8636                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
8637                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
8638                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
8639                 </links>
8640         </class>
8641
8642     <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">
8643         <fields oils_persist:primary="id">
8644             <field reporter:label="Title" name="title" reporter:datatype="text"/>
8645             <field reporter:label="Author" name="author" reporter:datatype="text"/>
8646             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
8647             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
8648             <field reporter:label="Price" name="price" reporter:datatype="money"/>
8649             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
8650             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
8651             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
8652             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
8653             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
8654             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
8655             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
8656             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
8657             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
8658             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
8659             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
8660             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
8661             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8662             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
8663             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
8664             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
8665             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
8666             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8667             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
8668             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
8669             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
8670             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
8671             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
8672             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
8673             <field reporter:label="Status" name="status" reporter:datatype="link"/>
8674             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
8675             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
8676             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
8677             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
8678         </fields>
8679         <links>
8680             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8681             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8682             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8683             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
8684             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
8685         </links>
8686     </class>
8687
8688     <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">
8689         <fields oils_persist:primary="id">
8690             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
8691             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8692             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
8693             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
8694         </fields>
8695         <links>
8696             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8697             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8698         </links>
8699     </class>
8700
8701     <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">
8702         <fields oils_persist:primary="owning_lib">
8703             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8704             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
8705             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
8706         </fields>
8707         <links>
8708             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8709         </links>
8710     </class>
8711
8712     <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">
8713         <fields oils_persist:primary="id">
8714             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
8715             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
8716             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8717             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
8718             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
8719         </fields>
8720         <links>
8721             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8722             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8723             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8724         </links>
8725     </class>
8726
8727     <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">
8728         <fields oils_persist:primary="circ_lib">
8729             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
8730             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8731             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
8732             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
8733         </fields>
8734         <links>
8735             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8736             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8737         </links>
8738     </class>
8739
8740     <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">
8741         <fields oils_persist:primary="id">
8742             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
8743             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
8744             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8745             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
8746             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
8747         </fields>
8748         <links>
8749             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8750             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8751             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
8752         </links>
8753     </class>
8754
8755     <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">
8756         <fields oils_persist:primary="home_ou">
8757             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
8758             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8759             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
8760             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
8761         </fields>
8762         <links>
8763             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8764             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
8765         </links>
8766     </class>
8767         <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">
8768                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
8769                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
8770                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
8771                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
8772                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
8773                 </fields>
8774                 <links>
8775                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8776                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
8777                 </links>
8778                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8779                         <actions>
8780                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
8781                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
8782                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
8783                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
8784                         </actions>
8785                 </permacrud>
8786         </class>
8787         <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">
8788                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
8789                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
8790                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
8791                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
8792                 </fields>
8793                 <links>
8794                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8795                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
8796                         </links>
8797                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8798                 <actions>
8799                                 <create permission="ADMIN_ACQ_FUND_TAG">
8800                                         <context link="tag" field="owner"/>
8801                                 </create>
8802                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8803                                         <context link="tag" field="owner"/>
8804                                 </retrieve>
8805                                 <update permission="ADMIN_ACQ_FUND_TAG">
8806                                         <context link="tag" field="owner"/>
8807                                 </update>
8808                                 <delete permission="ADMIN_ACQ_FUND_TAG">
8809                                         <context link="tag" field="owner"/>
8810                                 </delete>
8811                         </actions>
8812                 </permacrud>
8813         </class>
8814
8815         <!-- ********************************************************************************************************************* -->
8816
8817 </IDL>
8818
8819 <!--
8820     vim:noet:ts=4:sw=4:
8821 -->