Bug 32334: (QA follow-up) Improve finding schema file
[koha.git] / Koha / Database / Columns.pm
1 package Koha::Database::Columns;
2
3 # This file is part of Koha.
4 #
5 # Koha is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # Koha is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with Koha; if not, see <http://www.gnu.org/licenses>.
17
18 use Modern::Perl;
19 use Koha::I18N qw( __ );
20
21 =head1 NAME
22
23 Koha::Database::Columns
24
25 =head1 SYNOPSIS
26
27   use Koha::Database::Columns;
28   my $columns = Koha::Database::Columns->columns;
29
30 =head1 API
31
32 =head2 Methods
33
34 =head3 columns
35
36 Static method that returns a hashref with mappings from column names
37 to descriptions, for several tables. Currently
38
39 =over
40
41 =item aqorders
42
43 =item biblio
44
45 =item biblioitems
46
47 =item borrowers
48
49 =item items
50
51 =item statistics
52
53 =item subscription
54
55 =item suggestions
56
57 =back
58
59 =cut
60
61 sub columns {
62     return {
63         aqorders => {
64             "basketno"                      => __("Basket ID (internal)"),
65             "biblionumber"                  => __("Biblionumber (internal)"),
66             "budget_id"                     => __("Fund ID (internal)"),
67             "budgetdate"                    => __("Not used (deprecated)"),
68             "cancellationreason"            => __("Cancellation reason"),
69             "created_by"                    => __("Borrower number of creator"),
70             "currency"                      => __("Currency"),
71             "datecancellationprinted"       => __("Cancellation date"),
72             "datereceived"                  => __("Date received"),
73             "discount"                      => __("Discount"),
74             "ecost_tax_excluded"            => __("Budgeted cost, tax excl."),
75             "ecost_tax_included"            => __("Budgeted cost, tax incl."),
76             "ecost"                         => __("Budgeted cost"),
77             "entrydate"                     => __("Creation date"),
78             "estimated_delivery_date"       => __("Estimated delivery date"),
79             "freight"                       => __("Not used (deprecated)"),
80             "invoiceid"                     => __("Invoice ID (internal)"),
81             "line_item_id"                  => __("Line item ID (EDIFACT)"),
82             "listprice"                     => __("Vendor price"),
83             "order_internalnote"            => __("Internal note"),
84             "order_vendornote"              => __("Vendor note"),
85             "ordernumber"                   => __("Order number"),
86             "orderstatus"                   => __("Order status"),
87             "parent_ordernumber"            => __("Parent order number (internal)"),
88             "purchaseordernumber"           => __("Not used (deprecated)"),
89             "quantity"                      => __("Quantity"),
90             "quantityreceived"              => __("Quantity received"),
91             "replacementprice"              => __("Replacement price"),
92             "rrp_tax_excluded"              => __("Retail price, tax excl."),
93             "rrp_tax_included"              => __("Retail price, tax incl."),
94             "rrp"                           => __("Retail price"),
95             "sort1_authcat"                 => __("Not used"),
96             "sort1"                         => __("Statistic 1"),
97             "sort2_authcat"                 => __("Not used"),
98             "sort2"                         => __("Statistic 2"),
99             "subscriptionid"                => __("Subscription ID (internal)"),
100             "suppliers_reference_number"    => __("Vendor reference number (EDIFACT)"),
101             "suppliers_reference_qualifier" => __("Vendor reference qualifier (EDIFACT)"),
102             "suppliers_report"              => __("Vendor report (EDIFACT)"),
103             "tax_rate_bak"                  => __("Tax rate backup (deprecated)"),
104             "tax_rate_on_ordering"          => __("Tax rate on order"),
105             "tax_rate_on_receiving"         => __("Tax rate on receive"),
106             "tax_value_bak"                 => __("Tax value backup (deprecated)"),
107             "tax_value_on_ordering"         => __("Tax amount on order"),
108             "tax_value_on_receiving"        => __("Tax amount on receive"),
109             "timestamp"                     => __("Timestamp"),
110             "uncertainprice"                => __("Uncertain price"),
111             "unitprice_tax_excluded"        => __("Actual cost, tax excl."),
112             "unitprice_tax_included"        => __("Actual cost, tax incl."),
113             "unitprice"                     => __("Actual cost"),
114         },
115         borrowers => {
116             "address"                     => __("Address"),
117             "address2"                    => __("Address 2"),
118             "altcontactaddress1"          => __("Alternate contact: Address"),
119             "altcontactaddress2"          => __("Alternate contact: Address 2"),
120             "altcontactaddress3"          => __("Alternate contact: City"),
121             "altcontactcountry"           => __("Alternate contact: Country"),
122             "altcontactfirstname"         => __("Alternate contact: First name"),
123             "altcontactphone"             => __("Alternate contact: Phone"),
124             "altcontactstate"             => __("Alternate contact: State"),
125             "altcontactsurname"           => __("Alternate contact: Surname"),
126             "altcontactzipcode"           => __("Alternate contact: ZIP/Postal code"),
127             "anonymized"                  => __("Data anonymization flag"),
128             "auth_method"                 => __("Authentication method"),
129             "autorenew_checkouts"         => __("Allow auto-renewals"),
130             "B_address"                   => __("Alternate address: Address"),
131             "B_address2"                  => __("Alternate address: Address 2"),
132             "B_city"                      => __("Alternate address: City"),
133             "B_country"                   => __("Alternate address: Country"),
134             "B_email"                     => __("Alternate address: Email"),
135             "B_phone"                     => __("Alternate address: Phone"),
136             "B_state"                     => __("Alternate address: State"),
137             "B_streetnumber"              => __("Alternate address: Street number"),
138             "B_streettype"                => __("Alternate address: Street type"),
139             "B_zipcode"                   => __("Alternate address: ZIP/Postal code"),
140             "borrowernotes"               => __("Circulation note"),
141             "borrowernumber"              => __("Borrower number"),
142             "branchcode"                  => __("Home library"),
143             "cardnumber"                  => __("Card number"),
144             "categorycode"                => __("Patron category"),
145             "checkprevcheckout"           => __("Check for previous checkouts"),
146             "city"                        => __("City"),
147             "contactfirstname"            => __("Alternate contact: First name"),
148             "contactname"                 => __("Alternate contact: Surname"),
149             "contactnote"                 => __("Alternate contact: Note"),
150             "contacttitle"                => __("Alternate contact: Title"),
151             "country"                     => __("Country"),
152             "date_renewed"                => __("Account renewal date"),
153             "dateenrolled"                => __("Registration date"),
154             "dateexpiry"                  => __("Expiry date"),
155             "dateofbirth"                 => __("Date of birth"),
156             "debarred"                    => __("Restricted [until] flag"),
157             "debarredcomment"             => __("Comment"),
158             "email"                       => __("Primary email"),
159             "emailpro"                    => __("Secondary email"),
160             "fax"                         => __("Fax"),
161             "firstname"                   => __("First name"),
162             "flags"                       => __("System permissions"),
163             "gonenoaddress"               => __("Gone no address flag"),
164             "initials"                    => __("Initials"),
165             "lang"                        => __("Preferred language for notices"),
166             "lastseen"                    => __("Last activity date"),
167             "login_attempts"              => __("Number of failed login attempts"),
168             "lost"                        => __("Lost card flag"),
169             "middle_name"                 => __("Middle name"),
170             "mobile"                      => __("Other phone"),
171             "opacnote"                    => __("OPAC note"),
172             "othernames"                  => __("Other name"),
173             "overdrive_auth_token"        => __("Overdrive auth token"),
174             "password_expiration_date"    => __("Password expiration date"),
175             "password"                    => __("Password"),
176             "phone"                       => __("Primary phone"),
177             "phonepro"                    => __("Secondary phone"),
178             "primary_contact_method"      => __("Primary contact method"),
179             "privacy_guarantor_checkouts" => __("Show checkouts to guarantor"),
180             "privacy_guarantor_fines"     => __("Show fines to guarantor"),
181             "privacy"                     => __("Privacy settings"),
182             "pronouns"                    => __("Pronouns"),
183             "relationship"                => __("Relationship"),
184             "secret"                      => __("Secret (2FA)"),
185             "sex"                         => __("Gender"),
186             "sms_provider_id"             => __("SMS provier ID (internal)"),
187             "smsalertnumber"              => __("Mobile phone number"),
188             "sort1"                       => __("Sort 1"),
189             "sort2"                       => __("Sort 2"),
190             "state"                       => __("State"),
191             "streetnumber"                => __("Street number"),
192             "streettype"                  => __("Street type"),
193             "surname"                     => __("Surname"),
194             "title"                       => __("Salutation"),
195             "updated_on"                  => __("Last update date"),
196             "userid"                      => __("Username"),
197             "zipcode"                     => __("ZIP/Postal code"),
198         },
199         items => {
200             "barcode"                           => __("Barcode"),
201             "biblioitemnumber"                  => __("Biblioitem number (internal)"),
202             "biblionumber"                      => __("Biblio number (internal)"),
203             "booksellerid"                      => __("Source of acquisition"),
204             "ccode"                             => __("Collection"),
205             "cn_sort"                           => __("Koha normalized classification for sorting"),
206             "cn_source"                         => __("Source of classification / shelving scheme"),
207             "coded_location_qualifier"          => __("Coded location qualifier"),
208             "copynumber"                        => __("Copy number"),
209             "damaged_on"                        => __("Damaged on"),
210             "damaged"                           => __("Damaged status"),
211             "dateaccessioned"                   => __("Date acquired"),
212             "datelastborrowed"                  => __("Date last checked out"),
213             "datelastseen"                      => __("Date last seen"),
214             "deleted_on"                        => __("Date of deletion"),
215             "enumchron"                         => __("Serial enumeraton/chronology"),
216             "exclude_from_local_holds_priority" => __("Exclude from local holds priority"),
217             "holdingbranch"                     => __("Current library"),
218             "homebranch"                        => __("Permanent library"),
219             "issues"                            => __("Total checkouts"),
220             "itemcallnumber"                    => __("Call number"),
221             "itemlost_on"                       => __("Lost on"),
222             "itemlost"                          => __("Lost status"),
223             "itemnotes_nonpublic"               => __("Internal note"),
224             "itemnotes"                         => __("Public note"),
225             "itemnumber"                        => __("Item number (internal)"),
226             "itype"                             => __("Koha item type"),
227             "location"                          => __("Shelving location"),
228             "materials"                         => __("Materials specified"),
229             "more_subfields_xml"                => __("Additional subfields (XML)"),
230             "new_status"                        => __("New status"),
231             "notforloan"                        => __("Not for loan"),
232             "onloan"                            => __("Due date"),
233             "permanent_location"                => __("Permanent shelving location"),
234             "price"                             => __("Price"),
235             "renewals"                          => __("Total renewals"),
236             "replacementprice"                  => __("Replacement price"),
237             "replacementpricedate"              => __("Price effective from"),
238             "reserves"                          => __("Total holds"),
239             "restricted"                        => __("Use restrictions"),
240             "stack"                             => __("Shelving control number"),
241             "stocknumber"                       => __("Inventory number"),
242             "timestamp"                         => __("Timestamp"),
243             "uri"                               => __("Uniform resource identifier"),
244             "withdrawn_on"                      => __("Withdrawn on"),
245             "withdrawn"                         => __("Withdrawn status"),
246         },
247         biblio => {
248             "abstract"      => __("Abstract"),
249             "author"        => __("Author"),
250             "biblionumber"  => __("Biblio number"),
251             "copyrightdate" => __("Copyright date"),
252             "datecreated"   => __("Creation date"),
253             "frameworkcode" => __("Framework code"),
254             "medium"        => __("Medium"),
255             "notes"         => __("Notes"),
256             "part_name"     => __("Name of part/section of a work"),
257             "part_number"   => __("Number of part/section of a work"),
258             "serial"        => __("Is a serial?"),
259             "seriestitle"   => __("Series title"),
260             "subtitle"      => __("Remainder of title"),
261             "timestamp"     => __("Modification date"),
262             "title"         => __("Title"),
263             "unititle"      => __("Uniform title"),
264         },
265         biblioitems => {
266             "agerestriction"   => __("Age restriction"),
267             "biblioitemnumber" => __("Biblioitem number"),
268             "biblionumber"     => __("Biblio number"),
269             "classification"   => __("Classification"),
270             "dewey"            => __("Dewey/classification"),
271             "illus"            => __("Illustrations"),
272             "isbn"             => __("ISBN"),
273             "issn"             => __("ISSN"),
274             "itemtype"         => __("Biblio-level item type"),
275             "lccn"             => __("LCCN"),
276             "notes"            => __("Notes"),
277             "number"           => __("Number"),
278             "pages"            => __("Number of pages"),
279             "place"            => __("Place of publication"),
280             "publicationyear"  => __("Publication date"),
281             "publishercode"    => __("Publisher"),
282             "size"             => __("Size"),
283             "subclass"         => __("Sub classification"),
284             "timestamp"        => __("Timestamp"),
285             "title"            => __("Title"),
286             "url"              => __("URL"),
287             "volume"           => __("Volume number"),
288             "volumedate"       => __("Volume date"),
289             "volumedesc"       => __("Volume information"),
290         },
291         statistics => {
292             "borrowernumber" => __("Borrower number"),
293             "branch"         => __("Library"),
294             "datetime"       => __("Statistics date and time"),
295             "itemnumber"     => __("Item number"),
296             "itemtype"       => __("Itemtype"),
297             "other"          => __(""),
298             "type"           => __("Type"),
299             "value"          => __("Value"),
300         },
301         subscription => {
302             "branchcode"  => __("Library"),
303             "callnumber"  => __("Call number"),
304             "enddate"     => __("End date"),
305             "location"    => __("Location"),
306             "periodicity" => __("Periodicity"),
307             "startdate"   => __("Start date"),
308         },
309         suggestions => {
310             "author"          => __("Author"),
311             "branchcode"      => __("Library"),
312             "collectiontitle" => __("Collection title"),
313             "copyrightdate"   => __("Copyright date"),
314             "isbn"            => __("ISBN"),
315             "itemtype"        => __("Item type"),
316             "note"            => __("Note"),
317             "patronreason"    => __("Patron reason"),
318             "place"           => __("Place of publication"),
319             "publishercode"   => __("Publisher"),
320             "quantity"        => __("Quantity"),
321             "title"           => __("Title"),
322         }
323     };
324 }
325
326 1;