<<

NAME

Koha::Schema::Result::Booking

TABLE: bookings

ACCESSORS

booking_id

  data_type: 'integer'
  is_auto_increment: 1
  is_nullable: 0

primary key

patron_id

  data_type: 'integer'
  default_value: 0
  is_foreign_key: 1
  is_nullable: 0

foreign key from the borrowers table defining which patron this booking is for

biblio_id

  data_type: 'integer'
  default_value: 0
  is_foreign_key: 1
  is_nullable: 0

foreign key from the biblio table defining which bib record this booking is on

item_id

  data_type: 'integer'
  is_foreign_key: 1
  is_nullable: 1

foreign key from the items table defining the specific item the patron has placed a booking for

pickup_library_id

  data_type: 'varchar'
  is_foreign_key: 1
  is_nullable: 0
  size: 10

Identifier for booking pickup library

start_date

  data_type: 'datetime'
  datetime_undef_if_invalid: 1
  is_nullable: 1

the start date of the booking

end_date

  data_type: 'datetime'
  datetime_undef_if_invalid: 1
  is_nullable: 1

the end date of the booking

creation_date

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

the timestamp for when a booking was created

modification_date

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

the timestamp for when a booking has been updated

status

  data_type: 'enum'
  default_value: 'new'
  extra: {list => ["new","cancelled","completed"]}
  is_nullable: 0

current status of the booking

cancellation_reason

  data_type: 'varchar'
  is_nullable: 1
  size: 80

optional authorised value BOOKING_CANCELLATION

PRIMARY KEY

RELATIONS

biblio

Type: belongs_to

Related object: Koha::Schema::Result::Biblio

item

Type: belongs_to

Related object: Koha::Schema::Result::Item

patron

Type: belongs_to

Related object: Koha::Schema::Result::Borrower

pickup_library

Type: belongs_to

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

<<