Bug 21797: Update two-column templates with Bootstrap grid: Acquisitions part 5
[koha.git] / Koha / Schema / Result / SubscriptionFrequency.pm
blob654b223ab63c175d9fe66bcf28aacbb37a7bb124
1 use utf8;
2 package Koha::Schema::Result::SubscriptionFrequency;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::SubscriptionFrequency
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<subscription_frequencies>
20 =cut
22 __PACKAGE__->table("subscription_frequencies");
24 =head1 ACCESSORS
26 =head2 id
28 data_type: 'integer'
29 is_auto_increment: 1
30 is_nullable: 0
32 =head2 description
34 data_type: 'mediumtext'
35 is_nullable: 0
37 =head2 displayorder
39 data_type: 'integer'
40 is_nullable: 1
42 =head2 unit
44 data_type: 'enum'
45 extra: {list => ["day","week","month","year"]}
46 is_nullable: 1
48 =head2 unitsperissue
50 data_type: 'integer'
51 default_value: 1
52 is_nullable: 0
54 =head2 issuesperunit
56 data_type: 'integer'
57 default_value: 1
58 is_nullable: 0
60 =cut
62 __PACKAGE__->add_columns(
63 "id",
64 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
65 "description",
66 { data_type => "mediumtext", is_nullable => 0 },
67 "displayorder",
68 { data_type => "integer", is_nullable => 1 },
69 "unit",
71 data_type => "enum",
72 extra => { list => ["day", "week", "month", "year"] },
73 is_nullable => 1,
75 "unitsperissue",
76 { data_type => "integer", default_value => 1, is_nullable => 0 },
77 "issuesperunit",
78 { data_type => "integer", default_value => 1, is_nullable => 0 },
81 =head1 PRIMARY KEY
83 =over 4
85 =item * L</id>
87 =back
89 =cut
91 __PACKAGE__->set_primary_key("id");
93 =head1 RELATIONS
95 =head2 subscriptions
97 Type: has_many
99 Related object: L<Koha::Schema::Result::Subscription>
101 =cut
103 __PACKAGE__->has_many(
104 "subscriptions",
105 "Koha::Schema::Result::Subscription",
106 { "foreign.periodicity" => "self.id" },
107 { cascade_copy => 0, cascade_delete => 0 },
111 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:54
112 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:AMA/p9t1S6NmZTAHThLROQ
115 # You can replace this text with custom code or comments, and it will be preserved on regeneration