]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
Hold targeting didn't work right on type I (issuance) holds, but now it does
[working/Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 -->
23
24 <IDL xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:idl="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
25
26         <!-- Virtual classes -->
27         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
28                 <fields>
29                         <field name="usr" oils_persist:virtual="true" />
30                         <field name="forgive_payment" oils_persist:virtual="true" />
31                         <field name="work_payment" oils_persist:virtual="true" />
32                         <field name="credit_payment" oils_persist:virtual="true" />
33                         <field name="goods_payment" oils_persist:virtual="true" />
34                 </fields>
35                 <links>
36                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
37                 </links>
38         </class>
39
40         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
41                 <fields>
42                         <field name="workstation" oils_persist:virtual="true" />
43                         <field name="cash_payment" oils_persist:virtual="true" />
44                         <field name="check_payment" oils_persist:virtual="true" />
45                         <field name="credit_card_payment" oils_persist:virtual="true" />
46                 </fields>
47                 <links>
48                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
49                 </links>
50         </class>
51
52         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
53                 <fields>
54                         <field name="id" oils_persist:virtual="true" />
55                         <field name="children" oils_persist:virtual="true" />
56                         <field name="owner_doc" oils_persist:virtual="true" />
57                         <field name="intra_doc_id" oils_persist:virtual="true" />
58                         <field name="parent_node" oils_persist:virtual="true" />
59                         <field name="node_type" oils_persist:virtual="true" />
60                         <field name="namespace_uri" oils_persist:virtual="true" />
61                         <field name="name" oils_persist:virtual="true" />
62                         <field name="value" oils_persist:virtual="true" />
63                 </fields>
64         </class>
65
66         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
67                 <fields>
68                         <field name="title" oils_persist:virtual="true" />
69                         <field name="author" oils_persist:virtual="true" />
70                         <field name="doc_id" oils_persist:virtual="true" />
71                         <field name="doc_type" oils_persist:virtual="true" />
72                         <field name="pubdate" oils_persist:virtual="true" />
73                         <field name="isbn" oils_persist:virtual="true" />
74                         <field name="publisher" oils_persist:virtual="true" />
75                         <field name="tcn" oils_persist:virtual="true" />
76                         <field name="subject" oils_persist:virtual="true" />
77                         <field name="types_of_resource" oils_persist:virtual="true" />
78                         <field name="call_numbers" oils_persist:virtual="true" />
79                         <field name="edition" oils_persist:virtual="true" />
80                         <field name="online_loc" oils_persist:virtual="true" />
81                         <field name="synopsis" oils_persist:virtual="true" />
82                         <field name="physical_description" oils_persist:virtual="true" />
83                         <field name="toc" oils_persist:virtual="true" />
84                         <field name="copy_count" oils_persist:virtual="true" />
85                         <field name="series" oils_persist:virtual="true" />
86                         <field name="serials" oils_persist:virtual="true" />
87                 </fields>
88         </class>
89
90         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
91                 <fields>
92                         <field name="err_msg" oils_persist:virtual="true" />
93                         <field name="type" oils_persist:virtual="true" />
94                 </fields>
95         </class>
96
97         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
98                 <fields>
99                         <field name="err_msg" oils_persist:virtual="true" />
100                         <field name="type" oils_persist:virtual="true" />
101                 </fields>
102         </class>
103
104         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
105                 <fields oils_persist:primary="matchpoint">
106                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
107                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
108                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
109                 </fields>
110                 <links>
111                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
112                 </links>
113         </class>
114
115         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
116         <!-- when the time is right, turn me into a view.  -->
117                 <fields>
118             <field reporter:label="Total Circs" name="num_circs" datatype="int"/>
119             <field reporter:label="Start Time" name="start_time" datatype="timestamp"/>
120             <field reporter:label="Checkout Workstation" name="checkout_workstation" datatype="text"/>
121             <field reporter:label="Last Renewal Time" name="last_renewal_time" datatype="timestamp"/>
122             <field reporter:label="Last Stop Fines" name="last_stop_fines" datatype="text"/>
123             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" datatype="timestamp"/>
124             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" datatype="text"/>
125             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" datatype="text"/>
126             <field reporter:label="Last Checkin Time" name="last_checkin_time" datatype="timestamp"/>
127             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" datatype="timestamp"/>
128                 </fields>
129         </class>
130
131         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
132                 <fields>
133                         <field name="public_name" oils_persist:virtual="true" />
134                         <field name="target_url" oils_persist:virtual="true" />
135                         <field name="target_coverage" oils_persist:virtual="true" />
136                         <field name="target_embargo" oils_persist:virtual="true" />
137                 </fields>
138         </class>
139
140         <!-- Actually in the DB -->
141         <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">
142                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
143                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
144                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
145                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
146                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
147                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
148                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
149                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
150                 </fields>
151                 <links>
152                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
153                 </links>
154                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
155                         <actions>
156                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
157                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
158                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
159                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
160                         </actions>
161                 </permacrud>
162         </class>
163
164         <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">
165                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
166                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
167                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
168                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
169                 </fields>
170                 <links>
171                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
172                 </links>
173                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
174                         <actions>
175                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
176                                 <retrieve permission="CREATE_IMPORT_TRASH_FIELD UPDATE_IMPORT_TRASH_FIELD DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
177                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
178                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
179                         </actions>
180                 </permacrud>
181         </class>
182
183         <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">
184                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
185                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
186                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
187                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
188                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
189                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
190                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
191                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
192                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
193                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
194                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
195                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
196                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
197                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
198                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
199                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
200                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
201                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
202                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
203                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
204                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
205                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
206                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
207                 </fields>
208                 <links>
209                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
210                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
211                 </links>
212                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
213                         <actions>
214                                 <create permission="CREATE_IMPORT_ITEM">
215                     <context link="definition" field="owner"/>
216                                 </create>
217                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
218                     <context link="definition" field="owner"/>
219                                 </retrieve>
220                                 <update permission="UPDATE_IMPORT_ITEM">
221                     <context link="definition" field="owner"/>
222                                 </update>
223                                 <delete permission="DELETE_IMPORT_ITEM">
224                     <context link="definition" field="owner"/>
225                                 </delete>
226                         </actions>
227                 </permacrud>
228         </class>
229
230         <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">
231                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
232                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
233                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
234                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
235                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
236                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
237                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
238                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
239                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
240                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
241                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
242                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
243                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
244                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
245                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
246                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
247                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
248                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
249                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
250                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
251                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
252                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
253                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
254                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
255                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
256                 </fields>
257                 <links>
258                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
259                 </links>
260                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
261                         <actions>
262                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
263                                 <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"/>
264                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
265                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
266                         </actions>
267                 </permacrud>
268         </class>
269
270         <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">
271                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
272                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
273                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
274                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
275                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
276                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
277                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
278                 </fields>
279                 <links>
280                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
281                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
282                 </links>
283                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
284                         <actions>
285                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
286                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
287                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
288                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
289                         </actions>
290                 </permacrud>
291         </class>
292
293         <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">
294                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
295                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
296                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
297                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
298                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
299                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
300                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
301                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
302                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
303                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
304                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
305                 </fields>
306                 <links>
307                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
308                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
309                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
310             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
311             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
312                 </links>
313                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
314                         <actions>
315                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
316                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
317                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
318                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
319                         </actions>
320                 </permacrud>
321         </class>
322
323         <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">
324                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
325                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
326                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
327                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
328                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
329                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
330                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
331                 </fields>
332                 <links/>
333                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
334                         <actions>
335                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
336                 <retrieve/>
337                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
338                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
339                         </actions>
340                 </permacrud>
341         </class>
342
343         <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">
344                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
345                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
346                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
347                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
348                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
349                 </fields>
350                 <links>
351                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
352                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
353                 </links>
354                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
355                         <actions>
356                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
357                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
358                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
359                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
360                         </actions>
361                 </permacrud>
362         </class>
363
364         <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">
365                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
366                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
367                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
368                         <field reporter:label="Matched Attribute" name="matched_attr" reporter:datatype="link"/>
369                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
370                         <field reporter:label="Field Type" name="field_type" reporter:datatype="text"/>
371                 </fields>
372                 <links>
373                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
374                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
375                         <link field="matched_attr" reltype="has_a" key="id" map="" class="vqbra"/>
376                 </links>
377                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
378                         <actions>
379                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
380                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
381                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
382                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
383                         </actions>
384                 </permacrud>
385         </class>
386
387         <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">
388                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
389                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
390                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
391                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
392                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
393                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
394                 </fields>
395                 <links>
396                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
397                 </links>
398                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
399                         <actions>
400                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
401                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
402                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
403                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
404                         </actions>
405                 </permacrud>
406         </class>
407
408         <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">
409                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
410                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
411                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
412                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
413                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
414                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
415                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
416                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
417                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
418                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
419                 </fields>
420                 <links>
421                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
422                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
423             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
424             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
425                 </links>
426                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
427                         <actions>
428                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
429                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
430                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
431                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
432                         </actions>
433                 </permacrud>
434         </class>
435
436         <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">
437                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
438                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
439                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
440                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
441                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
442                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
443                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
444                 </fields>
445                 <links/>
446                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
447                         <actions>
448                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
449                 <retrieve/>
450                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
451                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
452                         </actions>
453                 </permacrud>
454         </class>
455
456         <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">
457                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
458                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
459                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
460                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
461                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
462                 </fields>
463                 <links>
464                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
465                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
466                 </links>
467                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
468                         <actions>
469                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
470                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
471                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
472                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
473                         </actions>
474                 </permacrud>
475         </class>
476
477         <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">
478                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
479                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
480                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
481                         <field reporter:label="Matched Attribute" name="matched_attr" reporter:datatype="link"/>
482                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
483                 </fields>
484                 <links>
485                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
486                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
487                         <link field="matched_attr" reltype="has_a" key="id" map="" class="vqbra"/>
488                 </links>
489                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
490                         <actions>
491                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
492                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
493                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
494                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
495                         </actions>
496                 </permacrud>
497         </class>
498
499
500         <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">
501                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
502                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
503                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
504                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
505                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
506                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
507                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
508                 </fields>
509                 <links>
510                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
511                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
512                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
513                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
514                 </links>
515         </class>
516
517     <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">
518         <fields oils_persist:primary="name">
519             <field reporter:label="Name" name="name" reporter:datatype="text"/>
520             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
521             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
522             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
523         </fields>
524         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
525             <actions>
526                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
527                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
528                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
529                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
530             </actions>
531         </permacrud>
532     </class>
533
534     <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">
535         <fields oils_persist:primary="id">
536             <field reporter:label="ID" name="id" reporter:datatype="id"/>
537             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
538             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
539             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
540             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
541         </fields>
542         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
543             <actions>
544                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
545                 <retrieve/>
546                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
547                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
548             </actions>
549         </permacrud>
550     </class>
551
552         <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">
553                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
554                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
555                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
556                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
557                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
558                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
559                 </fields>
560                 <links>
561                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
562                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
563                 </links>
564         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
565             <actions>
566                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
567                 <retrieve/>
568                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
569                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
570             </actions>
571         </permacrud>
572         </class>
573
574         <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">
575                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
576                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
577                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
578                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
579                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
580                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
581                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
582                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
583                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
584                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
585                 </fields>
586                 <links>
587                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
588                 </links>
589         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
590             <actions>
591                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
592                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
593                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
594                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
595             </actions>
596         </permacrud>
597         </class>
598
599     <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">
600         <fields oils_persist:primary="name">
601             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
602             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
603             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
604             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
605             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
606             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
607             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
608             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
609             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
610         </fields>
611         <links>
612             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
613         </links>
614         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
615             <actions>
616                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
617                 <retrieve/>
618                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
619                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
620             </actions>
621         </permacrud>
622     </class>
623
624     <class id="cza" controller="open-ils.cstore" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
625         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
626             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id"/>
627             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
628             <field reporter:label="Name" name="name" reporter:datatype="text"/>
629             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
630             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
631             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
632             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
633         </fields>
634         <links>
635             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
636         </links>
637     </class>
638
639         <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">
640                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
641                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
642                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
643                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
644                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
645                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
646                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
647                 </fields>
648                 <links>
649             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
650             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
651                 </links>
652                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
653                         <actions>
654                                 <retrieve/>
655                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
656                         </actions>
657                 </permacrud>
658         </class>
659
660         <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">
661                 <fields oils_persist:primary="key">
662                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
663                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
664                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
665                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
666                 </fields>
667                 <links/>
668                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
669                         <actions>
670                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
671                                 <retrieve/>
672                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
673                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
674                         </actions>
675                 </permacrud>
676         </class>
677
678         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
679                 <fields oils_persist:primary="module">
680                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
681                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
682                 </fields>
683                 <links/>
684         </class>
685
686         <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">
687                 <fields oils_persist:primary="module">
688                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
689                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
690                 </fields>
691                 <links/>
692                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
693                         <actions>
694                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
695                                 <retrieve/>
696                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
697                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
698                         </actions>
699                 </permacrud>
700         </class>
701
702         <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">
703                 <fields oils_persist:primary="module">
704                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
705                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
706                 </fields>
707                 <links/>
708                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
709                         <actions>
710                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
711                                 <retrieve/>
712                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
713                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
714                         </actions>
715                 </permacrud>
716         </class>
717
718         <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">
719                 <fields oils_persist:primary="module">
720                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
721                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
722                 </fields>
723                 <links/>
724                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
725                         <actions>
726                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
727                                 <retrieve/>
728                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
729                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
730                         </actions>
731                 </permacrud>
732         </class>
733
734         <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">
735                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
736                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
737                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
738                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
739                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
740                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
741                 </fields>
742                 <links>
743                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
744                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
745                 </links>
746                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
747                         <actions>
748                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
749                     <context link="event_def" field="owner"/>
750                 </create>
751                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
752                     <context link="event_def" field="owner"/>
753                 </retrieve>
754                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
755                     <context link="event_def" field="owner"/>
756                 </update>
757                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
758                     <context link="event_def" field="owner"/>
759                 </delete>
760                         </actions>
761                 </permacrud>
762         </class>
763
764         <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">
765                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
766                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
767                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
768                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
769                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
770                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
771                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
772                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
773                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
774                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
775                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
776                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
777                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
778                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
779                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
780                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
781                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
782                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
783                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
784                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
785                 </fields>
786                 <links>
787                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
788                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
789                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
790                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
791                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
792                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
793                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
794                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
795                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
796                 </links>
797                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
798                         <actions>
799                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
800                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
801                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
802                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
803                         </actions>
804                 </permacrud>
805         </class>
806
807         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
808                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
809                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
810                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
811                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
812                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
813                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
814                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
815                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
816                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
817                         <field reporter:label="State" name="state" reporter:datatype="text"/>
818                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
819                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
820                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
821                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
822                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
823                 </fields>
824                 <links>
825                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
826                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
827                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
828                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
829                 </links>
830         </class>
831
832         <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">
833                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
834                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
835                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
836                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
837                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
838                 </fields>
839                 <links>
840                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
841                 </links>
842                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
843                         <actions>
844                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
845                     <context link="event_def" field="owner"/>
846                 </create>
847                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
848                     <context link="event_def" field="owner"/>
849                 </retrieve>
850                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
851                     <context link="event_def" field="owner"/>
852                 </update>
853                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
854                     <context link="event_def" field="owner"/>
855                 </delete>
856                         </actions>
857                 </permacrud>
858         </class>
859
860         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
861                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
862                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
863                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
864                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
865                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
866                 </fields>
867                 <links>
868                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
869                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
870                 </links>
871         </class>
872
873         <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">
874                 <fields oils_persist:primary="code">
875                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
876                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
877                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
878                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
879                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
880                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
881                 </fields>
882                 <links/>
883         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
884             <actions>
885                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
886                 <retrieve/>
887                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
888                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
889             </actions>
890         </permacrud>
891         </class>
892
893         <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">
894                 <fields oils_persist:primary="code">
895                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
896                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
897                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
898                 </fields>
899                 <links/>
900         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
901             <actions>
902                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
903                 <retrieve/>
904                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
905                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
906             </actions>
907         </permacrud>
908         </class>
909
910         <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">
911                 <fields oils_persist:primary="code">
912                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
913                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
914                 </fields>
915                 <links/>
916         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
917             <actions>
918                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
919                 <retrieve/>
920                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
921                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
922             </actions>
923         </permacrud>
924         </class>
925
926         <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">
927                 <fields oils_persist:primary="code">
928                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
929                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
930                 </fields>
931                 <links/>
932         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
933             <actions>
934                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
935                 <retrieve/>
936                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
937                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
938             </actions>
939         </permacrud>
940         </class>
941
942         <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">
943                 <fields oils_persist:primary="code">
944                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
945                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
946                 </fields>
947                 <links/>
948         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
949             <actions>
950                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
951                 <retrieve/>
952                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
953                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
954             </actions>
955         </permacrud>
956         </class>
957
958         <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">
959                 <fields oils_persist:primary="code">
960                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
961                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
962                 </fields>
963                 <links/>
964         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
965             <actions>
966                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
967                 <retrieve/>
968                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
969                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
970             </actions>
971         </permacrud>
972         </class>
973
974         <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">
975                 <fields oils_persist:primary="code">
976                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
977                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
978                 </fields>
979                 <links/>
980         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
981             <actions>
982                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
983                 <retrieve/>
984                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
985                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
986             </actions>
987         </permacrud>
988         </class>
989
990         <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">
991                 <fields oils_persist:primary="code">
992                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
993                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
994                 </fields>
995                 <links/>
996         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
997             <actions>
998                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
999                 <retrieve/>
1000                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1001                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1002             </actions>
1003         </permacrud>
1004         </class>
1005
1006         <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">
1007                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1008                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1009                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1010                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1011                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1012                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1013                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1014                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1015                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1016                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1017                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1018                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1019                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1020                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1021                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1022                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1023                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1024                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1025                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1026                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1027                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1028                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1029                 </fields>
1030                 <links>
1031                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1032                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1033                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1034                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1035                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1036                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1037                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1038                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1039                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1040                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1041                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1042                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1043             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1044                 </links>
1045         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1046             <actions>
1047                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1048                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1049                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1050                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1051             </actions>
1052         </permacrud>
1053         </class>
1054
1055         <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">
1056                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1057                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1058                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1059                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1060                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1061                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1062                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1063                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1064                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1065                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1066                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1067                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1068                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1069                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1070                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1071                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1072                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link" oils_obj:required="true"/>
1073                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link" oils_obj:required="true"/>
1074                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link" oils_obj:required="true"/>
1075             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1076                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1077                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1078                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1079                 </fields>
1080                 <links>
1081                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1082                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1083                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1084                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1085                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1086                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1087                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1088                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1089                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1090                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1091                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1092             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1093                 </links>
1094         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1095             <actions>
1096                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1097                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1098                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1099                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1100             </actions>
1101         </permacrud>
1102         </class>
1103
1104         <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">
1105                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_id_seq">
1106                         <field reporter:label="Test ID" name="id" reporter:datatype="id"/>
1107                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="link"/>
1108                         <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1109                 </fields>
1110                 <links>
1111                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1112                 </links>
1113         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1114             <actions>
1115                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1116                     <context link="matchpoint" field="org_unit"/>
1117                 </create>
1118                 <retrieve/>
1119                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1120                     <context link="matchpoint" field="org_unit"/>
1121                 </update>
1122                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1123                     <context link="matchpoint" field="org_unit"/>
1124                 </delete>
1125             </actions>
1126         </permacrud>
1127         </class>
1128
1129         <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">
1130                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_map_id_seq">
1131                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
1132                         <field reporter:label="Circulation Modifier Subtest ID" name="circ_mod_test" reporter:datatype="link"/>
1133                         <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1134                 </fields>
1135                 <links>
1136                         <link field="circ_mod_test" reltype="has_a" key="id" map="" class="ccmcmt"/>
1137                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1138                 </links>
1139         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1140             <actions>
1141                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1142                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1143                 </create>
1144                 <retrieve/>
1145                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1146                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1147                 </update>
1148                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1149                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1150                 </delete>
1151             </actions>
1152         </permacrud>
1153         </class>
1154
1155         <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">
1156                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1157                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1158                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1159                 </fields>
1160                 <links/>
1161         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1162             <actions>
1163                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1164                 <retrieve/>
1165                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1166                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1167             </actions>
1168         </permacrud>
1169         </class>
1170
1171         <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">
1172                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1173                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1174                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1175                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1176                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1177                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1178                 </fields>
1179                 <links>
1180                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1181                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1182                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1183                 </links>
1184         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1185             <actions>
1186                 <create permission="ADMIN_SURVEY">
1187                     <context link="survey" field="owner"/>
1188                 </create>
1189                 <retrieve/>
1190                 <update permission="ADMIN_SURVEY">
1191                     <context link="survey" field="owner"/>
1192                 </update>
1193                 <delete permission="ADMIN_SURVEY">
1194                     <context link="survey" field="owner"/>
1195                 </delete>
1196             </actions>
1197         </permacrud>
1198         </class>
1199         <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">
1200                 <fields oils_persist:primary="id" oils_persist:sequence="">
1201                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1202                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1203                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1204                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1205                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1206                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1207                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1208                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1209                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1210                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1211                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1212                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1213                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1214                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1215                 </fields>
1216                 <links>
1217                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1218                 </links>
1219         </class>
1220         <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">
1221                 <fields oils_persist:primary="id" oils_persist:sequence="">
1222                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1223                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1224                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1225                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1226                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1227                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1228                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1229                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1230                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1231                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1232                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1233                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1234                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1235                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1236                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1237                 </fields>
1238                 <links>
1239                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1240                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1241                 </links>
1242         </class>
1243         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1244                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1245                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1246                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1247                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1248                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1249                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1250                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1251                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1252                 </fields>
1253                 <links>
1254                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1255                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1256                 </links>
1257         </class>
1258         <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">
1259                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
1260                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
1261                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
1262                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1263                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
1264                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
1265                 </fields>
1266                 <links>
1267                         <link field="usr" reltype="has_a" key="id" class="au"/>
1268                 </links>
1269         </class>
1270         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1271                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1272                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1273                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1274                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1275                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1276                 </fields>
1277                 <links>
1278                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1279                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1280                 </links>
1281         </class>
1282         <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">
1283                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1284                         <field name="field" reporter:datatype="link"/>
1285                         <field name="id" reporter:datatype="id" />
1286                         <field name="source" reporter:datatype="link"/>
1287                         <field name="value" reporter:datatype="text"/>
1288                 </fields>
1289                 <links>
1290                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1291                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1292                 </links>
1293         </class>
1294         <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">
1295                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1296                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1297                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1298                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1299                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1300                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1301                 </fields>
1302                 <links>
1303                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1304                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1305                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1306                 </links>
1307         </class>
1308         <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">
1309                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1310                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1311                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1312                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1313                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1314                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1315                 </fields>
1316                 <links>
1317                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1318                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1319                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1320                 </links>
1321         </class>
1322         <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">
1323                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
1324                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
1325                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
1326                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
1327                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
1328                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
1329                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
1330                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
1331                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
1332                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
1333                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
1334                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
1335                 </fields>
1336                 <links>
1337                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
1338                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
1339                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
1340                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
1341                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
1342                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1343                 </links>
1344         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1345             <actions>
1346                 <create permission="TRANSIT_COPY" context_field="owner">
1347                     <context link="target_copy" field="circ_lib"/>
1348                 </create>
1349                 <retrieve/>
1350                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
1351                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
1352             </actions>
1353         </permacrud>
1354         </class>
1355         <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">
1356                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
1357                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
1358                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
1359                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
1360                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
1361                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
1362                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
1363                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1364                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
1365                 </fields>
1366                 <links>
1367                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
1368                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1369                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
1370                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1371                 </links>
1372         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1373             <actions>
1374                 <create permission="ADMIN_SURVEY">
1375                     <context link="survey" field="owner"/>
1376                 </create>
1377                 <retrieve/>
1378                 <update permission="ADMIN_SURVEY">
1379                     <context link="survey" field="owner"/>
1380                 </update>
1381                 <delete permission="ADMIN_SURVEY">
1382                     <context link="survey" field="owner"/>
1383                 </delete>
1384             </actions>
1385         </permacrud>
1386         </class>
1387         <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">
1388                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
1389                         <field name="bucket" />
1390                         <field name="id" reporter:datatype="id" />
1391                         <field name="target_copy" reporter:datatype="link"/>
1392                         <field name="create_time" reporter:datatype="timestamp" />
1393                         <field name="pos" reporter:datatype="int" />
1394                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
1395                 </fields>
1396                 <links>
1397                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1398                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
1399             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
1400                 </links>
1401         </class>
1402         <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">
1403                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
1404                         <field name="id" reporter:datatype="id" />
1405                         <field name="item" reporter:datatype="link"/>
1406                         <field name="note" reporter:datatype="text" />
1407                 </fields>
1408                 <links>
1409                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
1410                 </links>
1411         </class>
1412         <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">
1413                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
1414                         <field name="active" reporter:datatype="bool"/>
1415                         <field name="create_date" reporter:datatype="timestamp"/>
1416                         <field name="creator" />
1417                         <field name="deleted" reporter:datatype="bool"/>
1418                         <field name="edit_date" reporter:datatype="timestamp"/>
1419                         <field name="editor" />
1420                         <field name="id" reporter:datatype="id" />
1421                         <field name="last_xact_id" />
1422                         <field name="marc" />
1423                         <field name="source" />
1424                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
1425                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
1426                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1427                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
1428                 </fields>
1429                 <links>
1430                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1431                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1432                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1433                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
1434                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
1435                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
1436                 </links>
1437                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1438                         <actions>
1439                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
1440                                 <retrieve/>
1441                                 <update permission="UPDATE_MARC" global_required="true"/>
1442                                 <delete permission="UPDATE_MARC" global_required="true"/>
1443                         </actions>
1444                 </permacrud>
1445         </class>
1446         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
1447                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
1448                         <field name="char_encoding" />
1449                         <field name="id" />
1450                         <field name="record" />
1451                         <field name="record_status" />
1452                 </fields>
1453                 <links>
1454                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
1455                 </links>
1456         </class>
1457         <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">
1458                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
1459                         <field name="id" reporter:datatype="id" />
1460                         <field name="bib" reporter:datatype="link" />
1461                         <field name="authority" reporter:datatype="link" />
1462                 </fields>
1463                 <links>
1464                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
1465                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
1466                 </links>
1467         </class>
1468         <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">
1469                 <fields oils_persist:primary="code" oils_persist:sequence="">
1470                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1471                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1472                 </fields>
1473                 <links/>
1474         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1475             <actions>
1476                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1477                 <retrieve/>
1478                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1479                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1480             </actions>
1481         </permacrud>
1482         </class>
1483         <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">
1484                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
1485                         <field name="accepting_usr" />
1486                         <field name="amount" reporter:datatype="money" />
1487                         <field name="amount_collected" reporter:datatype="money" />
1488                         <field name="approval_code" reporter:datatype="text"/>
1489                         <field name="cash_drawer" reporter:datatype="link"/>
1490                         <field name="cc_first_name" reporter:datatype="text"/>
1491                         <field name="cc_last_name" reporter:datatype="text"/>
1492                         <field name="cc_number" reporter:datatype="text"/>
1493                         <field name="cc_type" reporter:datatype="text"/>
1494                         <field name="cc_processor" reporter:datatype="text"/>
1495                         <field name="expire_month" reporter:datatype="int" />
1496                         <field name="expire_year" reporter:datatype="int" />
1497                         <field name="id" reporter:datatype="id" />
1498                         <field name="note" reporter:datatype="text"/>
1499                         <field name="payment_ts" reporter:datatype="timestamp"/>
1500                         <field name="xact" reporter:datatype="link"/>
1501                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
1502                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
1503                 </fields>
1504                 <links>
1505                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
1506                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
1507                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
1508                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
1509                 </links>
1510         </class>
1511         <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">
1512                 <fields oils_persist:primary="name">
1513                         <field reporter:label="Field Class" name="field_class" />
1514                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1515                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
1516                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
1517                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
1518                 </fields>
1519                 <links/>
1520         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1521             <actions>
1522                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
1523                 <retrieve/>
1524                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
1525                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
1526             </actions>
1527         </permacrud>
1528         </class>
1529
1530         <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">
1531                 <fields oils_persist:primary="alias">
1532                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
1533                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
1534                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
1535                 </fields>
1536                 <links>
1537                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
1538                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1539                 </links>
1540         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1541             <actions>
1542                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
1543                 <retrieve/>
1544                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
1545                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
1546             </actions>
1547         </permacrud>
1548         </class>
1549
1550         <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">
1551                 <fields oils_persist:primary="name">
1552                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
1553                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1554                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
1555                 </fields>
1556                 <links>
1557                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
1558                 </links>
1559         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1560             <actions>
1561                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
1562                 <retrieve/>
1563                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
1564                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
1565             </actions>
1566         </permacrud>
1567         </class>
1568
1569         <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">
1570                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
1571                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
1572                         <field reporter:label="ID" name="id" reporter:datatype="id" />
1573                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
1574                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1575                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
1576                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
1577                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
1578                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
1579                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
1580                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
1581                 </fields>
1582                 <links>
1583                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
1584                 </links>
1585         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1586             <actions>
1587                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
1588                 <retrieve/>
1589                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
1590                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
1591             </actions>
1592         </permacrud>
1593         </class>
1594         <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">
1595                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
1596                         <field name="id" reporter:datatype="id" />
1597                         <field name="name" reporter:datatype="text"/>
1598                         <field name="xpath" reporter:datatype="text"/>
1599                         <field name="format" reporter:datatype="link"/>
1600                         <field name="first_word" reporter:datatype="bool" />
1601                 </fields>
1602                 <links/>
1603         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1604             <actions>
1605                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
1606                 <retrieve/>
1607                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
1608                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
1609             </actions>
1610         </permacrud>
1611         </class>
1612         <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">
1613                 <fields oils_persist:primary="code" oils_persist:sequence="">
1614                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1615                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1616                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1617                 </fields>
1618                 <links/>
1619         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1620             <actions>
1621                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1622                 <retrieve/>
1623                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1624                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1625             </actions>
1626         </permacrud>
1627         </class>
1628         <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">
1629                 <fields oils_persist:primary="code" oils_persist:sequence="">
1630                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1631                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1632                 </fields>
1633                 <links/>
1634         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1635             <actions>
1636                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1637                 <retrieve/>
1638                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1639                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1640             </actions>
1641         </permacrud>
1642         </class>
1643     <class id="acnc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::call_number_class" oils_persist:tablename="asset.call_number_class" reporter:label="Call number classification scheme">
1644         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
1645             <field reporter:label="Call number class ID" name="id" reporter_datatype="id"/>
1646             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1647             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
1648             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
1649         </fields>
1650     </class>
1651         <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">
1652                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
1653                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
1654                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
1655                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
1656                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
1657                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
1658                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
1659                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
1660                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
1661                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1662                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
1663                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1664                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
1665                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
1666                         <field reporter:label="Sort Key" name="label_sortkey" reporter:datatype="text"/>
1667                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
1668                 </fields>
1669                 <links>
1670                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1671                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1672                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
1673                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1674                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
1675                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
1676                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
1677                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
1678                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
1679                 </links>
1680         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1681             <actions>
1682                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
1683                 <retrieve/>
1684                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
1685                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
1686             </actions>
1687         </permacrud>
1688         </class>
1689         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
1690                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
1691                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
1692                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
1693                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1694                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
1695                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1696                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
1697                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
1698                 </fields>
1699                 <links>
1700                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
1701                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
1702         </links>
1703         </class>
1704         <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">
1705                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
1706                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1707                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
1708                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
1709                 </fields>
1710                 <links>
1711                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
1712                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
1713                 </links>
1714         </class>
1715         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
1716                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
1717                         <field name="id" reporter:datatype="id" />
1718                         <field name="value" oils_persist:i18n="true" />
1719                 </fields>
1720                 <links/>
1721         </class>
1722         <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">
1723                 <fields oils_persist:primary="usr" oils_persist:sequence="">
1724                         <field name="balance_owed" reporter:datatype="money" />
1725                         <field name="total_owed" reporter:datatype="money" />
1726                         <field name="total_paid" reporter:datatype="money" />
1727                         <field name="usr" reporter:datatype="link"/>
1728                 </fields>
1729                 <links>
1730                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1731         </links>
1732         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1733             <actions>
1734                 <retrieve permission="VIEW_USER">
1735                     <context link="usr" field="home_ou"/>
1736                 </retrieve>
1737             </actions>
1738         </permacrud>
1739         </class>
1740         <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">
1741                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
1742                         <field name="collector" />
1743                         <field name="enter_time" reporter:datatype="timestamp"/>
1744                         <field name="id" reporter:datatype="id" />
1745                         <field name="location" reporter:datatype="link"/>
1746                         <field name="usr" reporter:datatype="link"/>
1747                 </fields>
1748                 <links>
1749                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1750                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
1751                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
1752                 </links>
1753         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1754             <actions>
1755                 <create permission="money.collections_tracker.create" context_field="location"/>
1756                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
1757                 <delete permission="money.collections_tracker.create" context_field="location"/>
1758             </actions>
1759         </permacrud>
1760         </class>
1761         <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">
1762                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
1763                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
1764                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
1765                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
1766                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1767                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
1768                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
1769                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
1770                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
1771                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
1772                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
1773                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
1774                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
1775                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
1776                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
1777                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
1778                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
1779                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
1780                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
1781                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
1782                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
1783                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1784                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1785                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1786                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1787                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1788                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1789                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1790                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1791                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
1792                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
1793                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
1794                 </fields>
1795                 <links>
1796                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1797                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1798                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1799                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
1800                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
1801                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
1802                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
1803                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
1804                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
1805                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
1806                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
1807                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
1808                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
1809                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
1810                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
1811                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
1812                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
1813                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
1814                 </links>
1815         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1816             <actions>
1817                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
1818                 <retrieve/>
1819                 <update permission="UPDATE_MARC" global_required="true"/>
1820             </actions>
1821         </permacrud>
1822         </class>
1823         <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">
1824                 <fields oils_persist:primary="id">
1825                         <field name="dow_0_close" />
1826                         <field name="dow_0_open" />
1827                         <field name="dow_1_close" />
1828                         <field name="dow_1_open" />
1829                         <field name="dow_2_close" />
1830                         <field name="dow_2_open" />
1831                         <field name="dow_3_close" />
1832                         <field name="dow_3_open" />
1833                         <field name="dow_4_close" />
1834                         <field name="dow_4_open" />
1835                         <field name="dow_5_close" />
1836                         <field name="dow_5_open" />
1837                         <field name="dow_6_close" />
1838                         <field name="dow_6_open" />
1839                         <field name="id" reporter:datatype="id" />
1840                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
1841                 </fields>
1842                 <links>
1843                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
1844                 </links>
1845         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1846             <actions>
1847                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
1848                 <retrieve/>
1849                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
1850                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
1851             </actions>
1852         </permacrud>
1853         </class>
1854         <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">
1855                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
1856                         <field name="close_end" reporter:datatype="timestamp" />
1857                         <field name="close_start" reporter:datatype="timestamp" />
1858                         <field name="id" reporter:datatype="id" />
1859                         <field name="org_unit" reporter:datatype="org_unit"/>
1860                         <field name="reason" reporter:datatype="text"/>
1861                 </fields>
1862                 <links>
1863                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1864                 </links>
1865         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1866             <actions>
1867                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
1868                 <retrieve/>
1869                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
1870                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
1871             </actions>
1872         </permacrud>
1873         </class>
1874         <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">
1875                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
1876                         <field name="extended" reporter:datatype="interval"/>
1877                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
1878                         <field name="max_renewals" reporter:datatype="int" />
1879                         <field name="name" reporter:datatype="text"/>
1880                         <field name="normal" reporter:datatype="interval"/>
1881                         <field name="shrt" reporter:datatype="interval"/>
1882                 </fields>
1883                 <links>
1884                 </links>
1885         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1886             <actions>
1887                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
1888                 <retrieve/>
1889                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
1890                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
1891             </actions>
1892         </permacrud>
1893         </class>
1894
1895         <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">
1896                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
1897                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1898                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
1899             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
1900                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
1901             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
1902                 </fields>
1903                 <links>
1904             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1905                 </links>
1906                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1907             <actions>
1908                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
1909                 <retrieve/>
1910                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
1911                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
1912             </actions>
1913                 </permacrud>
1914         </class>
1915
1916         <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">
1917                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
1918                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1919                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1920                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
1921             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
1922                 </fields>
1923                 <links>
1924                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1925                 </links>
1926                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1927             <actions>
1928                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
1929                 <retrieve/>
1930                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
1931                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
1932             </actions>
1933                 </permacrud>
1934         </class>
1935
1936         <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">
1937                 <fields oils_persist:primary="id" oils_persist:sequence="">
1938                         <field name="balance_owed" reporter:datatype="money"/>
1939                         <field name="id" reporter:datatype="id" />
1940                         <field name="last_billing_note" reporter:datatype="text"/>
1941                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
1942                         <field name="last_billing_type" reporter:datatype="text"/>
1943                         <field name="last_payment_note" reporter:datatype="text"/>
1944                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
1945                         <field name="last_payment_type" reporter:datatype="text"/>
1946                         <field name="total_owed" reporter:datatype="money"/>
1947                         <field name="total_paid" reporter:datatype="money"/>
1948                         <field name="usr" reporter:datatype="link"/>
1949                         <field name="xact_finish" reporter:datatype="timestamp" />
1950                         <field name="xact_start" reporter:datatype="timestamp" />
1951                         <field name="xact_type" reporter:datatype="text"/>
1952                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
1953                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
1954                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
1955                         <field name="billing_location" reporter:datatype="link"/>
1956                 </fields>
1957                 <links>
1958                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1959                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
1960                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
1961                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
1962                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1963                 </links>
1964         </class>
1965         <class id="au" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
1966                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
1967                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
1968                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
1969                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
1970                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
1971                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
1972                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
1973                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
1974                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1975                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
1976                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
1977                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
1978                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1979                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
1980                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
1981                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
1982                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
1983                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
1984                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
1985                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1986                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
1987                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
1988                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
1989                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
1990                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
1991                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
1992                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
1993                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
1994                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
1995                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
1996                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
1997                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
1998                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
1999                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
2000                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
2001                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
2002                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
2003                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
2004                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
2005                         <field reporter:label="Password" name="passwd"  reporter:datatype="text"/>
2006                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
2007                         <field reporter:label="Prefix" name="prefix"  reporter:datatype="text"/>
2008                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
2009                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
2010                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
2011                         <field reporter:label="Suffix/Title" name="suffix"  reporter:datatype="text"/>
2012                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
2013                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
2014                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
2015                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
2016                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
2017                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
2018                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2019                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2020                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
2021                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
2022                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2023                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2024                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
2025                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
2026                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
2027                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
2028                 </fields>
2029                 <links>
2030                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
2031                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
2032                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
2033                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
2034                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
2035                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
2036                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
2037                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
2038                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
2039                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
2040                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
2041                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
2042                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
2043                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
2044                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
2045                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
2046                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
2047                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
2048                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
2049                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
2050                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
2051                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
2052                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
2053                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
2054                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
2055                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
2056                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
2057                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
2058                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
2059                 </links>
2060         </class>
2061
2062         <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">
2063                 <fields oils_persist:primary="name">
2064                         <field name="name" reporter:datatype="text"/>
2065                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2066                 </fields>
2067                 <links/>
2068                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2069                         <actions>
2070                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2071                                 <retrieve/>
2072                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2073                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2074                         </actions>
2075                 </permacrud>
2076         </class>
2077         <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">
2078                 <fields oils_persist:primary="name">
2079                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
2080                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
2081                         <field name="description" reporter:label="Description" reporter:datatype="text"/>
2082                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
2083                         <field name="fm_class" reporter:label="Fielmapper Class" reporter:datatype="text"/>
2084                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
2085                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
2086                 </fields>
2087                 <links>
2088                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
2089                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2090                 </links>
2091                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2092                         <actions>
2093                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2094                                 <retrieve/>
2095                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2096                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2097                         </actions>
2098                 </permacrud>
2099         </class>
2100         <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">
2101                 <fields oils_persist:primary="name">
2102                         <field name="name" reporter:datatype="text"/>
2103                         <field name="label" reporter:datatype="text"/>
2104                         <field name="description" reporter:datatype="text"/>
2105                         <field name="datatype" reporter:datatype="text"/>
2106                         <field name="view_perm" reporter:datatype="link"/>
2107                         <field name="update_perm" reporter:datatype="link"/>
2108                         <field name="fm_class" reporter:datatype="text"/>
2109                         <field name="grp" reporter:datatype="link"/>
2110                 </fields>
2111                 <links>
2112                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
2113                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
2114                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
2115                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2116                 </links>
2117                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2118                         <actions>
2119                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2120                                 <retrieve/>
2121                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2122                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2123                         </actions>
2124                 </permacrud>
2125         </class>
2126         <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">
2127                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
2128                         <field name="id" />
2129                         <field name="name"  reporter:datatype="text"/>
2130                         <field name="org_unit" reporter:datatype="org_unit"/>
2131                         <field name="value"  reporter:datatype="text"/>
2132                 </fields>
2133                 <links>
2134                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2135                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
2136                 </links>
2137         </class>
2138         <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">
2139                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
2140                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2141                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
2142                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2143                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
2144                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2145                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
2146                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
2147                 </fields>
2148                 <links>
2149                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
2150                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2151                 </links>
2152         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2153             <actions>
2154                 <create permission="CREATE_COPY_NOTE">
2155                     <context link="owning_copy" field="circ_lib"/>
2156                 </create>
2157                 <retrieve permission="VIEW_COPY_NOTES">
2158                     <context link="owning_copy" field="circ_lib"/>
2159                 </retrieve>
2160                 <update permission="UPDATE_COPY_NOTE">
2161                     <context link="owning_copy" field="circ_lib"/>
2162                 </update>
2163                 <delete permission="DELETE_COPY_NOTE">
2164                     <context link="owning_copy" field="circ_lib"/>
2165                 </delete>
2166             </actions>
2167         </permacrud>
2168         </class>
2169         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
2170                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
2171                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
2172                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
2173                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
2174                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2175                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
2176                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
2177                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
2178                 </fields>
2179                 <links>
2180                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2181                 </links>
2182         </class>
2183         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
2184                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
2185                         <field name="fingerprint"  reporter:datatype="text"/>
2186                         <field name="id" reporter:datatype="id" />
2187                         <field name="master_record" reporter:datatype="link"/>
2188                         <field name="mods"  reporter:datatype="text"/>
2189                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
2190                 </fields>
2191                 <links>
2192                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
2193                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
2194                 </links>
2195         </class>
2196         <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">
2197                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
2198                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2199                         <field name="name"  reporter:datatype="text"/>
2200                 </fields>
2201                 <links/>
2202         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2203             <actions>
2204                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
2205                 <retrieve/>
2206                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
2207                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
2208             </actions>
2209         </permacrud>
2210         </class>
2211         <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">
2212                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
2213                         <field name="code"  reporter:datatype="text"/>
2214                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
2215                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
2216                 </fields>
2217                 <links/>
2218         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2219             <actions>
2220                 <create permission="CREATE_PERM" global_required="true"/>
2221                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
2222                 <update permission="UPDATE_PERM" global_required="true"/>
2223                 <delete permission="DELETE_PERM" global_required="true"/>
2224             </actions>
2225         </permacrud>
2226         </class>
2227         <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">
2228                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
2229                         <field name="id" reporter:datatype="id" />
2230                         <field name="metarecord" reporter:datatype="link"/>
2231                         <field name="source" reporter:datatype="link"/>
2232                 </fields>
2233                 <links>
2234                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2235                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
2236                 </links>
2237         </class>
2238         <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">
2239                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
2240                         <field name="id" reporter:datatype="id" />
2241                         <field name="field" reporter:datatype="link"/>
2242                         <field name="source" reporter:datatype="link"/>
2243                         <field name="value"  reporter:datatype="text"/>
2244                 </fields>
2245                 <links>
2246                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2247                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2248                 </links>
2249         </class>
2250         <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">
2251                 <oils_persist:source_definition>
2252                         SELECT * FROM metabib.author_field_entry
2253                                                 UNION ALL
2254                         SELECT * FROM metabib.keyword_field_entry
2255                                                 UNION ALL
2256                         SELECT * FROM metabib.identifier_field_entry
2257                                                 UNION ALL
2258                         SELECT * FROM metabib.title_field_entry
2259                                                 UNION ALL
2260                         SELECT * FROM metabib.subject_field_entry
2261                                                 UNION ALL
2262                         SELECT * FROM metabib.series_field_entry
2263                 </oils_persist:source_definition>
2264                 <fields>
2265                         <field name="field" reporter:datatype="link"/>
2266                         <field name="id" reporter:datatype="id" />
2267                         <field name="source" reporter:datatype="link"/>
2268                         <field name="value"  reporter:datatype="text"/>
2269                 </fields>
2270                 <links>
2271                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2272                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2273                 </links>
2274         </class>
2275         <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">
2276                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
2277                         <field name="field" reporter:datatype="link"/>
2278                         <field name="id" reporter:datatype="id" />
2279                         <field name="source" reporter:datatype="link"/>
2280                         <field name="value"  reporter:datatype="text"/>
2281                 </fields>
2282                 <links>
2283                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2284                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2285                 </links>
2286         </class>
2287         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
2288                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2289                         <field name="accepting_usr" reporter:datatype="link"/>
2290                         <field name="amount" reporter:datatype="money" />
2291                         <field name="amount_collected" reporter:datatype="money" />
2292                         <field name="cash_drawer" reporter:datatype="link"/>
2293                         <field name="id" reporter:datatype="id" />
2294                         <field name="note"  reporter:datatype="text"/>
2295                         <field name="payment_ts" reporter:datatype="timestamp"/>
2296                         <field name="xact" reporter:datatype="link"/>
2297                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2298                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2299                 </fields>
2300                 <links>
2301                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2302                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2303                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2304                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2305                 </links>
2306         </class>
2307         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
2308                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2309                         <field name="accepting_usr" reporter:datatype="link"/>
2310                         <field name="amount" reporter:datatype="money" />
2311                         <field name="amount_collected" reporter:datatype="money" />
2312                         <field name="id" reporter:datatype="id" />
2313                         <field name="note"  reporter:datatype="text"/>
2314                         <field name="payment_ts" reporter:datatype="timestamp"/>
2315                         <field name="xact" reporter:datatype="link"/>
2316                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2317                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2318                 </fields>
2319                 <links>
2320                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2321                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2322                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2323                 </links>
2324         </class>
2325         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
2326                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
2327                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
2328                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2329                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2330                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
2331                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2332                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2333                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
2334                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2335                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
2336                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2337                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2338                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
2339                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2340                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
2341                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
2342                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
2343                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
2344                 </fields>
2345                 <links>
2346                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2347                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
2348                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
2349                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
2350                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
2351                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
2352                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
2353                 </links>
2354         </class>
2355
2356         <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">
2357                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
2358                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2359                         <field name="name"  reporter:datatype="text"/>
2360                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
2361                         <field name="block_list" reporter:datatype="text"/>
2362                         <field name="org_depth" reporter:datatype="int"/>
2363                 </fields>
2364                 <links/>
2365         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2366             <actions>
2367                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2368                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
2369                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2370                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2371             </actions>
2372         </permacrud>
2373         </class>
2374         <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">
2375                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
2376                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
2377                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
2378                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
2379                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
2380                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
2381                 </fields>
2382                 <links>
2383                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
2384                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
2385                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2386         </links>
2387         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2388             <actions>
2389                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2390                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2391                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2392                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2393             </actions>
2394         </permacrud>
2395         </class>
2396         <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">
2397                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
2398                         <field name="holdable" reporter:datatype="bool"/>
2399                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2400                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2401                         <field name="opac_visible" reporter:datatype="bool"/>
2402                 </fields>
2403                 <links/>
2404         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2405             <actions>
2406                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
2407                 <retrieve/>
2408                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
2409                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
2410             </actions>
2411         </permacrud>
2412         </class>
2413         <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">
2414                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
2415                         <field name="id" reporter:datatype="id" reporter:label="ID" />
2416                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
2417                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
2418                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
2419                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
2420                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
2421                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
2422                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
2423                 </fields>
2424                 <links>
2425                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2426                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2427                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2428                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
2429                 </links>
2430                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2431                         <actions>
2432                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
2433                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
2434                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
2435                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
2436                         </actions>
2437                 </permacrud>
2438         </class>
2439         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
2440                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
2441                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
2442                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
2443                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
2444                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
2445                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
2446                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
2447                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
2448                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
2449                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
2450                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2451                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
2452                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
2453                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
2454                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
2455                 </fields>
2456                 <links>
2457                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2458                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
2459                 </links>
2460         </class>
2461
2462         <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">
2463                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
2464                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2465                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
2466                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2467                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
2468                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
2469                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
2470                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
2471                 </fields>
2472                 <links>
2473                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
2474                 </links>
2475                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2476                         <actions>
2477                                 <create permission="ADMIN_HARD_DUE_DATE" global_required="true" />
2478                                 <retrieve />
2479                                 <update permission="ADMIN_HARD_DUE_DATE" global_required="true" />
2480                                 <delete permission="ADMIN_HARD_DUE_DATE" global_required="true" />
2481                         </actions>
2482                 </permacrud>
2483         </class>
2484
2485         <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">
2486                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
2487                         <field name="call_number" />
2488                         <field name="create_date" reporter:datatype="timestamp"/>
2489                         <field name="creator" reporter:datatype="link"/>
2490                         <field name="id" reporter:datatype="id" />
2491                         <field name="pub" reporter:datatype="bool"/>
2492                         <field name="title"  reporter:datatype="text"/>
2493                         <field name="value"  reporter:datatype="text"/>
2494                 </fields>
2495                 <links>
2496                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2497                 </links>
2498         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2499             <actions>
2500                 <create permission="CREATE_VOLUME_NOTE">
2501                     <context link="call_number" field="owning_lib"/>
2502                 </create>
2503                 <retrieve permission="VIEW_VOLUME_NOTES">
2504                     <context link="call_number" field="owning_lib"/>
2505                 </retrieve>
2506                 <update permission="UPDATE_VOLUME_NOTE">
2507                     <context link="call_number" field="owning_lib"/>
2508                 </update>
2509                 <delete permission="DELETE_VOLUME_NOTE">
2510                     <context link="call_number" field="owning_lib"/>
2511                 </delete>
2512             </actions>
2513         </permacrud>
2514         </class>
2515         <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">
2516                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
2517                         <field name="create_date" reporter:datatype="timestamp"/>
2518                         <field name="creator" reporter:datatype="link"/>
2519                         <field name="edit_date" reporter:datatype="timestamp"/>
2520                         <field name="editor" reporter:datatype="link"/>
2521                         <field name="id" reporter:datatype="id" />
2522                         <field name="record" reporter:datatype="link"/>
2523                         <field name="value" reporter:datatype="text"/>
2524                 </fields>
2525                 <links>
2526                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2527                 </links>
2528         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2529             <actions>
2530                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2531                 <retrieve/>
2532                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2533                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2534             </actions>
2535         </permacrud>
2536         </class>
2537         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
2538         <oils_persist:source_definition>
2539 SELECT  usr,
2540         SUM(
2541             CASE
2542                 WHEN (
2543                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
2544                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
2545                 ) THEN 1
2546                 ELSE 0
2547             END
2548         ) AS out,
2549
2550         SUM(
2551             CASE
2552                 WHEN (
2553                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
2554                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
2555                 ) THEN 1
2556                 ELSE 0
2557             END
2558         ) AS overdue,
2559
2560         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
2561         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
2562         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
2563   FROM  action.circulation
2564   WHERE checkin_time IS NULL
2565   GROUP BY 1
2566         </oils_persist:source_definition>
2567         <fields oils_persist:primary="usr">
2568             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
2569             <field reporter:label="Out" name="out" reporter:datatype="text"/>
2570             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
2571             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
2572             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
2573             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
2574         </fields>
2575         <links>
2576             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2577         </links>
2578         </class>
2579         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
2580         <oils_persist:source_definition>
2581 SELECT  usr,
2582         ARRAY_TO_STRING(ARRAY_ACCUM(
2583             CASE
2584                 WHEN (
2585                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
2586                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
2587                 ) THEN id
2588                 ELSE 0
2589             END
2590         ),',') AS out,
2591
2592         ARRAY_TO_STRING(ARRAY_ACCUM(
2593             CASE
2594                 WHEN (
2595                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
2596                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
2597                 ) THEN id
2598                 ELSE 0
2599             END
2600         ),',') AS overdue,
2601
2602         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END),',') AS lost,
2603         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END),',') AS claims_returned,
2604         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id ELSE 0 END),',') AS long_overdue
2605   FROM  action.circulation
2606   WHERE checkin_time IS NULL
2607   GROUP BY 1
2608         </oils_persist:source_definition>
2609         <fields oils_persist:primary="usr">
2610             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
2611             <field reporter:label="Out" name="out" reporter:datatype="text"/>
2612             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
2613             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
2614             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
2615             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
2616         </fields>
2617         <links>
2618             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2619         </links>
2620         </class>
2621         <class id="circ" controller="open-ils.cstore" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
2622                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2623                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2624                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2625                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2626                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2627                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2628                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2629                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2630                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2631                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2632                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2633                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2634                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2635                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2636                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2637                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2638                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2639                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2640                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2641                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2642                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2643                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2644                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
2645                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2646                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2647                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2648                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2649                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
2650                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
2651                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
2652                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2653                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2654                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2655                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2656                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2657                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2658                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
2659                 </fields>
2660                 <links>
2661                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2662                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2663                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2664                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2665                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2666                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2667                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2668                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2669                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2670                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2671                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2672                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2673                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2674                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2675                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2676                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2677                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
2678                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
2679                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
2680                 </links>
2681         </class>
2682         <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">
2683                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2684                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2685                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2686                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2687                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2688                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2689                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2690                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2691                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2692                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2693                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2694                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2695                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2696                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2697                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2698                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2699                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2700                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2701                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2702                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2703                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2704                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2705                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
2706                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2707                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2708                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2709                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2710                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2711                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2712                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2713                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2714                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2715                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
2716                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
2717                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
2718                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
2719                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
2720                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
2721                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
2722                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
2723                 </fields>
2724                 <links>
2725                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2726                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2727                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2728                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2729                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2730                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2731                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2732                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2733                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2734                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2735                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2736                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2737                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2738                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2739                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
2740                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
2741                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2742                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2743                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
2744                 </links>
2745         </class>
2746         <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">
2747                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2748                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2749                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2750                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2751                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2752                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2753                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2754                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2755                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2756                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2757                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2758                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2759                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2760                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2761                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2762                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2763                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2764                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2765                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2766                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2767                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2768                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2769                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
2770                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2771                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2772                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2773                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2774                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
2775                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
2776                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
2777                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2778                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2779                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2780                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2781                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2782                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2783                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
2784                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
2785                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
2786                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
2787                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
2788                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
2789                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
2790                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
2791                 </fields>
2792                 <links>
2793                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2794                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2795                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2796                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2797                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2798                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2799                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2800                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2801                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2802                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2803                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2804                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2805                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2806                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2807                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
2808                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
2809                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2810                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2811                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
2812                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2813                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
2814                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
2815                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
2816                 </links>
2817         </class>
2818
2819         <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">
2820                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
2821                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2822                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
2823                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2824                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
2825                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
2826                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2827                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
2828                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
2829                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
2830                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
2831                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
2832                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2833                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
2834                 </fields>
2835                 <links>
2836                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2837                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2838                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
2839                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
2840                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
2841                 </links>
2842                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2843                         <actions>
2844                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
2845                                 <retrieve />
2846                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
2847                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
2848                         </actions>
2849                 </permacrud>
2850         </class>
2851
2852         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
2853                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
2854                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
2855                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2856                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
2857                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
2858                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
2859                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
2860                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
2861                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
2862                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2863                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
2864                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
2865                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
2866                 </fields>
2867                 <links>
2868                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2869                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
2870                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
2871                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
2872                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
2873                 </links>
2874                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2875                         <actions>
2876                                 <create permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
2877                                 <retrieve />
2878                                 <update permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
2879                                 <delete permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
2880                         </actions>
2881                 </permacrud>
2882         </class>
2883         
2884         <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">
2885                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
2886                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
2887                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2888                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
2889                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
2890                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
2891                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
2892                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2893                 </fields>
2894                 <links>
2895                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2896                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
2897                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
2898                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
2899                 </links>
2900                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2901                         <actions>
2902                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
2903                                 <retrieve />
2904                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
2905                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
2906                         </actions>
2907                 </permacrud>
2908         </class>
2909         
2910         <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">
2911                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
2912                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
2913                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2914                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
2915                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
2916                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2917                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2918                 </fields>
2919                 <links>
2920                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2921                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
2922                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
2923                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
2924                 </links>
2925                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2926                         <actions>
2927                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
2928                                 <retrieve />
2929                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
2930                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
2931                         </actions>
2932                 </permacrud>
2933         </class>
2934         
2935         <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">
2936                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
2937                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
2938                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
2939                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
2940                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
2941                 </fields>
2942                 <links>
2943                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
2944                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
2945                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
2946                 </links>
2947                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2948                         <actions>
2949                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
2950                                 <retrieve />
2951                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
2952                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
2953                         </actions>
2954                 </permacrud>
2955         </class>
2956         
2957         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
2958                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2959                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
2960                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2961                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
2962                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
2963                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
2964                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2965                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2966                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2967                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2968                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
2969                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2970                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
2971                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
2972                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
2973                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
2974                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
2975                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
2976                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
2977                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2978                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
2979                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
2980                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
2981                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
2982                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
2983                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
2984                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
2985                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
2986                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2987                 </fields>
2988                 <links>
2989                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2990                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2991                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2992                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2993                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2994                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
2995                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
2996                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
2997                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
2998                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
2999                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
3000                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
3001                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
3002                 </links>
3003                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3004                         <actions>
3005                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3006                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3007                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3008                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3009                         </actions>
3010                 </permacrud>
3011         </class>
3012         
3013         <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">
3014                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
3015                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
3016                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
3017                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
3018                 </fields>
3019                 <links>
3020                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3021                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
3022                 </links>
3023                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3024                         <actions>
3025                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3026                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3027                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3028                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3029                         </actions>
3030                 </permacrud>
3031         </class>
3032
3033         <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">
3034                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
3035                         <field name="bucket" reporter:datatype="link"/>
3036                         <field name="id" reporter:datatype="id" />
3037                         <field name="target_call_number" reporter:datatype="link" />
3038                         <field name="create_time" reporter:datatype="timestamp" />
3039                         <field name="pos" reporter:datatype="int" />
3040                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
3041                 </fields>
3042                 <links>
3043                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
3044                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
3045             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
3046                 </links>
3047         </class>
3048         <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">
3049                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
3050                         <field name="id" reporter:datatype="id" />
3051                         <field name="item" reporter:datatype="link"/>
3052                         <field name="note" reporter:datatype="text" />
3053                 </fields>
3054                 <links>
3055                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
3056                 </links>
3057         </class>
3058         <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">
3059                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
3060                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3061                         <field name="btype" reporter:datatype="text"/>
3062                         <field name="id" reporter:datatype="id" />
3063                         <field name="name" reporter:datatype="text"/>
3064                         <field name="owner" reporter:datatype="link"/>
3065                         <field name="pub" reporter:datatype="bool"/>
3066                         <field name="create_time" reporter:datatype="timestamp" />
3067                 </fields>
3068                 <links>
3069                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3070                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
3071                 </links>
3072         </class>
3073         <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">
3074                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
3075                         <field name="id" reporter:datatype="id" />
3076                         <field name="bucket" reporter:datatype="link"/>
3077                         <field name="note" reporter:datatype="text" />
3078                 </fields>
3079                 <links>
3080                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
3081                 </links>
3082         </class>
3083         <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">
3084                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
3085                         <field name="hold" reporter:datatype="link"/>
3086                         <field name="id" reporter:datatype="id" />
3087                         <field name="target_copy" reporter:datatype="link"/>
3088                 </fields>
3089                 <links>
3090                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3091                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3092                 </links>
3093         </class>
3094         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
3095                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
3096                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
3097                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
3098                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
3099                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
3100                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
3101                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
3102                 </fields>
3103                 <links>
3104                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3105                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
3106                 </links>
3107         </class>
3108         <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">
3109                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
3110                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
3111                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
3112                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
3113                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3114                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3115                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
3116                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
3117                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
3118                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3119                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
3120                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
3121                 </fields>
3122                 <links>
3123                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3124                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
3125                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
3126                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
3127                 </links>
3128         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3129             <actions>
3130                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
3131                 <retrieve/>
3132                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
3133                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
3134             </actions>
3135         </permacrud>
3136         </class>
3137
3138     <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">
3139         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
3140             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
3141             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
3142             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
3143             <field reporter:label="Position" name="position" reporter:datatype="int"/>
3144         </fields>
3145         <links>
3146             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3147             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
3148         </links>
3149         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3150             <actions>
3151                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3152                 <retrieve/>
3153                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3154                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3155             </actions>
3156         </permacrud>
3157     </class>
3158
3159         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
3160                 <fields>
3161                         <field name="sre_id" oils_persist:virtual="true" />
3162                         <field name="location" oils_persist:virtual="true" />
3163                         <field name="owning_lib" oils_persist:virtual="true" />
3164                         <field name="basic_holdings" oils_persist:virtual="true" />
3165                         <field name="basic_holdings_add" oils_persist:virtual="true" />
3166                         <field name="supplement_holdings" oils_persist:virtual="true" />
3167                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
3168                         <field name="index_holdings" oils_persist:virtual="true" />
3169                         <field name="index_holdings_add" oils_persist:virtual="true" />
3170                         <field name="online" oils_persist:virtual="true" />
3171                         <field name="missing" oils_persist:virtual="true" />
3172                         <field name="incomplete" oils_persist:virtual="true" />
3173                 </fields>
3174         </class>
3175
3176         <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">
3177                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
3178                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
3179                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
3180                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3181                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3182                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3183                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
3184                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3185                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3186                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3187                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
3188                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
3189                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
3190                 </fields>
3191                 <links>
3192                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3193                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3194                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3195                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3196                 </links>
3197                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3198                         <actions>
3199                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
3200                                 <retrieve/>
3201                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
3202                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
3203                         </actions>
3204                 </permacrud>
3205         </class>
3206
3207         <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">
3208                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
3209                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3210                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3211                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
3212                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3213                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3214                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3215                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
3216                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
3217                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
3218                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
3219                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
3220                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
3221                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
3222                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
3223                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
3224                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
3225                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
3226                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
3227                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
3228                 </fields>
3229                 <links>
3230                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3231                 </links>
3232                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3233                         <actions>
3234                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
3235                                         <context link="subscription" field="owning_lib" />
3236                                 </create>
3237                                 <retrieve />
3238                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
3239                                         <context link="subscription" field="owning_lib" />
3240                                 </update>
3241                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
3242                                         <context link="subscription" field="owning_lib" />
3243                                 </delete>
3244                         </actions>
3245                 </permacrud>
3246         </class>
3247
3248         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
3249                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
3250                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3251                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
3252                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3253                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3254                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
3255                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
3256                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
3257                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
3258                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
3259                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3260                 </fields>
3261                 <links>
3262                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3263                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
3264                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
3265                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
3266                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
3267                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
3268                 </links>
3269                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3270                         <actions>
3271                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3272                                 <retrieve />
3273                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3274                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3275                         </actions>
3276                 </permacrud>
3277         </class>
3278
3279         <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">
3280                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
3281                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3282                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3283                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3284                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3285                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3286                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3287                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3288                 </fields>
3289                 <links>
3290                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3291                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3292                 </links>
3293                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3294                 </permacrud>
3295         </class>
3296
3297         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
3298                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
3299                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3300                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
3301                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3302                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
3303                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3304                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
3305                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
3306                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
3307                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
3308                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
3309                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
3310                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
3311                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3312                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3313                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3314                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3315                 </fields>
3316                 <links>
3317                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
3318                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3319                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
3320                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
3321                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
3322                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
3323                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
3324                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
3325                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
3326                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
3327                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
3328                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
3329                 </links>
3330                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3331                         <actions>
3332                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3333                                 <retrieve />
3334                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3335                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3336                         </actions>
3337                 </permacrud>
3338         </class>
3339
3340         <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">
3341                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
3342                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3343                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3344                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3345                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3346                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3347                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3348                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3349                 </fields>
3350                 <links>
3351                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3352                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3353                 </links>
3354                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3355                         <actions>
3356                                 <create/>
3357                                 <retrieve/>
3358                                 <update/>
3359                                 <delete/>
3360                         </actions>
3361                 </permacrud>
3362         </class>
3363
3364         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
3365                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
3366                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3367                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3368                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
3369                 </fields>
3370                 <links>
3371                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3372                 </links>
3373                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3374                         <actions>
3375                                 <create permission="ADMIN_SERIAL_STREAM">
3376                                         <context link="distribution" field="holding_lib" />
3377                                 </create>
3378                                 <retrieve />
3379                                 <update permission="ADMIN_SERIAL_STREAM">
3380                                         <context link="distribution" field="holding_lib" />
3381                                 </update>
3382                                 <delete permission="ADMIN_SERIAL_STREAM">
3383                                         <context link="distribution" field="holding_lib" />
3384                                 </delete>
3385                         </actions>
3386                 </permacrud>
3387         </class>
3388
3389         <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">
3390                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
3391                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3392                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
3393                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
3394                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
3395                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
3396                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3397                 </fields>
3398                 <links>
3399                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
3400                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
3401                 </links>
3402                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3403                 </permacrud>
3404         </class>
3405
3406         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
3407                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
3408                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3409                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3410                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3411                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3412                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
3413                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3414                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
3415                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3416                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
3417                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
3418                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
3419                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
3420                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
3421                 </fields>
3422                 <links>
3423                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3424                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3425                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3426                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
3427                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
3428                 </links>
3429                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3430                         <actions>
3431                                 <create/>
3432                                 <retrieve/>
3433                                 <update/>
3434                                 <delete/>
3435                         </actions>
3436                 </permacrud>
3437         </class>
3438
3439         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
3440                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
3441                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3442                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
3443                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
3444                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3445                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
3446                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
3447                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3448                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
3449                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
3450                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
3451                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3452                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3453                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3454                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
3455                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3456                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
3457                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
3458                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
3459                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3460                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3461                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
3462                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
3463                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
3464                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
3465                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
3466                         <field reporter:label="Price" name="price" reporter:datatype="money" />
3467                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
3468                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
3469                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
3470                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
3471                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
3472                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
3473                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
3474                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
3475                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
3476                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3477                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3478                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3479                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
3480                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3481                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3482                 </fields>
3483                 <links>
3484                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
3485                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3486                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3487                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3488                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3489                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
3490                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3491                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
3492                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
3493                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
3494                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
3495                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
3496                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
3497                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
3498                 </links>
3499                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3500                         <actions>
3501                                 <create/>
3502                                 <retrieve/>
3503                                 <update/>
3504                                 <delete/>
3505                         </actions>
3506                 </permacrud>
3507         </class>
3508
3509         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
3510                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
3511                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3512                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3513                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3514                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3515                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
3516                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
3517                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
3518                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
3519                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
3520                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
3521                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
3522                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
3523                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3524                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
3525                 </fields>
3526                 <links>
3527                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3528                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3529                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
3530                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
3531                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
3532                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3533                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
3534                 </links>
3535                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3536                         <actions>
3537                                 <create/>
3538                                 <retrieve/>
3539                                 <update/>
3540                                 <delete/>
3541                         </actions>
3542                 </permacrud>
3543         </class>
3544
3545         <class id="sin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
3546                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
3547                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3548                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
3549                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3550                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3551                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3552                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3553                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3554                 </fields>
3555                 <links>
3556                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
3557                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3558                 </links>
3559                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3560                         <actions>
3561                                 <create/>
3562                                 <retrieve/>
3563                                 <update/>
3564                                 <delete/>
3565                         </actions>
3566                 </permacrud>
3567         </class>
3568
3569         <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">
3570                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
3571                         <field name="id" reporter:datatype="id" />
3572                         <field name="distribution" reporter:datatype="link"/>
3573                         <field name="generated_coverage" reporter:datatype="text"/>
3574                         <field name="textual_holdings" reporter:datatype="text"/>
3575                         <field name="show_generated" reporter:datatype="bool"/>
3576                 </fields>
3577                 <links>
3578                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3579                 </links>
3580                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3581                         <actions>
3582                                 <create/>
3583                                 <retrieve/>
3584                                 <update/>
3585                                 <delete/>
3586                         </actions>
3587                 </permacrud>
3588         </class>
3589
3590         <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">
3591                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
3592                         <field name="id" reporter:datatype="id" />
3593                         <field name="distribution" reporter:datatype="link"/>
3594                         <field name="generated_coverage" reporter:datatype="text"/>
3595                         <field name="textual_holdings" reporter:datatype="text"/>
3596                         <field name="show_generated" reporter:datatype="bool"/>
3597                 </fields>
3598                 <links>
3599                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3600                 </links>
3601                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3602                         <actions>
3603                                 <create/>
3604                                 <retrieve/>
3605                                 <update/>
3606                                 <delete/>
3607                         </actions>
3608                 </permacrud>
3609         </class>
3610
3611         <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">
3612                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
3613                         <field name="id" reporter:datatype="id" />
3614                         <field name="distribution" reporter:datatype="link"/>
3615                         <field name="generated_coverage" reporter:datatype="text"/>
3616                         <field name="textual_holdings" reporter:datatype="text"/>
3617                         <field name="show_generated" reporter:datatype="bool"/>
3618                 </fields>
3619                 <links>
3620                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3621                 </links>
3622                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3623                         <actions>
3624                                 <create/>
3625                                 <retrieve/>
3626                                 <update/>
3627                                 <delete/>
3628                         </actions>
3629                 </permacrud>
3630         </class>
3631
3632         <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">
3633                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
3634                         <field name="id" reporter:datatype="id" />
3635                         <field name="owning_copy" reporter:datatype="link"/>
3636                         <field name="stat_cat" reporter:datatype="link"/>
3637                         <field name="stat_cat_entry" reporter:datatype="link"/>
3638                 </fields>
3639                 <links>
3640                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3641                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
3642                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
3643                 </links>
3644         </class>
3645         <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">
3646                 <fields oils_persist:primary="code">
3647                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
3648                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3649                 </fields>
3650                 <links/>
3651         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3652             <actions>
3653                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
3654                 <retrieve/>
3655                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
3656                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
3657             </actions>
3658         </permacrud>
3659         </class>
3660         <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">
3661                 <fields oils_persist:primary="code">
3662                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
3663                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3664                 </fields>
3665                 <links/>
3666         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3667             <actions>
3668                 <create permission="CREATE_MARC_CODE" global_required="true"/>
3669                 <retrieve/>
3670                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
3671                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
3672             </actions>
3673         </permacrud>
3674         </class>
3675         <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">
3676                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
3677                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
3678                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
3679                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
3680                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
3681                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
3682                 </fields>
3683                 <links>
3684             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3685         </links>
3686         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3687             <actions>
3688                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
3689                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
3690                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
3691                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
3692             </actions>
3693         </permacrud>
3694         </class>
3695         <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">
3696                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
3697                         <field name="id" reporter:datatype="id" />
3698                         <field name="name" reporter:datatype="text"/>
3699                 </fields>
3700                 <links/>
3701         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3702             <actions>
3703                 <create permission="CREATE_LASSO" global_required="true"/>
3704                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
3705                 <update permission="UPDATE_LASSO" global_required="true"/>
3706                 <delete permission="DELETE_LASSO" global_required="true"/>
3707             </actions>
3708         </permacrud>
3709         </class>
3710         <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">
3711                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
3712                         <field name="id" reporter:datatype="id" />
3713                         <field name="lasso" reporter:datatype="link"/>
3714                         <field name="org_unit" reporter:datatype="org_unit"/>
3715                 </fields>
3716                 <links>
3717                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
3718                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3719                 </links>
3720         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3721             <actions>
3722                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
3723                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
3724                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
3725                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
3726             </actions>
3727         </permacrud>
3728         </class>
3729         <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">
3730                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
3731                         <field name="id" reporter:datatype="id" />
3732                         <field name="from_org" reporter:datatype="org_unit"/>
3733                         <field name="to_org" reporter:datatype="org_unit"/>
3734                         <field name="prox" reporter:datatype="int" />
3735                 </fields>
3736                 <links>
3737                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
3738                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
3739                 </links>
3740         </class>
3741         <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">
3742                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
3743                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3744                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
3745                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
3746                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
3747                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
3748                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
3749                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
3750                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
3751                 </fields>
3752                 <links/>
3753         </class>
3754         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
3755                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
3756                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
3757                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
3758                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
3759                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
3760                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
3761                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3762                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
3763                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3764                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
3765                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
3766                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
3767                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
3768                 </fields>
3769                 <links>
3770                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3771                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
3772                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
3773                 </links>
3774         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3775             <actions>
3776                 <create permission="ADMIN_SURVEY" context_field="owner"/>
3777                 <retrieve/>
3778                 <update permission="ADMIN_SURVEY" context_field="owner"/>
3779                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
3780             </actions>
3781         </permacrud>
3782         </class>
3783         <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">
3784                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
3785                         <field name="address_type"  reporter:datatype="text"/>
3786                         <field name="city"  reporter:datatype="text"/>
3787                         <field name="country"  reporter:datatype="text"/>
3788                         <field name="county"  reporter:datatype="text"/>
3789                         <field name="id" reporter:datatype="id" />
3790                         <field name="org_unit" reporter:datatype="org_unit"/>
3791                         <field name="post_code"  reporter:datatype="text"/>
3792                         <field name="state"  reporter:datatype="text"/>
3793                         <field name="street1"  reporter:datatype="text"/>
3794                         <field name="street2"  reporter:datatype="text"/>
3795                         <field name="valid" reporter:datatype="bool"/>
3796                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
3797                 </fields>
3798                 <links>
3799                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3800                 </links>
3801         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3802             <actions>
3803                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
3804                 <retrieve/>
3805                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
3806                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
3807             </actions>
3808         </permacrud>
3809         </class>
3810         <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">
3811                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
3812                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
3813                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
3814                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
3815                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
3816                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
3817                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
3818                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
3819                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
3820                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
3821                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
3822                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
3823                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
3824                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
3825                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
3826                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
3827                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
3828                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
3829                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
3830                         <field reporter:label="Item Selection Depth" name="selection_depth" />
3831                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
3832                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
3833                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
3834                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
3835                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
3836                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
3837                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
3838                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
3839                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
3840                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
3841                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
3842                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
3843                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
3844                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
3845                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
3846                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
3847                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
3848                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
3849                 </fields>
3850                 <links>
3851                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
3852                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
3853                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
3854                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
3855                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
3856                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
3857                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3858                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
3859                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
3860                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
3861                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
3862                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
3863                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
3864                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
3865                 </links>
3866         </class>
3867         <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">
3868                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
3869                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3870                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
3871                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3872                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
3873                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
3874                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
3875                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
3876                 </fields>
3877                 <links>
3878                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3879                 </links>
3880                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3881                         <actions>
3882                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
3883                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
3884                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
3885                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
3886                         </actions>
3887                 </permacrud>
3888         </class>
3889         <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">
3890                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
3891                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3892                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
3893                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
3894                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
3895                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
3896                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3897                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3898                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
3899                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
3900                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
3901                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
3902                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
3903                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
3904                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
3905                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
3906                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
3907                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3908                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3909                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3910                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3911                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
3912                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3913                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
3914                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
3915                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3916                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
3917                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3918                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3919                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3920                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
3921                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
3922                 </fields>
3923                 <links>
3924                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
3925                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
3926                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
3927                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
3928                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
3929                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
3930                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
3931                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
3932                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
3933                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
3934                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
3935                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
3936                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
3937                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
3938                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
3939                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
3940                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
3941                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
3942                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
3943                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
3944                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
3945                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
3946                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
3947                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
3948                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
3949                 </links>
3950         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3951             <actions>
3952                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
3953                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT">
3954                     <context field="id"/>
3955                     <context field="parent_ou"/>
3956                                 </retrieve>
3957                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
3958                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
3959             </actions>
3960         </permacrud>
3961         </class>
3962         <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">
3963                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
3964                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3965                         <field name="btype" reporter:datatype="text"/>
3966                         <field name="id" reporter:datatype="id" />
3967                         <field name="name"  reporter:datatype="text"/>
3968                         <field name="owner" reporter:datatype="link"/>
3969                         <field name="pub" reporter:datatype="bool"/>
3970                         <field name="create_time" reporter:datatype="timestamp" />
3971                 </fields>
3972                 <links>
3973                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3974                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
3975                 </links>
3976         </class>
3977         <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">
3978                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
3979                         <field name="id" reporter:datatype="id" />
3980                         <field name="bucket" reporter:datatype="link"/>
3981                         <field name="note" reporter:datatype="text" />
3982                 </fields>
3983                 <links>
3984                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
3985                 </links>
3986         </class>
3987         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
3988                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
3989                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
3990                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3991                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3992                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
3993                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3994                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
3995                 </fields>
3996                 <links>
3997                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3998                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
3999                 </links>
4000         </class>
4001         <class id="ac" controller="open-ils.cstore" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
4002                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
4003                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
4004                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4005                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
4006                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4007                 </fields>
4008                 <links>
4009                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4010                 </links>
4011         </class>
4012         <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">
4013                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
4014                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4015                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4016                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4017                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4018                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4019                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
4020                 </fields>
4021                 <links>
4022                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4023                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
4024                 </links>
4025         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4026             <actions>
4027                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
4028                 <retrieve />
4029                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
4030                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
4031             </actions>
4032         </permacrud>
4033         </class>
4034         <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">
4035                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
4036                         <field name="field" reporter:datatype="link"/>
4037                         <field name="id" reporter:datatype="id" />
4038                         <field name="source" reporter:datatype="link"/>
4039                         <field name="value"  reporter:datatype="text"/>
4040                 </fields>
4041                 <links>
4042                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4043                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4044                 </links>
4045         </class>
4046         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
4047                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
4048                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4049                         <field name="btype" reporter:datatype="text"/>
4050                         <field name="id" reporter:datatype="id" />
4051                         <field name="name"  reporter:datatype="text"/>
4052                         <field name="owner" reporter:datatype="link"/>
4053                         <field name="pub" reporter:datatype="bool"/>
4054                         <field name="create_time" reporter:datatype="timestamp" />
4055                 </fields>
4056                 <links>
4057                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4058                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
4059                 </links>
4060         </class>
4061         <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">
4062                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
4063                         <field name="id" reporter:datatype="id" />
4064                         <field name="bucket" reporter:datatype="link"/>
4065                         <field name="note" reporter:datatype="text" />
4066                 </fields>
4067                 <links>
4068                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
4069                 </links>
4070         </class>
4071         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
4072                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4073                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4074                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4075                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4076                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
4077                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
4078                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4079                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
4080                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4081                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4082                 </fields>
4083                 <links>
4084                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4085                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4086                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4087                 </links>
4088         </class>
4089         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
4090                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
4091                         <field name="id" reporter:datatype="id" />
4092                         <field name="ind1" />
4093                         <field name="ind2" />
4094                         <field name="record" />
4095                         <field name="subfield" />
4096                         <field name="tag" />
4097                         <field name="value" />
4098                 </fields>
4099                 <links>
4100                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4101                 </links>
4102         </class>
4103         <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">
4104                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
4105                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
4106                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4107                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
4108                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4109                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
4110                 </fields>
4111                 <links>
4112                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4113                 </links>
4114         </class>
4115         <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">
4116                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
4117                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
4118                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
4119                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
4120                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
4121                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4122                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4123                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
4124                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
4125                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
4126                 </fields>
4127                 <links>
4128                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
4129                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
4130                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
4131                 </links>
4132         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4133             <actions>
4134                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
4135                 <retrieve/>
4136                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
4137                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
4138             </actions>
4139         </permacrud>
4140         </class>
4141         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
4142                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
4143                         <field name="create_date" reporter:datatype="timestamp"/>
4144                         <field name="creator" reporter:datatype="link"/>
4145                         <field name="edit_date" reporter:datatype="timestamp"/>
4146                         <field name="editor" reporter:datatype="link"/>
4147                         <field name="id" reporter:datatype="id" />
4148                         <field name="pub" reporter:datatype="bool"/>
4149                         <field name="record" reporter:datatype="link"/>
4150                         <field name="value"  reporter:datatype="text"/>
4151                 </fields>
4152                 <links>
4153                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4154                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4155                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4156                 </links>
4157         </class>
4158         <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">
4159                 <fields oils_persist:primary="usr" oils_persist:sequence="">
4160                         <field name="balance_owed" reporter:datatype="money" />
4161                         <field name="total_owed" reporter:datatype="money" />
4162                         <field name="total_paid" reporter:datatype="money" />
4163                         <field name="usr" reporter:datatype="link"/>
4164                 </fields>
4165                 <links>
4166                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4167                 </links>
4168         </class>
4169         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
4170                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4171                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
4172                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4173                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
4174                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4175                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
4176                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
4177                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4178                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4179                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4180                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4181                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4182                 </fields>
4183                 <links>
4184                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4185                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4186                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4187                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4188                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
4189                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4190                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4191                 </links>
4192         </class>
4193         <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">
4194                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
4195                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
4196                         <field name="quality" reporter:datatype="int" />
4197                         <field name="source" reporter:datatype="text"/>
4198                         <field name="transcendant" reporter:datatype="bool"/>
4199                 </fields>
4200                 <links/>
4201         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4202             <actions>
4203                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
4204                 <retrieve/>
4205                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
4206                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
4207             </actions>
4208         </permacrud>
4209         </class>
4210         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
4211                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4212                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4213                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4214                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4215                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4216                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4217                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
4218                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
4219                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4220                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4221                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4222                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4223                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4224                 </fields>
4225                 <links>
4226                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
4227                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
4228                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4229                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4230                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4231                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4232                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4233                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4234                 </links>
4235         </class>
4236         <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">
4237                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
4238                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
4239                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
4240                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
4241                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
4242                 </fields>
4243                 <links>
4244                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
4245                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4246                 </links>
4247         </class>
4248         <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">
4249                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
4250                         <field name="bucket" reporter:datatype="link"/>
4251                         <field name="id" reporter:datatype="id" />
4252                         <field name="target_user" reporter:datatype="link"/>
4253                         <field name="create_time" reporter:datatype="timestamp" />
4254                         <field name="pos" reporter:datatype="int" />
4255                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4256                 </fields>
4257                 <links>
4258                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
4259                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
4260             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
4261                 </links>
4262         </class>
4263         <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">
4264                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
4265                         <field name="id" reporter:datatype="id" />
4266                         <field name="item" reporter:datatype="link"/>
4267                         <field name="note" reporter:datatype="text" />
4268                 </fields>
4269                 <links>
4270                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
4271                 </links>
4272         </class>
4273         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
4274                 <fields oils_persist:primary="usr" oils_persist:sequence="">
4275                         <field name="balance_owed" reporter:datatype="money" />
4276                         <field name="total_owed" reporter:datatype="money" />
4277                         <field name="total_paid" reporter:datatype="money" />
4278                         <field name="usr" reporter:datatype="link"/>
4279                 </fields>
4280                 <links>
4281                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4282                 </links>
4283         </class>
4284         <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">
4285                 <fields oils_persist:primary="code" oils_persist:sequence="">
4286                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
4287                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4288                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
4289                 </fields>
4290                 <links/>
4291         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4292             <actions>
4293                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4294                 <retrieve/>
4295                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4296                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4297             </actions>
4298         </permacrud>
4299         </class>
4300         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
4301                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4302                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4303                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4304                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4305                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4306                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4307                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4308                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
4309                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4310                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4311                 </fields>
4312                 <links>
4313                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4314                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4315                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4316                 </links>
4317         </class>
4318         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
4319                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4320                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4321                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4322                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4323                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4324                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4325                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4326                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
4327                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4328                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4329                 </fields>
4330                 <links>
4331                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4332                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4333                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4334                 </links>
4335         </class>
4336         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
4337                 <fields oils_persist:primary="id" oils_persist:sequence="">
4338                         <field name="checkin_lib" reporter:datatype="link"/>
4339                         <field name="checkin_staff" reporter:datatype="link"/>
4340                         <field name="checkin_time" reporter:datatype="timestamp"/>
4341                         <field name="circ_lib"  reporter:datatype="org_unit"/>
4342                         <field name="circ_staff" reporter:datatype="link"/>
4343                         <field name="desk_renewal" reporter:datatype="bool"/>
4344                         <field name="due_date" reporter:datatype="timestamp"/>
4345                         <field name="duration" reporter:datatype="interval"/>
4346                         <field name="duration_rule" reporter:datatype="link"/>
4347                         <field name="fine_interval" reporter:datatype="interval"/>
4348                         <field name="id" reporter:datatype="id" />
4349                         <field name="max_fine" reporter:datatype="money" />
4350                         <field name="max_fine_rule" reporter:datatype="link"/>
4351                         <field name="opac_renewal" reporter:datatype="bool"/>
4352                         <field name="phone_renewal" reporter:datatype="bool"/>
4353                         <field name="recurring_fine" reporter:datatype="money" />
4354                         <field name="recurring_fine_rule" reporter:datatype="link"/>
4355                         <field name="renewal_remaining" reporter:datatype="int" />
4356                         <field name="stop_fines" reporter:datatype="text"/>
4357                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
4358                         <field name="target_copy" reporter:datatype="link"/>
4359                         <field name="usr" reporter:datatype="link"/>
4360                         <field name="xact_finish" reporter:datatype="timestamp" />
4361                         <field name="xact_start" reporter:datatype="timestamp" />
4362                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
4363                 </fields>
4364                 <links>
4365                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
4366                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4367                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4368                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4369                 </links>
4370         </class>
4371         <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">
4372                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
4373                         <field name="field" reporter:datatype="link"/>
4374                         <field name="id" reporter:datatype="id" />
4375                         <field name="source" reporter:datatype="link"/>
4376                         <field name="value" reporter:datatype="text"/>
4377                 </fields>
4378                 <links>
4379                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4380                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4381                 </links>
4382         </class>
4383         <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">
4384                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
4385                         <field name="high" reporter:datatype="money" />
4386                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
4387                         <field name="low" reporter:datatype="money" />
4388                         <field name="name" reporter:datatype="text"/>
4389                         <field name="normal" reporter:datatype="money" />
4390                         <field name="recurrence_interval" reporter:datatype="interval"/>
4391                 </fields>
4392                 <links/>
4393         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4394             <actions>
4395                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
4396                 <retrieve/>
4397                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
4398                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
4399             </actions>
4400         </permacrud>
4401         </class>
4402         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
4403                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4404                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4405                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4406                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4407                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
4408                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
4409                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4410                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4411                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4412                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
4413                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4414                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4415                 </fields>
4416                 <links>
4417                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4418                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4419                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4420                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4421                 </links>
4422         </class>
4423         <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">
4424                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4425                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4426                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4427                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4428                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4429                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4430                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4431                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4432                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4433                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4434                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4435                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4436                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4437                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4438                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4439                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4440                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4441                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4442                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4443                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4444                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4445                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4446                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
4447                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4448                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4449                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4450                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4451                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4452                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4453                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4454                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4455                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4456                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4457                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4458                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4459                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4460                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4461                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4462                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4463                 </fields>
4464                 <links>
4465                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4466                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4467                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4468                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4469                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4470                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4471                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4472                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4473                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4474                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4475                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4476                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4477                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4478                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4479                 </links>
4480         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4481             <actions>
4482                 <create permission="CREATE_COPY">
4483                     <context link="call_number" field="owning_lib"/>
4484                 </create>
4485                 <retrieve/>
4486                 <update permission="UPDATE_COPY">
4487                     <context link="call_number" field="owning_lib"/>
4488                 </update>
4489                 <delete permission="DELETE_COPY">
4490                     <context link="call_number" field="owning_lib"/>
4491                 </delete>
4492             </actions>
4493         </permacrud>
4494         </class>
4495
4496         <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">
4497                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
4498                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
4499                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
4500                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4501                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4502                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4503                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4504                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4505                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
4506                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
4507                         <field reporter:label="Location" name="location" reporter:datatype="int"/>
4508                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4509                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4510                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
4511                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
4512                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
4513                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
4514                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
4515                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4516                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
4517                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
4518                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
4519                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4520                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4521                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
4522                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
4523                 </fields>
4524                 <links>
4525                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4526                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4527                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4528                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4529                 </links>
4530                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4531                         <actions>
4532                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
4533                                 <retrieve />
4534                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
4535                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
4536                         </actions>
4537                 </permacrud>
4538         </class>
4539
4540         <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">
4541                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
4542                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
4543                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4544                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
4545                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
4546                 </fields>
4547                 <links/>
4548         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4549             <actions>
4550                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
4551                 <retrieve/>
4552                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
4553                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
4554             </actions>
4555         </permacrud>
4556         </class>
4557         <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">
4558                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
4559                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
4560                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4561                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
4562                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
4563                 </fields>
4564                 <links/>
4565         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4566             <actions>
4567                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
4568                 <retrieve/>
4569                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
4570                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
4571             </actions>
4572         </permacrud>
4573         </class>
4574         <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">
4575                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
4576                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
4577                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4578                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4579                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4580                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
4581                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
4582                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
4583                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
4584                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
4585                 </fields>
4586                 <links>
4587                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
4588                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
4589                 </links>
4590         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4591             <actions>
4592                 <create permission="CREATE_PERM" global_required="true"/>
4593                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
4594                 <update permission="UPDATE_PERM" global_required="true"/>
4595                 <delete permission="DELETE_PERM" global_required="true"/>
4596             </actions>
4597         </permacrud>
4598         </class>
4599         <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">
4600                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
4601                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
4602                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
4603                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
4604                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
4605                 </fields>
4606                 <links>
4607                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
4608                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
4609                 </links>
4610         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4611             <actions>
4612                 <create permission="ADMIN_SURVEY">
4613                     <context link="question" jump="survey" field="owner"/>
4614                 </create>
4615                 <retrieve/>
4616                 <update permission="ADMIN_SURVEY">
4617                     <context link="question" jump="survey" field="owner"/>
4618                 </update>
4619                 <delete permission="ADMIN_SURVEY">
4620                     <context link="question" jump="survey" field="owner"/>
4621                 </delete>
4622             </actions>
4623         </permacrud>
4624         </class>
4625         <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">
4626                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
4627                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4628                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
4629                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
4630                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
4631                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
4632                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
4633                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
4634                 </fields>
4635                 <links>
4636                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
4637                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
4638                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
4639                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4640                 </links>
4641         </class>
4642         <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">
4643                 <fields oils_persist:primary="usr" oils_persist:sequence="">
4644                         <field name="balance_owed" reporter:datatype="money" />
4645                         <field name="total_owed" reporter:datatype="money" />
4646                         <field name="total_paid" reporter:datatype="money" />
4647                         <field name="usr" reporter:datatype="link"/>
4648                 </fields>
4649                 <links>
4650                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4651                 </links>
4652         </class>
4653         <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">
4654                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
4655                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
4656                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
4657                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
4658                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4659                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
4660                 </fields>
4661                 <links>
4662                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4663                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4664                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4665                 </links>
4666         </class>
4667         <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">
4668                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
4669                         <field name="field" reporter:datatype="link"/>
4670                         <field name="id" reporter:datatype="id" />
4671                         <field name="source" reporter:datatype="link"/>
4672                         <field name="value" reporter:datatype="text"/>
4673                 </fields>
4674                 <links>
4675                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4676                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4677                 </links>
4678         </class>
4679         <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">
4680                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
4681                         <field name="field" reporter:datatype="link"/>
4682                         <field name="id" reporter:datatype="id" />
4683                         <field name="source" reporter:datatype="link"/>
4684                         <field name="value" reporter:datatype="text"/>
4685                 </fields>
4686                 <links>
4687                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4688                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4689                 </links>
4690         </class>
4691         <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">
4692                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
4693                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
4694                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
4695                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
4696                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
4697                 </fields>
4698                 <links>
4699                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
4700                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
4701                 </links>
4702         </class>
4703         <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">
4704                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
4705                         <field name="depth" reporter:datatype="int" />
4706                         <field name="grantable" reporter:datatype="bool"/>
4707                         <field name="grp" reporter:datatype="link"/>
4708                         <field name="id" reporter:datatype="id" />
4709                         <field name="perm" reporter:datatype="link"/>
4710                 </fields>
4711                 <links>
4712                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4713                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
4714                 </links>
4715         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4716             <actions>
4717                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
4718                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
4719                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
4720                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
4721             </actions>
4722         </permacrud>
4723         </class>
4724         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
4725                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
4726                         <field name="items" oils_persist:virtual="true" />
4727                         <field name="btype" reporter:datatype="text"/>
4728                         <field name="id" reporter:datatype="id" />
4729                         <field name="name" reporter:datatype="text"/>
4730                         <field name="owner" reporter:datatype="link"/>
4731                         <field name="pub" reporter:datatype="bool"/>
4732                         <field name="create_time" reporter:datatype="timestamp" />
4733                 </fields>
4734                 <links>
4735                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4736                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
4737                 </links>
4738         </class>
4739         <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">
4740                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
4741                         <field name="id" reporter:datatype="id" />
4742                         <field name="bucket" reporter:datatype="link"/>
4743                         <field name="note" reporter:datatype="text" />
4744                 </fields>
4745                 <links>
4746                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
4747                 </links>
4748         </class>
4749         <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">
4750                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
4751                         <field name="id" reporter:datatype="int" />
4752                         <field name="usr" reporter:datatype="link"/>
4753                         <field name="work_ou" reporter:datatype="link"/>
4754                 </fields>
4755                 <links>
4756                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4757                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
4758                 </links>
4759         </class>
4760         <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">
4761                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
4762                         <field name="depth" reporter:datatype="int"/>
4763                         <field name="grantable" reporter:datatype="bool"/>
4764                         <field name="id" reporter:datatype="id" />
4765                         <field name="perm" reporter:datatype="link"/>
4766                         <field name="usr" reporter:datatype="link"/>
4767                 </fields>
4768                 <links>
4769                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4770                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
4771                 </links>
4772         </class>
4773         <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">
4774                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
4775                         <field name="object_id" reporter:datatype="text"/>
4776                         <field name="grantable" reporter:datatype="bool"/>
4777                         <field name="id" reporter:datatype="id" />
4778                         <field name="perm" reporter:datatype="link"/>
4779                         <field name="usr" reporter:datatype="link"/>
4780                         <field name="object_type" reporter:datatype="text"/>
4781                 </fields>
4782                 <links>
4783                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4784                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
4785                 </links>
4786         </class>
4787         <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">
4788                 <fields oils_persist:primary="id" oils_persist:sequence="">
4789                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4790                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4791                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4792                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4793                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4794                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4795                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4796                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4797                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4798                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4799                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4800                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4801                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4802                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4803                 </fields>
4804                 <links>
4805                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
4806                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
4807                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
4808                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
4809                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
4810                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
4811                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
4812                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4813                 </links>
4814         </class>
4815         <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">
4816                 <fields oils_persist:primary="id" oils_persist:sequence="">
4817                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4818                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4819                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4820                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4821                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4822                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4823                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4824                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4825                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4826                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4827                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4828                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4829                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4830                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4831                 </fields>
4832                 <links>
4833                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
4834                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
4835                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
4836                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
4837                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
4838                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
4839                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
4840                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4841                 </links>
4842         </class>
4843         <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">
4844                 <fields oils_persist:primary="id" oils_persist:sequence="">
4845                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4846                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4847                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4848                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4849                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4850                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4851                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4852                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4853                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4854                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4855                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4856                 </fields>
4857                 <links>
4858                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
4859                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
4860                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
4861                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
4862                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4863                 </links>
4864         </class>
4865         <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">
4866                 <fields oils_persist:primary="id" oils_persist:sequence="">
4867                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4868                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4869                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4870                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4871                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4872                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4873                         <field reporter:label="Accepting User" name="accepting_usr" />
4874                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
4875                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4876                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4877                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4878                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4879                 </fields>
4880                 <links>
4881                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
4882                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
4883                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
4884                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4885                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4886                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4887                 </links>
4888         </class>
4889         <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">
4890                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
4891                         <field name="bucket" reporter:datatype="link"/>
4892                         <field name="id" reporter:datatype="id" />
4893                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
4894                         <field name="create_time" reporter:datatype="timestamp" />
4895                         <field name="pos" reporter:datatype="int" />
4896                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4897                 </fields>
4898                 <links>
4899                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
4900                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4901             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
4902                 </links>
4903         </class>
4904         <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">
4905                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
4906                         <field name="id" reporter:datatype="id" />
4907                         <field name="item" reporter:datatype="link"/>
4908                         <field name="note" reporter:datatype="text" />
4909                 </fields>
4910                 <links>
4911                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
4912                 </links>
4913         </class>
4914         <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">
4915                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
4916                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
4917                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
4918                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
4919                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
4920                 </fields>
4921                 <links>
4922                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4923                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4924                 </links>
4925         </class>
4926
4927         <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">
4928                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
4929                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
4930                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
4931                 </fields>
4932                 <links/>
4933         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4934             <actions>
4935                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
4936                 <retrieve/>
4937                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
4938                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
4939             </actions>
4940         </permacrud>
4941         </class>
4942
4943
4944         <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">
4945                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
4946                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
4947                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
4948                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
4949                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
4950                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
4951                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
4952                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
4953                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
4954                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
4955                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
4956                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
4957                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
4958                 </fields>
4959                 <links>
4960                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
4961                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
4962                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
4963                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
4964                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
4965                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
4966                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4967                 </links>
4968         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4969             <actions>
4970                 <create permission="TRANSIT_COPY">
4971                     <context link="target_copy" field="owner"/>
4972                 </create>
4973                 <retrieve/>
4974                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
4975                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
4976             </actions>
4977         </permacrud>
4978         </class>
4979         <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">
4980                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
4981                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
4982                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
4983                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
4984                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
4985                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
4986                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
4987                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
4988                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
4989                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
4990                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
4991                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
4992                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
4993                 </fields>
4994                 <links>
4995                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
4996                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4997                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
4998                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
4999                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
5000                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
5001                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5002                 </links>
5003         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5004             <actions>
5005                 <create permission="TRANSIT_COPY" context_field="owner">
5006                     <context link="target_copy" field="circ_lib"/>
5007                 </create>
5008                 <retrieve/>
5009                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
5010                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
5011             </actions>
5012         </permacrud>
5013         </class>
5014         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
5015                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
5016                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5017                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
5018                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
5019                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
5020                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5021                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
5022                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5023                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
5024                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5025                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
5026                 </fields>
5027                 <links>
5028                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5029                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
5030                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
5031                 </links>
5032         </class>
5033         <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">
5034                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
5035                         <field name="grp" />
5036                         <field name="id" reporter:datatype="id" />
5037                         <field name="usr" />
5038                 </fields>
5039                 <links>
5040                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
5041                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5042                 </links>
5043         </class>
5044         <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">
5045                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
5046                         <field name="id" reporter:datatype="id" />
5047                         <field name="fq_field" reporter:datatype="text"/>
5048                         <field name="identity_value" reporter:datatype="text"/>
5049                         <field name="translation" reporter:datatype="text"/>
5050                         <field name="string" reporter:datatype="text"/>
5051                 </fields>
5052                 <links>
5053                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
5054                 </links>
5055         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5056             <actions>
5057                 <create permission="CREATE_TRANSLATION" global_required="true"/>
5058                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
5059                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
5060                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
5061             </actions>
5062         </permacrud>
5063         </class>
5064         <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">
5065                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
5066                         <field name="id" reporter:datatype="id" />
5067                         <field name="fm_class" reporter:datatype="text"/>
5068                         <field name="field" reporter:datatype="text"/>
5069                         <field name="owner" reporter:datatype="org_unit"/>
5070                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
5071                 </fields>
5072                 <links>
5073                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5074                 </links>
5075         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5076             <actions>
5077                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5078                 <retrieve/>
5079                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5080                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5081             </actions>
5082         </permacrud>
5083         </class>
5084         <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">
5085                 <fields oils_persist:primary="code">
5086                         <field name="code" reporter:datatype="id" />
5087                         <field name="marc_code" reporter:datatype="text"/>
5088                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5089                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5090                 </fields>
5091                 <links/>
5092         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5093             <actions>
5094                 <create permission="CREATE_LOCALE" global_required="true"/>
5095                 <retrieve/>
5096                 <update permission="UPDATE_LOCALE" global_required="true"/>
5097                 <delete permission="DELETE_LOCALE" global_required="true"/>
5098             </actions>
5099         </permacrud>
5100         </class>
5101         <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">
5102                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
5103                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
5104                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
5105                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
5106             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
5107                 </fields>
5108                 <links>
5109                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5110                 </links>
5111         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5112             <actions>
5113                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
5114                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
5115                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
5116                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
5117             </actions>
5118         </permacrud>
5119         </class>
5120
5121         <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">
5122                 <fields oils_persist:primary="id">
5123                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
5124                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5125                 </fields>
5126                 <links/>
5127         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5128             <actions>
5129                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5130                 <retrieve/>
5131                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5132                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5133             </actions>
5134         </permacrud>
5135         </class>
5136
5137         <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">
5138                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
5139                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
5140                         <field reporter:label="User" name="usr" reporter:datatype="link" />
5141                         <field reporter:label="Request Type" name="request_type" reporter:datatype="link" />
5142                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
5143                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
5144                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
5145                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
5146                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
5147                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
5148                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
5149                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
5150                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
5151                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
5152                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
5153                         <field reporter:label="Title" name="title" reporter:datatype="text" />
5154                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
5155                         <field reporter:label="Author" name="author" reporter:datatype="text" />
5156                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
5157                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
5158                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
5159                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
5160                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
5161                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
5162                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
5163                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5164                 </fields>
5165                 <links>
5166                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5167                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5168                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5169                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
5170                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
5171                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5172                 </links>
5173         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5174             <actions>
5175                 <create permission="user_request.create">
5176                     <context link="usr" field="home_ou"/>
5177                                 </create>
5178                 <retrieve permission="user_request.view">
5179                     <context link="usr" field="home_ou"/>
5180                                 </retrieve>
5181                 <update permission="user_request.update">
5182                     <context link="usr" field="home_ou"/>
5183                                 </update>
5184                 <delete permission="user_request.delete">
5185                     <context link="usr" field="home_ou"/>
5186                                 </delete>
5187             </actions>
5188         </permacrud>
5189         </class>
5190
5191         <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">
5192                 <fields oils_persist:primary="code">
5193                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
5194                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5195                 </fields>
5196                 <links/>
5197         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5198             <actions>
5199                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5200                 <retrieve/>
5201                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5202                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5203             </actions>
5204         </permacrud>
5205         </class>
5206
5207         <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">
5208                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
5209                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
5210                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
5211                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
5212                         <field reporter:label="Ratio" name="ratio" />
5213                 </fields>
5214                 <links>
5215                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
5216                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
5217                 </links>
5218                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5219                         <actions>
5220                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5221                                 <retrieve/>
5222                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5223                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5224                         </actions>
5225                 </permacrud>
5226         </class>
5227
5228         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
5229                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
5230                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
5231                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
5232                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
5233                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
5234                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5235                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
5236                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
5237                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
5238                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
5239                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
5240                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
5241                         <field reporter:label="URL" name="url" reporter:datatype="text" />
5242                         <field reporter:label="Email" name="email" reporter:datatype="text" />
5243                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
5244                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
5245                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
5246                 </fields>
5247                 <links>
5248                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
5249                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5250             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
5251             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
5252             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
5253                 </links>
5254         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5255             <actions>
5256                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
5257                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
5258                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
5259                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
5260             </actions>
5261         </permacrud>
5262         </class>
5263
5264         <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">
5265                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
5266                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
5267                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5268                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5269                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5270                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5271                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5272                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
5273                 </fields>
5274                 <links>
5275                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5276                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5277                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5278                 </links>
5279         </class>
5280
5281         <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">
5282                 <fields oils_persist:primary="code">
5283                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
5284                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5285                 </fields>
5286                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5287             <actions>
5288                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5289                 <retrieve/>
5290                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5291                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5292             </actions>
5293                 </permacrud>
5294         </class>
5295
5296         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
5297                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
5298                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
5299                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
5300                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5301                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
5302                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
5303                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
5304                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
5305                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
5306                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
5307                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
5308                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5309                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
5310                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
5311                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
5312                 </fields>
5313                 <links>
5314                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
5315                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5316                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
5317                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
5318                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
5319                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
5320                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
5321                 </links>
5322         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5323             <actions>
5324                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
5325                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
5326                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
5327                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
5328             </actions>
5329         </permacrud>
5330         </class>
5331
5332         <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">
5333                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
5334                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5335                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
5336                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
5337                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
5338                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
5339                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
5340                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5341                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
5342                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
5343                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
5344                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
5345                 </fields>
5346                 <links>
5347                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
5348                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5349                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5350                 </links>
5351         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5352             <actions>
5353                 <create   permission="ADMIN_INVOICE">
5354                                         <context link="invoice" field="receiver"/>
5355                                 </create>
5356                 <retrieve permission="ADMIN_INVOICE">
5357                                         <context link="invoice" field="receiver"/>
5358                                 </retrieve>
5359                 <update   permission="ADMIN_INVOICE">
5360                                         <context link="invoice" field="receiver"/>
5361                                 </update>
5362                                 <delete   permission="ADMIN_INVOICE">
5363                                         <context link="invoice" field="receiver"/>
5364                                 </delete>
5365             </actions>
5366         </permacrud>
5367         </class>
5368
5369         <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">
5370                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
5371                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5372                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
5373                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
5374                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
5375                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
5376                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
5377                         <field reporter:label="Author" name="author" reporter:datatype="text" />
5378                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5379                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
5380                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
5381                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
5382                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
5383                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
5384                         <field reporter:label="Target" name="target" reporter:datatype="int" />
5385                 </fields>
5386                 <links>
5387                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
5388                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5389                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
5390                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
5391                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5392                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
5393                 </links>
5394         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5395             <actions>
5396                 <create   permission="ADMIN_INVOICE">
5397                                         <context link="invoice" field="receiver"/>
5398                                 </create>
5399                 <retrieve permission="ADMIN_INVOICE">
5400                                         <context link="invoice" field="receiver"/>
5401                                 </retrieve>
5402                 <update   permission="ADMIN_INVOICE">
5403                                         <context link="invoice" field="receiver"/>
5404                                 </update>
5405                                 <delete   permission="ADMIN_INVOICE">
5406                                         <context link="invoice" field="receiver"/>
5407                                 </delete>
5408             </actions>
5409         </permacrud>
5410         </class>
5411
5412         <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">
5413                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
5414                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
5415                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
5416                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
5417                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
5418                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5419                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5420                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
5421                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
5422                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
5423                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
5424                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
5425                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
5426                 </fields>
5427                 <links>
5428                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5429                 </links>
5430         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5431             <actions>
5432                 <create permission="ADMIN_PROVIDER">
5433                     <context link="provider" field="owner"/>
5434                 </create>
5435                 <retrieve permission="ADMIN_PROVIDER">
5436                     <context link="provider" field="owner"/>
5437                 </retrieve>
5438                 <update permission="ADMIN_PROVIDER">
5439                     <context link="provider" field="owner"/>
5440                 </update>
5441                 <delete permission="ADMIN_PROVIDER">
5442                     <context link="provider" field="owner"/>
5443                 </delete>
5444             </actions>
5445         </permacrud>
5446         </class>
5447
5448         <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">
5449                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
5450                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5451                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5452                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5453                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
5454                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
5455                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
5456         </fields>
5457                 <links>
5458                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5459                 </links>
5460         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5461             <actions>
5462                 <create permission="ADMIN_PROVIDER">
5463                     <context link="provider" field="owner"/>
5464                 </create>
5465                 <retrieve permission="ADMIN_PROVIDER">
5466                     <context link="provider" field="owner"/>
5467                 </retrieve>
5468                 <update permission="ADMIN_PROVIDER">
5469                     <context link="provider" field="owner"/>
5470                 </update>
5471                 <delete permission="ADMIN_PROVIDER">
5472                     <context link="provider" field="owner"/>
5473                 </delete>
5474             </actions>
5475         </permacrud>
5476     </class>
5477         <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">
5478                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
5479                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
5480                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
5481                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
5482                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
5483                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
5484                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
5485                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
5486                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
5487                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
5488                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
5489                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
5490                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
5491                 </fields>
5492                 <links>
5493                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
5494                 </links>
5495         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5496             <actions>
5497                 <create permission="ADMIN_PROVIDER">
5498                     <context link="contact" jump='provider' field="owner"/>
5499                 </create>
5500                 <retrieve permission="ADMIN_PROVIDER">
5501                     <context link="contact" jump='provider' field="owner"/>
5502                 </retrieve>
5503                 <update permission="ADMIN_PROVIDER">
5504                     <context link="contact" jump='provider' field="owner"/>
5505                 </update>
5506                 <delete permission="ADMIN_PROVIDER">
5507                     <context link="contact" jump='provider' field="owner"/>
5508                 </delete>
5509             </actions>
5510         </permacrud>
5511         </class>
5512
5513         <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">
5514                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
5515                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
5516                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
5517                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
5518                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
5519                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
5520                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
5521                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
5522                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5523                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
5524                 </fields>
5525                 <links>
5526                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
5527                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
5528                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
5529                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
5530                 </links>
5531                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5532                 </permacrud>
5533         </class>
5534
5535         <class id="acqfc" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
5536                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
5537                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
5538                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
5539                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
5540                 </fields>
5541                 <links>
5542             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
5543                 </links>
5544                 <!--
5545                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
5546                         But here's what it should look like if we ever do use pcrud.
5547                 -->
5548                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5549                         <actions>
5550                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5551                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5552                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5553                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5554                         </actions>
5555                 </permacrud>
5556         </class>
5557
5558         <class id="acqfy" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
5559                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
5560                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
5561                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
5562                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
5563                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
5564                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
5565                 </fields>
5566                 <links>
5567                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
5568                 </links>
5569                 <!--
5570                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
5571                         But here's what it should look like if we ever do use pcrud.
5572                 -->
5573                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5574                         <actions>
5575                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5576                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5577                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5578                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5579                         </actions>
5580                 </permacrud>
5581         </class>
5582
5583         <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">
5584                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
5585                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
5586                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
5587                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
5588                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
5589                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5590                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
5591                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
5592                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
5593                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5594                 </fields>
5595                 <links>
5596                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
5597                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5598             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
5599             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
5600                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
5601                 </links>
5602         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5603             <actions>
5604                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
5605                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
5606                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
5607                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
5608             </actions>
5609         </permacrud>
5610         </class>
5611
5612         <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">
5613                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
5614                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
5615                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
5616                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5617                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5618                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
5619                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
5620                 </fields>
5621                 <links>
5622                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5623                 </links>
5624                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5625                         <actions>
5626                                 <create permission="ADMIN_FUNDING_SOURCE">
5627                     <context link="funding_source" field="owner"/>
5628                 </create>
5629                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
5630                     <context link="funding_source" field="owner"/>
5631                 </retrieve>
5632                                 <update permission="ADMIN_FUNDING_SOURCE">
5633                     <context link="funding_source" field="owner"/>
5634                 </update>
5635                                 <delete permission="ADMIN_FUNDING_SOURCE">
5636                     <context link="funding_source" field="owner"/>
5637                 </delete>
5638                         </actions>
5639                 </permacrud>
5640         </class>
5641
5642         <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">
5643                 <fields oils_persist:primary="id">
5644                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
5645                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
5646                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
5647                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
5648                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
5649                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5650                 </fields>
5651                 <links>
5652                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5653                 </links>
5654                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5655                 </permacrud>
5656         </class>
5657
5658         <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">
5659                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
5660                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
5661                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5662                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
5663                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
5664                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5665                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
5666                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
5667                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
5668                 </fields>
5669                 <links>
5670                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5671                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
5672                 </links>
5673                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5674                         <actions>
5675                                 <create permission="ADMIN_ACQ_FUND">
5676                     <context link="fund" field="org"/>
5677                 </create>
5678                                 <retrieve permission="ADMIN_ACQ_FUND">
5679                     <context link="fund" field="org"/>
5680                 </retrieve>
5681                                 <update permission="ADMIN_ACQ_FUND">
5682                     <context link="fund" field="org"/>
5683                 </update>
5684                                 <delete permission="ADMIN_ACQ_FUND">
5685                     <context link="fund" field="org"/>
5686                 </delete>
5687                         </actions>
5688                 </permacrud>
5689         </class>
5690
5691         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
5692                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
5693                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
5694                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
5695                         <field reporter:label="Name" name="name" reporter:datatype="text" />
5696                         <field reporter:label="Year" name="year" reporter:datatype="int" />
5697                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
5698                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5699                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
5700                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
5701                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
5702                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
5703                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
5704                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
5705                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
5706                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
5707                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
5708                 </fields>
5709                 <links>
5710                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5711                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
5712             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
5713             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
5714             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
5715                 </links>
5716         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5717             <actions>
5718                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
5719                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
5720                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
5721                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
5722             </actions>
5723         </permacrud>
5724         </class>
5725
5726         <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">
5727                 <fields oils_persist:primary="fund">
5728                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5729                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
5730                 </fields>
5731                 <links>
5732                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5733                 </links>
5734         </class>
5735
5736         <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">
5737                 <fields oils_persist:primary="fund">
5738                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5739                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
5740                 </fields>
5741                 <links>
5742                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5743                 </links>
5744         </class>
5745
5746         <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">
5747                 <fields oils_persist:primary="fund">
5748                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5749                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
5750                 </fields>
5751                 <links>
5752                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5753                 </links>
5754         </class>
5755
5756         <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">
5757                 <fields oils_persist:primary="fund">
5758                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5759                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
5760                 </fields>
5761                 <links>
5762                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5763                 </links>
5764         </class>
5765
5766         <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">
5767                 <fields oils_persist:primary="fund">
5768                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5769                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
5770                 </fields>
5771                 <links>
5772                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5773                 </links>
5774         </class>
5775
5776    <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">
5777         <fields oils_persist:primary="fund">
5778             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5779             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
5780         </fields>
5781         <links>
5782             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5783         </links>
5784     </class>
5785
5786    <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">
5787         <fields oils_persist:primary="fund">
5788             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5789             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
5790         </fields>
5791         <links>
5792             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5793         </links>
5794     </class>
5795
5796    <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">
5797         <fields oils_persist:primary="fund">
5798             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5799             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
5800         </fields>
5801         <links>
5802             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5803         </links>
5804     </class>
5805
5806    <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">
5807         <fields oils_persist:primary="fund">
5808             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5809             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
5810         </fields>
5811         <links>
5812             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5813         </links>
5814     </class>
5815
5816    <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">
5817         <fields oils_persist:primary="fund">
5818             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5819             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
5820         </fields>
5821         <links>
5822             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5823         </links>
5824     </class>
5825
5826         <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">
5827                 <fields oils_persist:primary="funding_source">
5828                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5829                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
5830                 </fields>
5831                 <links>
5832                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5833                 </links>
5834         </class>
5835
5836         <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">
5837                 <fields oils_persist:primary="funding_source">
5838                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5839                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
5840                 </fields>
5841                 <links>
5842                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5843                 </links>
5844         </class>
5845
5846         <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">
5847                 <fields oils_persist:primary="funding_source">
5848                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5849                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
5850                 </fields>
5851                 <links>
5852                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5853                 </links>
5854         </class>
5855
5856         <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">
5857                 <fields oils_persist:primary="fund">
5858                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5859                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
5860                 </fields>
5861                 <links>
5862                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5863                 </links>
5864         </class>
5865
5866         <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">
5867                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
5868                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
5869                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
5870                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5871                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5872                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
5873                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5874                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
5875                 </fields>
5876                 <links>
5877                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
5878                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5879                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5880                 </links>
5881                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5882                         <actions>
5883                                 <create permission="ADMIN_ACQ_FUND">
5884                     <context link="fund" field="org"/>
5885                 </create>
5886                                 <retrieve permission="ADMIN_ACQ_FUND">
5887                     <context link="fund" field="org"/>
5888                 </retrieve>
5889                                 <update permission="ADMIN_ACQ_FUND">
5890                     <context link="fund" field="org"/>
5891                 </update>
5892                                 <delete permission="ADMIN_ACQ_FUND">
5893                     <context link="fund" field="org"/>
5894                 </delete>
5895                         </actions>
5896                 </permacrud>
5897         </class>
5898
5899     <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">
5900         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
5901             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
5902             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5903             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
5904             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
5905             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
5906             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
5907             <field reporter:label="Note" name="note" reporter:datatype="text" />
5908             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
5909         </fields>
5910         <links>
5911             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
5912             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5913             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5914         </links>
5915                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5916                         <actions>
5917                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
5918                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
5919                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
5920                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
5921                         </actions>
5922                 </permacrud>
5923     </class>
5924
5925         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
5926                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
5927                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
5928                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
5929                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
5930                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
5931                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5932                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5933                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
5934                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
5935                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5936                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5937                 </fields>
5938                 <links>
5939                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5940                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5941                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5942                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5943                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
5944                 </links>
5945                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5946                         <actions>
5947                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
5948                         </actions>
5949                 </permacrud>
5950         </class>
5951
5952         <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">
5953                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
5954                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
5955                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
5956                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5957                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5958                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
5959                 </fields>
5960                 <links>
5961                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5962                 </links>
5963                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5964                         <actions>
5965                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
5966                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
5967                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
5968                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
5969                         </actions>
5970                 </permacrud>
5971         </class>
5972
5973         <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">
5974                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
5975                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
5976                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
5977                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5978                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5979                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5980                         <field reporter:label="State" name="state" reporter:datatype="text" />
5981                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
5982                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5983                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5984                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
5985                         <field reporter:label="Name" name="name" reporter:datatype="text" />
5986                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5987                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
5988                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
5989                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5990                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
5991                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
5992                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
5993                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
5994                 </fields>
5995                 <links>
5996                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5997                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5998                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5999                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
6000                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6001                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
6002                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
6003                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
6004                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
6005                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6006                 </links>
6007                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6008                         <actions>
6009                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6010                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
6011                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6012                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6013                         </actions>
6014                 </permacrud>
6015         </class>
6016
6017         <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">
6018                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
6019                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
6020                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
6021                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
6022                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
6023                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
6024                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6025                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6026                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
6027                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
6028                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
6029                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6030                         <field reporter:label="State" name="state" reporter:datatype="text"/>
6031                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
6032                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6033                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
6034                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6035                 </fields>
6036                 <links>
6037                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
6038                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6039                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6040                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6041                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
6042                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6043                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6044                 </links>
6045                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6046             <actions>
6047                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
6048             </actions>
6049                 </permacrud>
6050         </class>
6051
6052         <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">
6053                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
6054                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
6055                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
6056                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6057                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6058                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6059                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6060                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
6061                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
6062                 </fields>
6063                 <links>
6064                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6065                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6066                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6067                 </links>
6068                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6069             <actions>
6070                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6071                     <context link="purchase_order" field="ordering_agency"/>
6072                 </retrieve>
6073                 <create permission="CREATE_PURCHASE_ORDER">
6074                     <context link="purchase_order" field="ordering_agency"/>
6075                 </create>
6076                 <update permission="CREATE_PURCHASE_ORDER">
6077                     <context link="purchase_order" field="ordering_agency"/>
6078                 </update>
6079                 <delete permission="CREATE_PURCHASE_ORDER">
6080                     <context link="purchase_order" field="ordering_agency"/>
6081                 </delete>
6082             </actions>
6083                 </permacrud>
6084         </class>
6085
6086         <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">
6087                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
6088                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6089                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6090                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6091                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
6092                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6093                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
6094                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6095                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
6096                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
6097                         <field reporter:label="Target" name="target" reporter:datatype="int" />
6098                 </fields>
6099                 <links>
6100                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6101                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6102                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
6103                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6104                 </links>
6105                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6106             <actions>
6107                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6108                     <context link="purchase_order" field="ordering_agency"/>
6109                 </retrieve>
6110                 <create permission="CREATE_PURCHASE_ORDER">
6111                     <context link="purchase_order" field="ordering_agency"/>
6112                 </create>
6113                 <update permission="CREATE_PURCHASE_ORDER">
6114                     <context link="purchase_order" field="ordering_agency"/>
6115                 </update>
6116                 <delete permission="CREATE_PURCHASE_ORDER">
6117                     <context link="purchase_order" field="ordering_agency"/>
6118                 </delete>
6119             </actions>
6120                 </permacrud>
6121         </class>
6122
6123         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
6124                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
6125                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
6126                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
6127                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
6128                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
6129                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6130                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6131                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6132                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
6133                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
6134                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
6135                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
6136                         <field reporter:label="State" name="state" reporter:datatype="text" />
6137                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6138                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6139                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
6140                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6141                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
6142                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
6143                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
6144                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
6145                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
6146                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
6147                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
6148                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
6149                 </fields>
6150                 <links>
6151                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
6152                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6153                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6154                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6155                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6156                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
6157                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
6158                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
6159                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
6160                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
6161                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6162                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
6163                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
6164                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
6165                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
6166                 </links>
6167                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6168                         <actions>
6169                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
6170                                         <context link="purchase_order" field="ordering_agency"/>
6171                                         <context link="picklist" field="org_unit"/>
6172                                 </retrieve>
6173                         </actions>
6174                 </permacrud>
6175         </class>
6176
6177         <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">
6178                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
6179                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
6180                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
6181                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
6182                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
6183                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6184                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6185                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
6186                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6187                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6188                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
6189                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
6190                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
6191                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
6192                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
6193                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
6194                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
6195                         <field reporter:label="State" name="state" reporter:datatype="text"/>
6196                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
6197                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
6198                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
6199                 </fields>
6200                 <links>
6201                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
6202                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6203                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6204                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
6205                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6206                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6207                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
6208                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
6209                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6210                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
6211                 </links>
6212                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6213                         <actions>
6214                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6215                                         <context link="purchase_order" field="ordering_agency"/>
6216                                         <context link="picklist" field="org_unit"/>
6217                                 </retrieve>
6218                         </actions>
6219                 </permacrud>
6220         </class>
6221
6222         <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">
6223                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
6224                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
6225                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
6226                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6227                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
6228                 </fields>
6229                 <links>
6230                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6231                 </links>
6232                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6233                         <actions>
6234                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6235                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
6236                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6237                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6238                         </actions>
6239                 </permacrud>
6240         </class>
6241
6242         <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">
6243                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
6244                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
6245                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
6246                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6247                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6248                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6249                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6250                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
6251                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
6252                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
6253                 </fields>
6254                 <links>
6255                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6256                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6257                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6258                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
6259                 </links>
6260         </class>
6261
6262         <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">
6263                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
6264                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
6265                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
6266                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
6267                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
6268                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
6269                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
6270                 </fields>
6271                 <links>
6272                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6273                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
6274                 </links>
6275         </class>
6276
6277         <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">
6278                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
6279                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
6280                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6281                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
6282                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
6283                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
6284                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
6285                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6286                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
6287                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
6288                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
6289                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
6290                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6291                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
6292                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6293                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
6294                 </fields>
6295                 <links>
6296                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6297                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
6298                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6299                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6300                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6301                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6302                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6303                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6304                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
6305                 </links>
6306         </class>
6307
6308         <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">
6309                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6310                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6311                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6312                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6313                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6314                 </fields>
6315                 <links/>
6316                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6317                         <actions>
6318                                 <retrieve />
6319                         </actions>
6320                 </permacrud>
6321         </class>
6322
6323         <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">
6324                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6325                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6326                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6327                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6328                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
6329                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6330             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
6331                 </fields>
6332                 <links/>
6333         <permacrud>
6334             <actions>
6335                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
6336                 <retrieve />
6337                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
6338                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
6339             </actions>
6340         </permacrud>
6341         </class>
6342
6343         <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">
6344                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6345                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6346                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6347                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6348                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
6349                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6350                 </fields>
6351                 <links/>
6352         </class>
6353         <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">
6354                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6355                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6356                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6357                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6358                         <field reporter:label="User" name="usr" reporter:datatype="link" />
6359                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6360                 </fields>
6361                 <links>
6362                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6363                 </links>
6364         </class>
6365
6366         <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">
6367             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6368                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6369                 <field reporter:label="Code" name="code" reporter:datatype="text" />
6370                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6371                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
6372                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6373                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6374         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
6375
6376             </fields>
6377             <links>
6378                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6379             </links>
6380             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6381                 <actions>
6382                     <create permission="ADMIN_PROVIDER">
6383                         <context link="provider" field="owner"/>
6384                     </create>
6385                     <retrieve permission="ADMIN_PROVIDER">
6386                         <context link="provider" field="owner"/>
6387                     </retrieve>
6388                     <update permission="ADMIN_PROVIDER">
6389                         <context link="provider" field="owner"/>
6390                     </update>
6391                     <delete permission="ADMIN_PROVIDER">
6392                         <context link="provider" field="owner"/>
6393                     </delete>
6394                 </actions>
6395             </permacrud>
6396         </class>
6397         
6398         <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">
6399             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
6400                 <field reporter:label="ID" name="id" reporter:datatype="id" />
6401                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6402                 <field reporter:label="Name" name="name" reporter:datatype="text" />
6403                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
6404             </fields>
6405             <links>
6406                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6407             </links>
6408             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6409                 <actions>
6410                     <create permission="ADMIN_PROVIDER">
6411                         <context link="provider" field="owner"/>
6412                     </create>
6413                     <retrieve permission="ADMIN_PROVIDER">
6414                         <context link="provider" field="owner"/>
6415                     </retrieve>
6416                     <update permission="ADMIN_PROVIDER">
6417                         <context link="provider" field="owner"/>
6418                     </update>
6419                     <delete permission="ADMIN_PROVIDER">
6420                         <context link="provider" field="owner"/>
6421                     </delete>
6422                 </actions>
6423             </permacrud>
6424         </class>
6425         
6426         <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">
6427             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6428                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6429                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6430                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6431                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6432                 </fields>
6433                 <links/>
6434         </class>
6435
6436         <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">
6437                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
6438                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
6439                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
6440                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
6441                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
6442                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
6443                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
6444                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
6445                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
6446                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
6447                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
6448                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
6449                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
6450                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
6451                 </fields>
6452                 <links>
6453                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6454                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6455                 </links>
6456         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6457             <actions>
6458                 <create permission="ADMIN_PROVIDER">
6459                     <context link="provider" field="owner"/>
6460                 </create>
6461                 <retrieve permission="ADMIN_PROVIDER">
6462                     <context link="provider" field="owner"/>
6463                 </retrieve>
6464                 <update permission="ADMIN_PROVIDER">
6465                     <context link="provider" field="owner"/>
6466                 </update>
6467                 <delete permission="ADMIN_PROVIDER">
6468                     <context link="provider" field="owner"/>
6469                 </delete>
6470             </actions>
6471         </permacrud>
6472         </class>
6473
6474         <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">
6475                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
6476                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
6477                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
6478                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
6479                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
6480                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
6481                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
6482                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
6483                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
6484                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
6485                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
6486                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
6487                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
6488                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
6489                 </fields>
6490                 <links>
6491                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
6492                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6493                 </links>
6494         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6495             <actions>
6496                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
6497                     <context link="account" jump="provider" field="owner"/>
6498                 </retrieve>
6499                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
6500                     <context link="account" jump="provider" field="owner"/>
6501                 </update>
6502                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
6503                     <context link="account" jump="provider" field="owner"/>
6504                 </delete>
6505             </actions>
6506         </permacrud>
6507         </class>
6508
6509
6510         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
6511                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
6512                         <field name="id" reporter:datatype="id" />
6513                         <field name="parent" reporter:datatype="link"/>
6514                         <field name="owner" reporter:datatype="link"/>
6515                         <field name="create_time" reporter:datatype="timestamp"/>
6516                         <field name="name" reporter:datatype="text"/>
6517                         <field name="shared" reporter:datatype="bool"/>
6518                         <field name="share_with" reporter:datatype="link"/>
6519                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6520                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
6521                 </fields>
6522                 <links>
6523                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6524                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
6525                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
6526                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
6527                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
6528                 </links>
6529         </class>
6530         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
6531                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
6532                         <field name="id" reporter:datatype="id" />
6533                         <field name="parent" reporter:datatype="link"/>
6534                         <field name="owner" reporter:datatype="link"/>
6535                         <field name="create_time" reporter:datatype="timestamp"/>
6536                         <field name="name" reporter:datatype="text"/>
6537                         <field name="shared" reporter:datatype="bool"/>
6538                         <field name="share_with" reporter:datatype="link"/>
6539                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6540                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
6541                 </fields>
6542                 <links>
6543                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6544                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
6545                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
6546                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
6547                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
6548                 </links>
6549         </class>
6550         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
6551                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
6552                         <field name="id" reporter:datatype="id" />
6553                         <field name="parent" reporter:datatype="link"/>
6554                         <field name="owner" reporter:datatype="link"/>
6555                         <field name="create_time" reporter:datatype="timestamp"/>
6556                         <field name="name" reporter:datatype="text"/>
6557                         <field name="shared" reporter:datatype="bool"/>
6558                         <field name="share_with" reporter:datatype="link"/>
6559                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6560                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
6561                 </fields>
6562                 <links>
6563                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6564                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
6565                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
6566                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
6567                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
6568                 </links>
6569         </class>
6570         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
6571                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
6572                         <field name="id" reporter:datatype="id" />
6573                         <field name="owner" reporter:datatype="link"/>
6574                         <field name="create_time" reporter:datatype="timestamp"/>
6575                         <field name="name" reporter:datatype="text"/>
6576                         <field name="data" reporter:datatype="text"/>
6577                         <field name="folder" reporter:datatype="link"/>
6578                         <field name="description" reporter:datatype="text"/>
6579                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
6580                 </fields>
6581                 <links>
6582                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6583                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
6584                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
6585                 </links>
6586         </class>
6587         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
6588                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
6589                         <field name="id" reporter:datatype="id" />
6590                         <field name="owner" reporter:datatype="link"/>
6591                         <field name="create_time" reporter:datatype="timestamp"/>
6592                         <field name="template" reporter:datatype="link"/>
6593                         <field name="data" reporter:datatype="text"/>
6594                         <field name="folder" reporter:datatype="link"/>
6595                         <field name="recur" reporter:datatype="bool"/>
6596                         <field name="recurrence" reporter:datatype="interval"/>
6597                         <field name="name" reporter:datatype="text"/>
6598                         <field name="description" reporter:datatype="text"/>
6599                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
6600                 </fields>
6601                 <links>
6602                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6603                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
6604                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
6605                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
6606                 </links>
6607         </class>
6608         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
6609                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
6610                         <field name="id" reporter:datatype="id" />
6611                         <field name="runner" reporter:datatype="link"/>
6612                         <field name="start_time" reporter:datatype="timestamp"/>
6613                         <field name="complete_time" reporter:datatype="timestamp"/>
6614                         <field name="run_time" reporter:datatype="timestamp"/>
6615                         <field name="email" reporter:datatype="text"/>
6616                         <field name="excel_format" reporter:datatype="bool"/>
6617                         <field name="csv_format" reporter:datatype="bool"/>
6618                         <field name="html_format" reporter:datatype="bool"/>
6619                         <field name="error_code" reporter:datatype="int"/>
6620                         <field name="error_text" reporter:datatype="text"/>
6621                         <field name="report" reporter:datatype="link"/>
6622                         <field name="folder" reporter:datatype="link"/>
6623                         <field name="chart_pie" reporter:datatype="bool"/>
6624                         <field name="chart_bar" reporter:datatype="bool"/>
6625                         <field name="chart_line" reporter:datatype="bool"/>
6626                 </fields>
6627                 <links>
6628                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
6629                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
6630                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
6631                 </links>
6632         </class>
6633         <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">
6634                 <fields oils_persist:primary="id">
6635                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6636                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
6637                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
6638                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
6639                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
6640                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
6641                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
6642                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
6643                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
6644                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
6645                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
6646                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
6647                 </fields>
6648                 <links>
6649                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
6650                 </links>
6651         </class>
6652         <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">
6653                 <fields oils_persist:primary="id">
6654                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6655                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
6656                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
6657                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
6658                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
6659                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
6660                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
6661                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
6662                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
6663                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
6664                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
6665                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
6666                 </fields>
6667                 <links>
6668                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
6669                 </links>
6670         </class>
6671         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
6672                 <fields oils_persist:primary="id">
6673                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6674                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
6675                         <field reporter:label="Fingerprint" name="fingerprint" />
6676                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
6677                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
6678                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
6679                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
6680                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
6681                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
6682                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
6683                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
6684                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
6685                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
6686                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
6687                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
6688                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
6689                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
6690                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
6691                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
6692                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
6693                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
6694                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
6695                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
6696                 </fields>
6697                 <links>
6698                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
6699                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
6700                 </links>
6701         </class>
6702         <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">
6703                 <fields oils_persist:primary="id">
6704                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
6705                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
6706                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
6707                 </fields>
6708                 <links>
6709                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
6710                 </links>
6711         </class>
6712         <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">
6713                 <fields oils_persist:primary="id">
6714                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
6715                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
6716                 </fields>
6717                 <links>
6718                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
6719                 </links>
6720         </class>
6721         <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">
6722                 <fields oils_persist:primary="id">
6723                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6724                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
6725                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
6726                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
6727                 </fields>
6728                 <links>
6729                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
6730                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
6731                 </links>
6732         </class>
6733         <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">
6734                 <fields oils_persist:primary="xact">
6735                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
6736                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
6737                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
6738                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
6739                 </fields>
6740                 <links>
6741                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
6742                 </links>
6743         </class>
6744         <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">
6745                 <fields oils_persist:primary="xact">
6746                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
6747                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
6748                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
6749                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
6750                 </fields>
6751                 <links>
6752                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
6753                 </links>
6754         </class>
6755         <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)">
6756                 <fields oils_persist:primary="id">
6757                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
6758                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
6759                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
6760                 </fields>
6761                 <links>
6762                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
6763                 </links>
6764         </class>
6765         <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">
6766                 <fields oils_persist:primary="id">
6767                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
6768                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
6769                 </fields>
6770                 <links>
6771                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
6772                 </links>
6773         </class>
6774         <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">
6775                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
6776                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
6777                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
6778                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
6779                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
6780                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6781                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
6782                 </fields>
6783                 <links>
6784                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6785                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
6786                 </links>
6787                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6788                         <actions>
6789                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
6790                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
6791                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
6792                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
6793                         </actions>
6794                 </permacrud>
6795         </class>
6796         <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">
6797                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
6798                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
6799                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
6800                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
6801                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
6802                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
6803                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6804                 </fields>
6805                 <links>
6806                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
6807                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6808                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6809                 </links>
6810                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6811                         <actions>
6812                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
6813                                         <context link="formula" field="owner"/>
6814                                 </create>
6815                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
6816                                         <context link="formula" field="owner"/>
6817                                 </retrieve>
6818                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
6819                                         <context link="formula" field="owner"/>
6820                                 </update>
6821                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
6822                                         <context link="formula" field="owner"/>
6823                                 </delete>
6824                         </actions>
6825                 </permacrud>
6826         </class>
6827
6828         <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">
6829                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
6830                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6831                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6832                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
6833                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
6834                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
6835                 </fields>
6836                 <links>
6837                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6838                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
6839                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6840                 </links>
6841                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6842                         <actions>
6843                                 <create permission="CREATE_PURCHASE_ORDER">
6844                                         <context link="formula" field="owner"/>
6845                 </create>
6846                                 <retrieve permission="CREATE_PURCHASE_ORDER">
6847                                         <context link="formula" field="owner"/>
6848                 </retrieve>
6849                                 <update permission="CREATE_PURCHASE_ORDER">
6850                                         <context link="formula" field="owner"/>
6851                 </update>
6852                                 <delete permission="CREATE_PURCHASE_ORDER">
6853                                         <context link="formula" field="owner"/>
6854                 </delete>
6855                         </actions>
6856                 </permacrud>
6857         </class>
6858
6859         <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">
6860                 <fields oils_persist:primary="id">
6861                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
6862                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6863                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
6864                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
6865                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
6866                 </fields>
6867                 <links>
6868                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6869                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
6870                 </links>
6871                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6872                 </permacrud>
6873         </class>
6874
6875         <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">
6876                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
6877                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
6878                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
6879                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
6880                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6881                 </fields>
6882                 <links>
6883                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6884                 </links>
6885                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6886                         <actions>
6887                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
6888                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
6889                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
6890                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
6891                         </actions>
6892                 </permacrud>
6893         </class>
6894
6895         <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">
6896                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
6897                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
6898                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
6899                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
6900                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6901                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
6902                 </fields>
6903                 <links>
6904                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6905                 </links>
6906                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6907                         <actions>
6908                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
6909                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
6910                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
6911                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
6912                         </actions>
6913                 </permacrud>
6914         </class>
6915
6916         <class id="acqcl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
6917                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
6918                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
6919                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
6920                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
6921                 </fields>
6922                 <links>
6923                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
6924                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
6925                 </links>
6926                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6927                 </permacrud>
6928         </class>
6929
6930         <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">
6931                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
6932                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
6933                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
6934                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
6935                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
6936                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6937                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6938                 </fields>
6939                 <links>
6940                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
6941                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
6942                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6943                 </links>
6944                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6945                 </permacrud>
6946         </class>
6947
6948         <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">
6949                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
6950                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
6951                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
6952                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
6953                 </fields>
6954                 <links>
6955                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
6956                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
6957                 </links>
6958                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6959                 </permacrud>
6960         </class>
6961
6962         <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">
6963                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
6964                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
6965                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
6966                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
6967                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
6968                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6969                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6970                 </fields>
6971                 <links>
6972                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
6973                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
6974                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6975                 </links>
6976                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6977                 </permacrud>
6978         </class>
6979
6980         <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">
6981                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
6982                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6983                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
6984                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
6985                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6986                 </fields>
6987                 <links>
6988                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6989                 </links>
6990                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6991             <actions>
6992                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
6993                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
6994                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
6995                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
6996             </actions>
6997                 </permacrud>
6998         </class>
6999
7000         <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">
7001                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
7002                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
7003                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
7004                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
7005                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
7006                 </fields>
7007                 <links>
7008                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7009                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
7010                 </links>
7011                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7012                         <actions>
7013                                 <create permission="ADMIN_CLAIM_POLICY">
7014                                         <context link="claim_policy" field="org_unit"/>
7015                 </create>
7016                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
7017                                         <context link="claim_policy" field="org_unit"/>
7018                 </retrieve>
7019                                 <update permission="ADMIN_CLAIM_POLICY">
7020                                         <context link="claim_policy" field="org_unit"/>
7021                 </update>
7022                                 <delete permission="ADMIN_CLAIM_POLICY">
7023                                         <context link="claim_policy" field="org_unit"/>
7024                 </delete>
7025                         </actions>
7026                 </permacrud>
7027         </class>
7028
7029     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
7030         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
7031             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7032             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7033             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7034             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
7035             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
7036             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
7037             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
7038             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
7039             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
7040             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
7041             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
7042             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
7043             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
7044             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
7045             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7046         </fields>
7047     </class>
7048
7049     <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">
7050         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
7051             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7052             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7053             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7054             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7055             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7056         </fields>
7057     </class>
7058
7059     <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">
7060         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
7061             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7062             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7063             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7064             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
7065             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
7066             <field reporter:label="City" name="city" reporter:datatype="text"/>
7067             <field reporter:label="State" name="state" reporter:datatype="text"/>
7068             <field reporter:label="Country" name="country" reporter:datatype="text"/>
7069             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7070             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7071         </fields>
7072     </class>
7073
7074     <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">
7075         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
7076             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7077             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7078             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7079             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
7080             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
7081             <field reporter:label="City" name="city" reporter:datatype="text"/>
7082             <field reporter:label="State" name="state" reporter:datatype="text"/>
7083             <field reporter:label="Country" name="country" reporter:datatype="text"/>
7084             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7085             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7086         </fields>
7087     </class>
7088
7089     <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">
7090         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
7091             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7092             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7093             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7094             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
7095             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
7096             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7097         </fields>
7098     </class>
7099
7100         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
7101                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
7102                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
7103                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7104                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
7105                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
7106                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
7107                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
7108                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
7109                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
7110                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
7111                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
7112                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
7113                 </fields>
7114                 <links>
7115                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7116                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7117                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7118                 </links>
7119                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7120                 </permacrud>
7121         </class>
7122
7123         <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">
7124                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
7125                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
7126                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
7127                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
7128                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
7129                 </fields>
7130                 <links>
7131                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
7132                 </links>
7133                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7134                 </permacrud>
7135         </class>
7136
7137     <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">
7138         <fields>
7139             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7140             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7141             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7142         </fields>
7143                 <links>
7144                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7145                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7146                 </links>
7147     </class>
7148
7149     <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">
7150         <fields>
7151             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7152             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
7153         </fields>
7154                 <links>
7155                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7156                 </links>
7157     </class>
7158
7159     <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">
7160         <fields>
7161             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7162             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7163             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7164         </fields>
7165                 <links>
7166                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7167                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7168                 </links>
7169     </class>
7170
7171     <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">
7172         <fields>
7173             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7174             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
7175         </fields>
7176                 <links>
7177                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7178                 </links>
7179     </class>
7180
7181     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
7182                 <oils_persist:source_definition>
7183
7184             SELECT  DISTINCT l.*
7185               FROM  action.unfulfilled_hold_loops l
7186                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
7187               WHERE l.count = m.max
7188
7189                 </oils_persist:source_definition>
7190         <fields>
7191             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7192             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7193             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7194         </fields>
7195                 <links>
7196                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7197                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7198                 </links>
7199     </class>
7200
7201         <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">
7202                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
7203                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
7204                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
7205                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
7206                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
7207                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
7208                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
7209                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
7210                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
7211                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
7212                 </fields>
7213                 <links>
7214                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
7215                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
7216                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
7217                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
7218                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
7219                 </links>
7220                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7221                 </permacrud>
7222         </class>
7223
7224         <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">
7225                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
7226                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
7227                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
7228                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7229                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
7230                 </fields>
7231                 <links>
7232                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
7233                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
7234                 </links>
7235                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7236                 </permacrud>
7237         </class>
7238
7239         <class id="qdt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
7240                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
7241                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
7242                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
7243                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
7244                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
7245                 </fields>
7246                 <links>
7247                 </links>
7248                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7249                 </permacrud>
7250         </class>
7251
7252         <class id="qsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
7253                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
7254                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
7255                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
7256                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7257                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
7258                 </fields>
7259                 <links>
7260                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
7261                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
7262                 </links>
7263                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7264                 </permacrud>
7265         </class>
7266         
7267         <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">
7268                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
7269                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
7270                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
7271                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
7272                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
7273                 </fields>
7274                 <links>
7275                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
7276                 </links>
7277                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7278                 </permacrud>
7279         </class>
7280         
7281         <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">
7282                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
7283                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
7284                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
7285                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7286                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
7287                 </fields>
7288                 <links>
7289                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
7290                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
7291                 </links>
7292                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7293                 </permacrud>
7294         </class>
7295
7296         <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">
7297                 <fields oils_persist:primary="name">
7298                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
7299                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
7300                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
7301                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7302                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
7303                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
7304                 </fields>
7305                 <links>
7306                 </links>
7307                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7308                 </permacrud>
7309         </class>
7310
7311         <class id="qxp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
7312                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7313                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7314                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
7315                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7316                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7317                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7318                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
7319                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
7320                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7321                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7322                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
7323                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
7324                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
7325                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
7326                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
7327                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7328                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
7329                 </fields>
7330                 <links>
7331                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7332                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7333                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
7334                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
7335                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7336                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
7337                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
7338                 </links>
7339                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7340                 </permacrud>
7341         </class>
7342
7343         <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">
7344                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
7345                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
7346                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7347                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7348                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
7349                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
7350                 </fields>
7351                 <links>
7352                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7353                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
7354                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
7355                 </links>
7356                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7357                 </permacrud>
7358         </class>
7359
7360         <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">
7361                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
7362                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
7363                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
7364                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
7365                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
7366                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
7367                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
7368                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
7369                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
7370                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7371                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
7372                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
7373                 </fields>
7374                 <links>
7375                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7376                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
7377                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
7378                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
7379                 </links>
7380                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7381                 </permacrud>
7382         </class>
7383
7384         <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">
7385                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
7386                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
7387                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
7388                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7389                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7390                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
7391                 </fields>
7392                 <links>
7393                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
7394                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
7395                 </links>
7396                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7397                 </permacrud>
7398         </class>
7399
7400         <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">
7401                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
7402                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
7403                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
7404                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7405                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
7406                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
7407                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
7408                 </fields>
7409                 <links>
7410                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7411                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
7412                 </links>
7413                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7414                 </permacrud>
7415         </class>
7416
7417         <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">
7418                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
7419                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
7420                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
7421                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7422                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
7423                 </fields>
7424                 <links>
7425                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7426                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
7427                 </links>
7428                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7429                 </permacrud>
7430         </class>
7431
7432         <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">
7433                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7434                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7435                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7436                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7437                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7438                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7439                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7440                 </fields>
7441                 <links>
7442                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7443                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7444                 </links>
7445                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7446                 </permacrud>
7447         </class>
7448
7449         <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">
7450                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7451                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7452                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7453                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7454                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7455                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
7456                 </fields>
7457                 <links>
7458                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7459                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
7460                 </links>
7461                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7462                 </permacrud>
7463         </class>
7464
7465         <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">
7466                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7467                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7468                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7469                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7470                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7471                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
7472                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7473                 </fields>
7474                 <links>
7475                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7476                 </links>
7477                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7478                 </permacrud>
7479         </class>
7480
7481         <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">
7482                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7483                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7484                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7485                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7486                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7487                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7488                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7489                 </fields>
7490                 <links>
7491                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7492                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7493                 </links>
7494                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7495                 </permacrud>
7496         </class>
7497
7498         <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">
7499                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7500                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7501                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7502                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7503                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7504                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7505                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
7506                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7507                 </fields>
7508                 <links>
7509                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7510                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7511                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
7512                 </links>
7513                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7514                 </permacrud>
7515         </class>
7516
7517         <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">
7518                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7519                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7520                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7521                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7522                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7523                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
7524                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7525                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7526                 </fields>
7527                 <links>
7528                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7529                 </links>
7530                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7531                 </permacrud>
7532         </class>
7533
7534         <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">
7535                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7536                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7537                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7538                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7539                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7540                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
7541                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7542                 </fields>
7543                 <links>
7544                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7545                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7546                 </links>
7547                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7548                 </permacrud>
7549         </class>
7550
7551         <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">
7552                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7553                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7554                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7555                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7556                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7557                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7558                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
7559                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7560                 </fields>
7561                 <links>
7562                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7563                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
7564                 </links>
7565                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7566                 </permacrud>
7567         </class>
7568
7569         <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">
7570                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7571                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7572                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7573                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7574                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7575                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7576                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
7577                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7578                 </fields>
7579                 <links>
7580                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7581                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7582                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7583                 </links>
7584                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7585                 </permacrud>
7586         </class>
7587
7588         <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">
7589                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7590                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7591                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7592                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7593                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7594                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7595                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7596                 </fields>
7597                 <links>
7598                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7599                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7600                 </links>
7601                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7602                 </permacrud>
7603         </class>
7604
7605         <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">
7606                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7607                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7608                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7609                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7610                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7611                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7612                 </fields>
7613                 <links>
7614                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7615                 </links>
7616                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7617                 </permacrud>
7618         </class>
7619
7620         <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">
7621                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7622                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7623                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7624                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7625                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7626                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
7627                 </fields>
7628                 <links>
7629                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7630                 </links>
7631                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7632                 </permacrud>
7633         </class>
7634
7635         <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">
7636                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7637                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7638                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7639                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7640                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7641                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7642                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
7643                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
7644                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7645                 </fields>
7646                 <links>
7647                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7648                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7649                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
7650                 </links>
7651                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7652                 </permacrud>
7653         </class>
7654
7655         <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">
7656                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7657                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7658                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7659                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7660                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7661                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
7662                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7663                 </fields>
7664                 <links>
7665                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7666                 </links>
7667                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7668                 </permacrud>
7669         </class>
7670
7671         <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">
7672                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7673                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7674                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7675                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7676                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7677                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
7678                 </fields>
7679                 <links>
7680                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7681                 </links>
7682                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7683                 </permacrud>
7684         </class>
7685
7686         <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">
7687                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7688                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7689                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7690                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7691                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7692                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
7693                 </fields>
7694                 <links>
7695                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7696                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7697                 </links>
7698                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7699                 </permacrud>
7700         </class>
7701
7702         <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">
7703                 <fields oils_persist:primary="id">
7704                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
7705                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
7706                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
7707                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
7708                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
7709                 </fields>
7710                 <links>
7711                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
7712                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
7713                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
7714                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
7715                 </links>
7716         </class>
7717
7718         <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">
7719                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
7720                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7721                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
7722                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
7723                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
7724                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
7725                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
7726                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
7727                 </fields>
7728                 <links/>
7729                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7730                         <actions>
7731                                 <retrieve/>
7732                         </actions>
7733                 </permacrud>
7734         </class>
7735
7736         <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">
7737                 <fields oils_persist:primary="ptype_key">
7738                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
7739                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
7740                 </fields>
7741                 <links/>
7742                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7743                         <actions>
7744                                 <retrieve/>
7745                         </actions>
7746                 </permacrud>
7747         </class>
7748
7749         <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">
7750                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
7751                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7752                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
7753                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
7754                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
7755                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
7756                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
7757                 </fields>
7758                 <links>
7759                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
7760                 </links>
7761                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7762                         <actions>
7763                                 <retrieve/>
7764                         </actions>
7765                 </permacrud>
7766         </class>
7767
7768         <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">
7769                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
7770                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7771                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
7772                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
7773                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
7774                 </fields>
7775                 <links>
7776                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
7777                 </links>
7778                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7779                         <actions>
7780                                 <retrieve/>
7781                         </actions>
7782                 </permacrud>
7783         </class>
7784
7785         <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">
7786                 <fields oils_persist:primary="code">
7787                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
7788                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
7789                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
7790                 </fields>
7791                 <links/>
7792                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7793                         <actions>
7794                                 <retrieve/>
7795                         </actions>
7796                 </permacrud>
7797         </class>
7798
7799         <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">
7800                 <oils_persist:source_definition>
7801
7802             SELECT  b.id,
7803                     MAX(dcp.edit_date) AS last_delete_date
7804              FROM   biblio.record_entry b
7805                     JOIN asset.call_number cn ON (cn.record = b.id)
7806                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
7807              WHERE  NOT b.deleted
7808              GROUP BY b.id
7809              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
7810
7811                 </oils_persist:source_definition>
7812                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
7813                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
7814                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
7815                 </fields>
7816                 <links>
7817                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
7818                 </links>
7819                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7820                         <actions>
7821                                 <retrieve/>
7822                         </actions>
7823                 </permacrud>
7824         </class>
7825
7826         <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">
7827                 <oils_persist:source_definition>
7828
7829             -- -- 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.
7830             -- -- 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
7831             -- -- may not.
7832             -- SELECT
7833             --     bre.id AS "bib_id",
7834             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
7835             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
7836             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
7837             -- FROM (
7838                 SELECT
7839                     y.bre AS "id",
7840                     COALESCE( x.copy_count, 0 ) AS "copy_count",
7841                     y.hold_count AS "hold_count",
7842                     (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"
7843                 FROM (
7844                         SELECT
7845                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
7846                             COUNT(*) AS "hold_count"
7847                         FROM action.hold_request h
7848                         WHERE
7849                             cancel_time IS NULL
7850                             AND fulfillment_time IS NULL
7851                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
7852                         GROUP BY 1
7853                     )y LEFT JOIN (
7854                         SELECT 
7855                             (SELECT id
7856                                 FROM biblio.record_entry 
7857                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
7858                             ) AS "bre", 
7859                             COUNT(*) AS "copy_count"
7860                         FROM asset.copy
7861                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
7862                         WHERE copy.holdable 
7863                             AND NOT copy.deleted 
7864                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
7865                         GROUP BY 1
7866                     )x ON x.bre = y.bre
7867                 -- )z RIGHT JOIN (
7868                 --     SELECT id
7869                 --     FROM biblio.record_entry
7870                 --     WHERE NOT deleted
7871                 -- )bre ON (z.bib_id = bre.id)
7872                 
7873
7874                 </oils_persist:source_definition>
7875                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
7876                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
7877                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
7878                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
7879                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
7880                 </fields>
7881                 <links>
7882                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
7883                 </links>
7884                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7885                         <actions>
7886                                 <retrieve/>
7887                         </actions>
7888                 </permacrud>
7889         </class>
7890
7891         <!-- ********************************************************************************************************************* -->
7892         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
7893         <!-- ********************************************************************************************************************* -->
7894         <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">
7895                 <fields oils_persist:primary="id">
7896                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
7897                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
7898                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
7899                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
7900                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
7901                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
7902                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
7903                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
7904                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
7905                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
7906                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
7907                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
7908                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
7909                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
7910                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
7911                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
7912                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
7913                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
7914                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
7915                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
7916                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
7917                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
7918                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
7919                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
7920                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
7921                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
7922                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
7923                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
7924                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
7925                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
7926                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
7927                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
7928                 </fields>
7929                 <links>
7930                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
7931                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
7932                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
7933                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
7934                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
7935                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
7936                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
7937                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
7938                 </links>
7939         </class>
7940
7941         <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">
7942                 <fields oils_persist:primary="id">
7943                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
7944                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7945                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
7946                 </fields>
7947                 <links>
7948                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7949                 </links>
7950         </class>
7951
7952         <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">
7953                 <fields oils_persist:primary="id">
7954                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
7955                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7956                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
7957                 </fields>
7958                 <links>
7959                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7960                 </links>
7961         </class>
7962
7963         <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">
7964                 <fields oils_persist:primary="id">
7965                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7966
7967                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
7968                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
7969                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
7970
7971                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
7972                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
7973                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
7974
7975                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
7976                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
7977
7978                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
7979                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
7980                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
7981
7982                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
7983                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
7984
7985                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
7986                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
7987                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
7988
7989                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
7990                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
7991                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
7992
7993                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
7994                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
7995                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
7996                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
7997
7998                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
7999                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
8000
8001                 </fields>
8002                 <links>
8003                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
8004                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8005                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
8006                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
8007                 </links>
8008         </class>
8009
8010         <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">
8011                 <oils_persist:source_definition>
8012
8013             SELECT
8014                 po.ordering_agency AS ordering_agency,
8015                 po.id AS purchase_order,
8016                 li.id AS lineitem,
8017                 lid.id AS lineitem_detail,
8018                 cpa.id AS claim_policy_action
8019             FROM
8020                 acq.lineitem_detail lid
8021                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
8022                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
8023                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
8024                 JOIN acq.claim_policy_action cpa ON (
8025                     cpa.claim_policy = cp.id
8026
8027                     -- we only care about claim policy actions whose claim
8028                     -- interval we'd reached or exceeded
8029                     AND (NOW() - cpa.action_interval) &gt; po.order_date
8030
8031                     -- filter out all claim policy actions where claim events
8032                     -- have occurred on or after the action's action_interval
8033                     AND NOT EXISTS (
8034                         SELECT 1
8035                         FROM
8036                             acq.claim_event evt
8037                             JOIN acq.claim claim ON (
8038                                 claim.id = evt.claim
8039                                 AND claim.lineitem_detail = lid.id
8040                             )
8041                         WHERE
8042                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
8043                     )
8044                 )
8045             WHERE
8046                 lid.cancel_reason IS NULL
8047                 AND li.cancel_reason IS NULL -- belt/suspenders
8048                 AND po.cancel_reason IS NULL -- belt/suspenders
8049                 AND lid.recv_time IS NULL
8050                 AND po.state = 'on-order'
8051             ORDER BY 1, 2, 3, 4, 5
8052
8053                 </oils_persist:source_definition>
8054                 <fields>
8055                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8056                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8057                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8058                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8059                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
8060                 </fields>
8061                 <links>
8062                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8063                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8064                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8065                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8066                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
8067                 </links>
8068         </class>
8069
8070         <class id="acqlisum" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary" oils_persist:readonly="true" reporter:label="Lineitem Summary">
8071                 <oils_persist:source_definition>
8072
8073             SELECT 
8074                 li.id AS lineitem, 
8075                 (
8076                     SELECT COUNT(lid.id) 
8077                     FROM acq.lineitem_detail lid
8078                     WHERE lineitem = li.id
8079                 ) AS item_count,
8080                 (
8081                     SELECT COUNT(lid.id) 
8082                     FROM acq.lineitem_detail lid
8083                     WHERE recv_time IS NOT NULL AND lineitem = li.id
8084                 ) AS recv_count,
8085                 (
8086                     SELECT COUNT(lid.id) 
8087                     FROM acq.lineitem_detail lid
8088                     WHERE cancel_reason IS NOT NULL AND lineitem = li.id
8089                 ) AS cancel_count,
8090                 (
8091                     SELECT COUNT(lid.id) 
8092                     FROM acq.lineitem_detail lid
8093                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8094                     WHERE NOT debit.encumbrance AND lineitem = li.id
8095                 ) AS invoice_count,
8096                 (
8097                     SELECT COUNT(DISTINCT(lid.id)) 
8098                     FROM acq.lineitem_detail lid
8099                         JOIN acq.claim claim ON (claim.lineitem_detail = lid.id)
8100                     WHERE lineitem = li.id
8101                 ) AS claim_count,
8102                 (
8103                     SELECT (COUNT(lid.id) * li.estimated_unit_price)::NUMERIC(8,2)
8104                     FROM acq.lineitem_detail lid
8105                     WHERE lid.cancel_reason IS NULL AND lineitem = li.id
8106                 ) AS estimated_amount,
8107                 (
8108                     SELECT SUM(debit.amount)::NUMERIC(8,2)
8109                     FROM acq.lineitem_detail lid
8110                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8111                     WHERE debit.encumbrance AND lineitem = li.id
8112                 ) AS encumbrance_amount,
8113                 (
8114                     SELECT SUM(debit.amount)::NUMERIC(8,2)
8115                     FROM acq.lineitem_detail lid
8116                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8117                     WHERE NOT debit.encumbrance AND lineitem = li.id
8118                 ) AS paid_amount
8119
8120                 FROM acq.lineitem AS li
8121         </oils_persist:source_definition>
8122                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
8123                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8124                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
8125                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
8126                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
8127                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
8128                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
8129                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
8130                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
8131                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
8132                 </fields>
8133                 <links>
8134                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8135                 </links>
8136     </class>
8137
8138
8139         <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">
8140                 <oils_persist:source_definition>
8141
8142                         SELECT  t.*
8143                           FROM  action.transit_copy t
8144                                 JOIN actor.org_unit AS s ON (t.source = s.id)
8145                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
8146                           WHERE s.parent_ou &lt;&gt; d.parent_ou
8147
8148                 </oils_persist:source_definition>
8149                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8150                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
8151                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
8152                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8153                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
8154                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
8155                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
8156                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
8157                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8158                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8159                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8160                 </fields>
8161                 <links>
8162                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
8163                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8164                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8165                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8166                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8167                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
8168                 </links>
8169         </class>
8170
8171     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
8172                 <oils_persist:source_definition>
8173
8174         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
8175                 SELECT
8176                         cp.id as copy,
8177                         COUNT(circ.id),
8178                         EXTRACT(YEAR FROM circ.xact_start) AS year,
8179                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
8180                 FROM
8181                         asset.copy cp
8182                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
8183                 GROUP BY 1, 3, 4
8184                 UNION
8185                 SELECT
8186                         cp.id as copy,
8187                         COUNT(circ.id),
8188                         EXTRACT(YEAR FROM circ.xact_start) AS year,
8189                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
8190                 FROM
8191                         asset.copy cp
8192                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
8193                 GROUP BY 1, 3, 4
8194                 UNION
8195                 SELECT
8196                         id as copy,
8197                         circ_count,
8198                         -1 AS year,
8199                         false as is_renewal
8200                 FROM
8201                         extend_reporter.legacy_circ_count
8202         )x GROUP BY 1, 3, 4
8203
8204                 </oils_persist:source_definition>
8205         <fields>
8206             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
8207             <field reporter:label="Count" name="count" reporter:datatype="int"/>
8208             <field reporter:label="Year" name="year" reporter:datatype="int"/>
8209             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
8210         </fields>
8211                 <links>
8212                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
8213                 </links>
8214                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8215                         <actions>
8216                                 <retrieve/>
8217                         </actions>
8218                 </permacrud>
8219     </class>
8220
8221         <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">
8222                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
8223                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
8224                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
8225                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
8226                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
8227                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
8228                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
8229                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
8230                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
8231                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
8232                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
8233                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
8234                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
8235                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
8236                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
8237                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
8238                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
8239                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
8240                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
8241                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
8242                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
8243                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
8244                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
8245                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
8246                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
8247                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
8248                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
8249                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
8250                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
8251                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
8252                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
8253                 </fields>
8254                 <links>
8255                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
8256                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
8257                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
8258                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8259                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
8260                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8261                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8262                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
8263                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
8264                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
8265                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
8266                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
8267                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
8268                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
8269                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
8270                 </links>
8271         </class>
8272
8273     <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">
8274         <fields oils_persist:primary="id">
8275             <field reporter:label="Title" name="title" reporter:datatype="text"/>
8276             <field reporter:label="Author" name="author" reporter:datatype="text"/>
8277             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
8278             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
8279             <field reporter:label="Price" name="price" reporter:datatype="money"/>
8280             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
8281             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
8282             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
8283             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
8284             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
8285             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
8286             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
8287             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
8288             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
8289             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
8290             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
8291             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
8292             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8293             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
8294             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
8295             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
8296             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
8297             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8298             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
8299             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
8300             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
8301             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
8302             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
8303             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
8304             <field reporter:label="Status" name="status" reporter:datatype="link"/>
8305             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
8306             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
8307             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
8308             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
8309         </fields>
8310         <links>
8311             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8312             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8313             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8314             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
8315             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
8316         </links>
8317     </class>
8318
8319     <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">
8320         <fields oils_persist:primary="id">
8321             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
8322             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8323             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
8324             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
8325         </fields>
8326         <links>
8327             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8328             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8329         </links>
8330     </class>
8331
8332     <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">
8333         <fields oils_persist:primary="owning_lib">
8334             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8335             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
8336             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
8337         </fields>
8338         <links>
8339             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8340         </links>
8341     </class>
8342
8343     <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">
8344         <fields oils_persist:primary="id">
8345             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
8346             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
8347             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8348             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
8349             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
8350         </fields>
8351         <links>
8352             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8353             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8354             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8355         </links>
8356     </class>
8357
8358     <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">
8359         <fields oils_persist:primary="circ_lib">
8360             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
8361             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8362             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
8363             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
8364         </fields>
8365         <links>
8366             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8367             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8368         </links>
8369     </class>
8370
8371     <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">
8372         <fields oils_persist:primary="id">
8373             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
8374             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
8375             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8376             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
8377             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
8378         </fields>
8379         <links>
8380             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8381             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8382             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
8383         </links>
8384     </class>
8385
8386     <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">
8387         <fields oils_persist:primary="home_ou">
8388             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
8389             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8390             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
8391             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
8392         </fields>
8393         <links>
8394             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8395             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
8396         </links>
8397     </class>
8398         <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">
8399                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
8400                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
8401                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
8402                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
8403                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
8404                 </fields>
8405                 <links>
8406                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8407                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
8408                 </links>
8409                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8410                         <actions>
8411                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
8412                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
8413                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
8414                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
8415                         </actions>
8416                 </permacrud>
8417         </class>
8418         <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">
8419                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
8420                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
8421                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
8422                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
8423                 </fields>
8424                 <links>
8425                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8426                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
8427                         </links>
8428                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8429                 <actions>
8430                                 <create permission="ADMIN_ACQ_FUND_TAG">
8431                                         <context link="tag" field="owner"/>
8432                                 </create>
8433                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8434                                         <context link="tag" field="owner"/>
8435                                 </retrieve>
8436                                 <update permission="ADMIN_ACQ_FUND_TAG">
8437                                         <context link="tag" field="owner"/>
8438                                 </update>
8439                                 <delete permission="ADMIN_ACQ_FUND_TAG">
8440                                         <context link="tag" field="owner"/>
8441                                 </delete>
8442                         </actions>
8443                 </permacrud>
8444         </class>
8445
8446         <!-- ********************************************************************************************************************* -->
8447
8448 </IDL>
8449
8450 <!--
8451     vim:noet:ts=4:sw=4:
8452 -->