<<

NAME

Koha::Schema::Result::Borrower

TABLE: borrowers

ACCESSORS

borrowernumber

  data_type: 'integer'
  is_auto_increment: 1
  is_nullable: 0

primary key, Koha assigned ID number for patrons/borrowers

cardnumber

  data_type: 'varchar'
  is_nullable: 1
  size: 32

unique key, library assigned ID number for patrons/borrowers

surname

  data_type: 'longtext'
  is_nullable: 1

patron/borrower's last name (surname)

firstname

  data_type: 'mediumtext'
  is_nullable: 1

patron/borrower's first name

preferred_name

  data_type: 'longtext'
  is_nullable: 1

patron/borrower's preferred name

middle_name

  data_type: 'longtext'
  is_nullable: 1

patron/borrower's middle name

title

  data_type: 'longtext'
  is_nullable: 1

patron/borrower's title, for example: Mr. or Mrs.

othernames

  data_type: 'longtext'
  is_nullable: 1

any other names associated with the patron/borrower

initials

  data_type: 'mediumtext'
  is_nullable: 1

initials for your patron/borrower

pronouns

  data_type: 'longtext'
  is_nullable: 1

patron/borrower pronouns

streetnumber

  data_type: 'tinytext'
  is_nullable: 1

the house number for your patron/borrower's primary address

streettype

  data_type: 'tinytext'
  is_nullable: 1

the street type (Rd., Blvd, etc) for your patron/borrower's primary address

address

  data_type: 'longtext'
  is_nullable: 1

the first address line for your patron/borrower's primary address

address2

  data_type: 'mediumtext'
  is_nullable: 1

the second address line for your patron/borrower's primary address

city

  data_type: 'longtext'
  is_nullable: 1

the city or town for your patron/borrower's primary address

state

  data_type: 'mediumtext'
  is_nullable: 1

the state or province for your patron/borrower's primary address

zipcode

  data_type: 'tinytext'
  is_nullable: 1

the zip or postal code for your patron/borrower's primary address

country

  data_type: 'mediumtext'
  is_nullable: 1

the country for your patron/borrower's primary address

email

  data_type: 'longtext'
  is_nullable: 1

the primary email address for your patron/borrower's primary address

phone

  data_type: 'mediumtext'
  is_nullable: 1

the primary phone number for your patron/borrower's primary address

mobile

  data_type: 'tinytext'
  is_nullable: 1

the other phone number for your patron/borrower's primary address

fax

  data_type: 'longtext'
  is_nullable: 1

the fax number for your patron/borrower's primary address

emailpro

  data_type: 'mediumtext'
  is_nullable: 1

the secondary email addres for your patron/borrower's primary address

phonepro

  data_type: 'mediumtext'
  is_nullable: 1

the secondary phone number for your patron/borrower's primary address

B_streetnumber

  accessor: 'b_streetnumber'
  data_type: 'tinytext'
  is_nullable: 1

the house number for your patron/borrower's alternate address

B_streettype

  accessor: 'b_streettype'
  data_type: 'tinytext'
  is_nullable: 1

the street type (Rd., Blvd, etc) for your patron/borrower's alternate address

B_address

  accessor: 'b_address'
  data_type: 'mediumtext'
  is_nullable: 1

the first address line for your patron/borrower's alternate address

B_address2

  accessor: 'b_address2'
  data_type: 'mediumtext'
  is_nullable: 1

the second address line for your patron/borrower's alternate address

B_city

  accessor: 'b_city'
  data_type: 'longtext'
  is_nullable: 1

the city or town for your patron/borrower's alternate address

B_state

  accessor: 'b_state'
  data_type: 'mediumtext'
  is_nullable: 1

the state for your patron/borrower's alternate address

B_zipcode

  accessor: 'b_zipcode'
  data_type: 'tinytext'
  is_nullable: 1

the zip or postal code for your patron/borrower's alternate address

B_country

  accessor: 'b_country'
  data_type: 'mediumtext'
  is_nullable: 1

the country for your patron/borrower's alternate address

B_email

  accessor: 'b_email'
  data_type: 'mediumtext'
  is_nullable: 1

the patron/borrower's alternate email address

B_phone

  accessor: 'b_phone'
  data_type: 'longtext'
  is_nullable: 1

the patron/borrower's alternate phone number

dateofbirth

  data_type: 'date'
  datetime_undef_if_invalid: 1
  is_nullable: 1

the patron/borrower's date of birth (YYYY-MM-DD)

branchcode

  data_type: 'varchar'
  default_value: (empty string)
  is_foreign_key: 1
  is_nullable: 0
  size: 10

foreign key from the branches table, includes the code of the patron/borrower's home branch

categorycode

  data_type: 'varchar'
  default_value: (empty string)
  is_foreign_key: 1
  is_nullable: 0
  size: 10

foreign key from the categories table, includes the code of the patron category

dateenrolled

  data_type: 'date'
  datetime_undef_if_invalid: 1
  is_nullable: 1

date the patron was added to Koha (YYYY-MM-DD)

dateexpiry

  data_type: 'date'
  datetime_undef_if_invalid: 1
  is_nullable: 1

date the patron/borrower's card is set to expire (YYYY-MM-DD)

password_expiration_date

  data_type: 'date'
  datetime_undef_if_invalid: 1
  is_nullable: 1

date the patron/borrower's password is set to expire (YYYY-MM-DD)

date_renewed

  data_type: 'date'
  datetime_undef_if_invalid: 1
  is_nullable: 1

date the patron/borrower's card was last renewed

gonenoaddress

  data_type: 'tinyint'
  is_nullable: 1

set to 1 for yes and 0 for no, flag to note that library marked this patron/borrower as having an unconfirmed address

lost

  data_type: 'tinyint'
  is_nullable: 1

set to 1 for yes and 0 for no, flag to note that library marked this patron/borrower as having lost their card

debarred

  data_type: 'date'
  datetime_undef_if_invalid: 1
  is_nullable: 1

until this date the patron can only check-in (no loans, no holds, etc.), is a fine based on days instead of money (YYYY-MM-DD)

debarredcomment

  data_type: 'varchar'
  is_nullable: 1
  size: 255

comment on the stop of the patron

contactname

  data_type: 'longtext'
  is_nullable: 1

used for children and profesionals to include surname or last name of guarantor or organization name

contactfirstname

  data_type: 'mediumtext'
  is_nullable: 1

used for children to include first name of guarantor

contacttitle

  data_type: 'mediumtext'
  is_nullable: 1

used for children to include title (Mr., Mrs., etc) of guarantor

borrowernotes

  data_type: 'longtext'
  is_nullable: 1

a note on the patron/borrower's account that is only visible in the staff interface

relationship

  data_type: 'varchar'
  is_nullable: 1
  size: 100

used for children to include the relationship to their guarantor

sex

  data_type: 'varchar'
  is_nullable: 1
  size: 1

patron/borrower's gender

password

  data_type: 'varchar'
  is_nullable: 1
  size: 60

patron/borrower's Bcrypt encrypted password

secret

  data_type: 'mediumtext'
  is_nullable: 1

Secret for 2FA

auth_method

  data_type: 'enum'
  default_value: 'password'
  extra: {list => ["password","two-factor"]}
  is_nullable: 0

Authentication method

flags

  data_type: 'bigint'
  is_nullable: 1

will include a number associated with the staff member's permissions

userid

  data_type: 'varchar'
  is_nullable: 1
  size: 75

patron/borrower's opac and/or staff interface log in

opacnote

  data_type: 'longtext'
  is_nullable: 1

a note on the patron/borrower's account that is visible in the OPAC and staff interface

contactnote

  data_type: 'varchar'
  is_nullable: 1
  size: 255

a note related to the patron/borrower's alternate address

sort1

  data_type: 'varchar'
  is_nullable: 1
  size: 80

a field that can be used for any information unique to the library

sort2

  data_type: 'varchar'
  is_nullable: 1
  size: 80

a field that can be used for any information unique to the library

altcontactfirstname

  data_type: 'mediumtext'
  is_nullable: 1

first name of alternate contact for the patron/borrower

altcontactsurname

  data_type: 'mediumtext'
  is_nullable: 1

surname or last name of the alternate contact for the patron/borrower

altcontactaddress1

  data_type: 'mediumtext'
  is_nullable: 1

the first address line for the alternate contact for the patron/borrower

altcontactaddress2

  data_type: 'mediumtext'
  is_nullable: 1

the second address line for the alternate contact for the patron/borrower

altcontactaddress3

  data_type: 'mediumtext'
  is_nullable: 1

the city for the alternate contact for the patron/borrower

altcontactstate

  data_type: 'mediumtext'
  is_nullable: 1

the state for the alternate contact for the patron/borrower

altcontactzipcode

  data_type: 'mediumtext'
  is_nullable: 1

the zipcode for the alternate contact for the patron/borrower

altcontactcountry

  data_type: 'mediumtext'
  is_nullable: 1

the country for the alternate contact for the patron/borrower

altcontactphone

  data_type: 'mediumtext'
  is_nullable: 1

the phone number for the alternate contact for the patron/borrower

smsalertnumber

  data_type: 'varchar'
  is_nullable: 1
  size: 50

the mobile phone number where the patron/borrower would like to receive notices (if SMS turned on)

sms_provider_id

  data_type: 'integer'
  is_foreign_key: 1
  is_nullable: 1

the provider of the mobile phone number defined in smsalertnumber

privacy

  data_type: 'integer'
  default_value: 1
  is_nullable: 0

patron/borrower's privacy settings related to their checkout history

privacy_guarantor_fines

  data_type: 'tinyint'
  default_value: 0
  is_nullable: 0

controls if relatives can see this patron's fines

privacy_guarantor_checkouts

  data_type: 'tinyint'
  default_value: 0
  is_nullable: 0

controls if relatives can see this patron's checkouts

checkprevcheckout

  data_type: 'varchar'
  default_value: 'inherit'
  is_nullable: 0
  size: 7

produce a warning for this patron if this item has previously been checked out to this patron if 'yes', not if 'no', defer to category setting if 'inherit'.

updated_on

  data_type: 'timestamp'
  datetime_undef_if_invalid: 1
  default_value: current_timestamp
  is_nullable: 0

time of last change could be useful for synchronization with external systems (among others)

lastseen

  data_type: 'datetime'
  datetime_undef_if_invalid: 1
  is_nullable: 1

last time a patron has been seen (connected at the OPAC or staff interface)

lang

  data_type: 'varchar'
  default_value: 'default'
  is_nullable: 0
  size: 25

lang to use to send notices to this patron

login_attempts

  data_type: 'integer'
  default_value: 0
  is_nullable: 0

number of failed login attemps

overdrive_auth_token

  data_type: 'mediumtext'
  is_nullable: 1

persist OverDrive auth token

anonymized

  data_type: 'tinyint'
  default_value: 0
  is_nullable: 0

flag for data anonymization

autorenew_checkouts

  data_type: 'tinyint'
  default_value: 1
  is_nullable: 0

flag for allowing auto-renewal

primary_contact_method

  data_type: 'varchar'
  is_nullable: 1
  size: 45

useful for reporting purposes

protected

  data_type: 'tinyint'
  default_value: 0
  is_nullable: 0

boolean flag to mark selected patrons as protected from deletion

PRIMARY KEY

UNIQUE CONSTRAINTS

cardnumber

userid

RELATIONS

accountlines

Type: has_many

Related object: Koha::Schema::Result::Accountline

accountlines_managers

Type: has_many

Related object: Koha::Schema::Result::Accountline

additional_contents

Type: has_many

Related object: Koha::Schema::Result::AdditionalContent

advanced_editor_macros

Type: has_many

Related object: Koha::Schema::Result::AdvancedEditorMacro

alerts

Type: has_many

Related object: Koha::Schema::Result::Alert

api_keys

Type: has_many

Related object: Koha::Schema::Result::ApiKey

aqbasketusers

Type: has_many

Related object: Koha::Schema::Result::Aqbasketuser

aqbudgetborrowers

Type: has_many

Related object: Koha::Schema::Result::Aqbudgetborrower

aqorder_users

Type: has_many

Related object: Koha::Schema::Result::AqorderUser

aqorders

Type: has_many

Related object: Koha::Schema::Result::Aqorder

article_requests

Type: has_many

Related object: Koha::Schema::Result::ArticleRequest

bookings

Type: has_many

Related object: Koha::Schema::Result::Booking

borrower_attributes

Type: has_many

Related object: Koha::Schema::Result::BorrowerAttribute

borrower_debarments

Type: has_many

Related object: Koha::Schema::Result::BorrowerDebarment

borrower_files

Type: has_many

Related object: Koha::Schema::Result::BorrowerFile

borrower_message_preferences

Type: has_many

Related object: Koha::Schema::Result::BorrowerMessagePreference

borrower_relationships_guarantees

Type: has_many

Related object: Koha::Schema::Result::BorrowerRelationship

borrower_relationships_guarantors

Type: has_many

Related object: Koha::Schema::Result::BorrowerRelationship

branchcode

Type: belongs_to

Related object: Koha::Schema::Result::Branch

cash_register_actions

Type: has_many

Related object: Koha::Schema::Result::CashRegisterAction

categorycode

Type: belongs_to

Related object: Koha::Schema::Result::Category

checkout_renewals

Type: has_many

Related object: Koha::Schema::Result::CheckoutRenewal

club_enrollments

Type: has_many

Related object: Koha::Schema::Result::ClubEnrollment

club_holds_to_patron_holds

Type: has_many

Related object: Koha::Schema::Result::ClubHoldsToPatronHold

course_instructors

Type: has_many

Related object: Koha::Schema::Result::CourseInstructor

creator_batches

Type: has_many

Related object: Koha::Schema::Result::CreatorBatch

curbside_pickups_borrowernumbers

Type: has_many

Related object: Koha::Schema::Result::CurbsidePickup

curbside_pickups_staged_by

Type: has_many

Related object: Koha::Schema::Result::CurbsidePickup

discharges

Type: has_many

Related object: Koha::Schema::Result::Discharge

erm_counter_logs

Type: has_many

Related object: Koha::Schema::Result::ErmCounterLog

erm_user_roles

Type: has_many

Related object: Koha::Schema::Result::ErmUserRole

hold_fill_targets

Type: has_many

Related object: Koha::Schema::Result::HoldFillTarget

housebound_profile

Type: might_have

Related object: Koha::Schema::Result::HouseboundProfile

housebound_role

Type: might_have

Related object: Koha::Schema::Result::HouseboundRole

housebound_visit_chooser_brwnumbers

Type: has_many

Related object: Koha::Schema::Result::HouseboundVisit

housebound_visit_deliverer_brwnumbers

Type: has_many

Related object: Koha::Schema::Result::HouseboundVisit

illbatches

Type: has_many

Related object: Koha::Schema::Result::Illbatch

illcomments

Type: has_many

Related object: Koha::Schema::Result::Illcomment

illrequests

Type: has_many

Related object: Koha::Schema::Result::Illrequest

issues

Type: has_many

Related object: Koha::Schema::Result::Issue

issues_issuers

Type: has_many

Related object: Koha::Schema::Result::Issue

item_editor_templates

Type: has_many

Related object: Koha::Schema::Result::ItemEditorTemplate

items_last_borrowers

Type: has_many

Related object: Koha::Schema::Result::ItemsLastBorrower

linktrackers

Type: has_many

Related object: Koha::Schema::Result::Linktracker

message_queues

Type: has_many

Related object: Koha::Schema::Result::MessageQueue

messages

Type: has_many

Related object: Koha::Schema::Result::Message

messages_borrowernumbers

Type: has_many

Related object: Koha::Schema::Result::Message

old_issues

Type: has_many

Related object: Koha::Schema::Result::OldIssue

old_issues_issuers

Type: has_many

Related object: Koha::Schema::Result::OldIssue

old_reserves

Type: has_many

Related object: Koha::Schema::Result::OldReserve

patron_consents

Type: has_many

Related object: Koha::Schema::Result::PatronConsent

patron_list_patrons

Type: has_many

Related object: Koha::Schema::Result::PatronListPatron

patron_lists

Type: has_many

Related object: Koha::Schema::Result::PatronList

patronimage

Type: might_have

Related object: Koha::Schema::Result::Patronimage

problem_reports

Type: has_many

Related object: Koha::Schema::Result::ProblemReport

ratings

Type: has_many

Related object: Koha::Schema::Result::Rating

recalls

Type: has_many

Related object: Koha::Schema::Result::Recall

reserves

Type: has_many

Related object: Koha::Schema::Result::Reserve

return_claims_borrowernumbers

Type: has_many

Related object: Koha::Schema::Result::ReturnClaim

return_claims_created_by

Type: has_many

Related object: Koha::Schema::Result::ReturnClaim

return_claims_resolved_by

Type: has_many

Related object: Koha::Schema::Result::ReturnClaim

return_claims_updated_by

Type: has_many

Related object: Koha::Schema::Result::ReturnClaim

reviews

Type: has_many

Related object: Koha::Schema::Result::Review

sms_provider

Type: belongs_to

Related object: Koha::Schema::Result::SmsProvider

subscriptionroutinglists

Type: has_many

Related object: Koha::Schema::Result::Subscriptionroutinglist

suggestions_acceptedbies

Type: has_many

Related object: Koha::Schema::Result::Suggestion

suggestions_lastmodificationbies

Type: has_many

Related object: Koha::Schema::Result::Suggestion

suggestions_managedbies

Type: has_many

Related object: Koha::Schema::Result::Suggestion

suggestions_rejectedbies

Type: has_many

Related object: Koha::Schema::Result::Suggestion

suggestions_suggestedbies

Type: has_many

Related object: Koha::Schema::Result::Suggestion

tags_all

Type: has_many

Related object: Koha::Schema::Result::TagAll

tags_approvals

Type: has_many

Related object: Koha::Schema::Result::TagsApproval

ticket_updates

Type: has_many

Related object: Koha::Schema::Result::TicketUpdate

ticket_updates_assignees

Type: has_many

Related object: Koha::Schema::Result::TicketUpdate

tickets_assignees

Type: has_many

Related object: Koha::Schema::Result::Ticket

tickets_reporters

Type: has_many

Related object: Koha::Schema::Result::Ticket

tickets_resolvers

Type: has_many

Related object: Koha::Schema::Result::Ticket

tmp_holdsqueues

Type: has_many

Related object: Koha::Schema::Result::TmpHoldsqueue

user_permissions

Type: has_many

Related object: Koha::Schema::Result::UserPermission

virtualshelfcontents

Type: has_many

Related object: Koha::Schema::Result::Virtualshelfcontent

virtualshelfshares

Type: has_many

Related object: Koha::Schema::Result::Virtualshelfshare

virtualshelves

Type: has_many

Related object: Koha::Schema::Result::Virtualshelve

basketnoes

Type: many_to_many

Composing rels: "aqbasketusers" -> basketno

budgets

Type: many_to_many

Composing rels: "aqbudgetborrowers" -> budget

courses

Type: many_to_many

Composing rels: "course_instructors" -> course

ordernumbers

Type: many_to_many

Composing rels: "aqorder_users" -> ordernumber

permissions

Type: many_to_many

Composing rels: "user_permissions" -> permission

<<