Bug 18936: (follow-up) Add cloning of circulation rules back to Koha
[koha.git] / Koha / Schema / Result / Rating.pm
bloba8fe6e436ba4dd3273564b3363138eb2eafb35dd
1 use utf8;
2 package Koha::Schema::Result::Rating;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::Rating
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<ratings>
20 =cut
22 __PACKAGE__->table("ratings");
24 =head1 ACCESSORS
26 =head2 borrowernumber
28 data_type: 'integer'
29 is_foreign_key: 1
30 is_nullable: 0
32 =head2 biblionumber
34 data_type: 'integer'
35 is_foreign_key: 1
36 is_nullable: 0
38 =head2 rating_value
40 data_type: 'tinyint'
41 is_nullable: 0
43 =head2 timestamp
45 data_type: 'timestamp'
46 datetime_undef_if_invalid: 1
47 default_value: current_timestamp
48 is_nullable: 0
50 =cut
52 __PACKAGE__->add_columns(
53 "borrowernumber",
54 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
55 "biblionumber",
56 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
57 "rating_value",
58 { data_type => "tinyint", is_nullable => 0 },
59 "timestamp",
61 data_type => "timestamp",
62 datetime_undef_if_invalid => 1,
63 default_value => \"current_timestamp",
64 is_nullable => 0,
68 =head1 PRIMARY KEY
70 =over 4
72 =item * L</borrowernumber>
74 =item * L</biblionumber>
76 =back
78 =cut
80 __PACKAGE__->set_primary_key("borrowernumber", "biblionumber");
82 =head1 RELATIONS
84 =head2 biblionumber
86 Type: belongs_to
88 Related object: L<Koha::Schema::Result::Biblio>
90 =cut
92 __PACKAGE__->belongs_to(
93 "biblionumber",
94 "Koha::Schema::Result::Biblio",
95 { biblionumber => "biblionumber" },
96 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
99 =head2 borrowernumber
101 Type: belongs_to
103 Related object: L<Koha::Schema::Result::Borrower>
105 =cut
107 __PACKAGE__->belongs_to(
108 "borrowernumber",
109 "Koha::Schema::Result::Borrower",
110 { borrowernumber => "borrowernumber" },
111 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
115 # Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21
116 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:YT3jPQbA2TBuOuUXfEt7gQ
119 # You can replace this text with custom content, and it will be preserved on regeneration