2 package Koha::Schema::Result::CourseItem;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Koha::Schema::Result::CourseItem
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<course_items>
22 __PACKAGE__->table("course_items");
67 extra: {list => ["yes","no"]}
72 data_type: 'timestamp'
73 datetime_undef_if_invalid: 1
74 default_value: current_timestamp
79 __PACKAGE__->add_columns(
81 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
83 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
85 { data_type => "varchar", is_nullable => 1, size => 10 },
87 { data_type => "varchar", is_nullable => 1, size => 10 },
89 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
91 { data_type => "varchar", is_nullable => 1, size => 80 },
95 default_value => "no",
96 extra => { list => ["yes", "no"] },
101 data_type => "timestamp",
102 datetime_undef_if_invalid => 1,
103 default_value => \"current_timestamp",
118 __PACKAGE__->set_primary_key("ci_id");
120 =head1 UNIQUE CONSTRAINTS
126 =item * L</itemnumber>
132 __PACKAGE__->add_unique_constraint("itemnumber", ["itemnumber"]);
140 Related object: L<Koha::Schema::Result::Branch>
144 __PACKAGE__->belongs_to(
146 "Koha::Schema::Result::Branch",
147 { branchcode => "holdingbranch" },
151 on_delete => "CASCADE",
152 on_update => "CASCADE",
160 Related object: L<Koha::Schema::Result::Item>
164 __PACKAGE__->belongs_to(
166 "Koha::Schema::Result::Item",
167 { itemnumber => "itemnumber" },
168 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
172 # Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21
173 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:iVWZfUWcPfrLdLdvjyvbow
176 # You can replace this text with custom content, and it will be preserved on regeneration