Line 0
Link Here
|
0 |
- |
1 |
use utf8; |
|
|
2 |
package Koha::Schema::Result::SmtpServer; |
3 |
|
4 |
# Created by DBIx::Class::Schema::Loader |
5 |
# DO NOT MODIFY THE FIRST PART OF THIS FILE |
6 |
|
7 |
=head1 NAME |
8 |
|
9 |
Koha::Schema::Result::SmtpServer |
10 |
|
11 |
=cut |
12 |
|
13 |
use strict; |
14 |
use warnings; |
15 |
|
16 |
use base 'DBIx::Class::Core'; |
17 |
|
18 |
=head1 TABLE: C<smtp_servers> |
19 |
|
20 |
=cut |
21 |
|
22 |
__PACKAGE__->table("smtp_servers"); |
23 |
|
24 |
=head1 ACCESSORS |
25 |
|
26 |
=head2 id |
27 |
|
28 |
data_type: 'integer' |
29 |
is_auto_increment: 1 |
30 |
is_nullable: 0 |
31 |
|
32 |
=head2 name |
33 |
|
34 |
data_type: 'varchar' |
35 |
is_nullable: 0 |
36 |
size: 80 |
37 |
|
38 |
=head2 library_id |
39 |
|
40 |
data_type: 'varchar' |
41 |
is_foreign_key: 1 |
42 |
is_nullable: 1 |
43 |
size: 10 |
44 |
|
45 |
=head2 host |
46 |
|
47 |
data_type: 'varchar' |
48 |
default_value: 'localhost' |
49 |
is_nullable: 0 |
50 |
size: 80 |
51 |
|
52 |
=head2 port |
53 |
|
54 |
data_type: 'integer' |
55 |
default_value: 25 |
56 |
is_nullable: 0 |
57 |
|
58 |
=head2 timeout |
59 |
|
60 |
data_type: 'integer' |
61 |
default_value: 120 |
62 |
is_nullable: 0 |
63 |
|
64 |
=head2 ssl |
65 |
|
66 |
data_type: 'tinyint' |
67 |
default_value: 0 |
68 |
is_nullable: 0 |
69 |
|
70 |
=head2 user_name |
71 |
|
72 |
data_type: 'varchar' |
73 |
is_nullable: 1 |
74 |
size: 80 |
75 |
|
76 |
=head2 password |
77 |
|
78 |
data_type: 'varchar' |
79 |
is_nullable: 1 |
80 |
size: 80 |
81 |
|
82 |
=cut |
83 |
|
84 |
__PACKAGE__->add_columns( |
85 |
"id", |
86 |
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, |
87 |
"name", |
88 |
{ data_type => "varchar", is_nullable => 0, size => 80 }, |
89 |
"library_id", |
90 |
{ data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 }, |
91 |
"host", |
92 |
{ |
93 |
data_type => "varchar", |
94 |
default_value => "localhost", |
95 |
is_nullable => 0, |
96 |
size => 80, |
97 |
}, |
98 |
"port", |
99 |
{ data_type => "integer", default_value => 25, is_nullable => 0 }, |
100 |
"timeout", |
101 |
{ data_type => "integer", default_value => 120, is_nullable => 0 }, |
102 |
"ssl", |
103 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
104 |
"user_name", |
105 |
{ data_type => "varchar", is_nullable => 1, size => 80 }, |
106 |
"password", |
107 |
{ data_type => "varchar", is_nullable => 1, size => 80 }, |
108 |
); |
109 |
|
110 |
=head1 PRIMARY KEY |
111 |
|
112 |
=over 4 |
113 |
|
114 |
=item * L</id> |
115 |
|
116 |
=back |
117 |
|
118 |
=cut |
119 |
|
120 |
__PACKAGE__->set_primary_key("id"); |
121 |
|
122 |
=head1 UNIQUE CONSTRAINTS |
123 |
|
124 |
=head2 C<library_id_idx> |
125 |
|
126 |
=over 4 |
127 |
|
128 |
=item * L</library_id> |
129 |
|
130 |
=back |
131 |
|
132 |
=cut |
133 |
|
134 |
__PACKAGE__->add_unique_constraint("library_id_idx", ["library_id"]); |
135 |
|
136 |
=head1 RELATIONS |
137 |
|
138 |
=head2 library |
139 |
|
140 |
Type: belongs_to |
141 |
|
142 |
Related object: L<Koha::Schema::Result::Branch> |
143 |
|
144 |
=cut |
145 |
|
146 |
__PACKAGE__->belongs_to( |
147 |
"library", |
148 |
"Koha::Schema::Result::Branch", |
149 |
{ branchcode => "library_id" }, |
150 |
{ |
151 |
is_deferrable => 1, |
152 |
join_type => "LEFT", |
153 |
on_delete => "CASCADE", |
154 |
on_update => "CASCADE", |
155 |
}, |
156 |
); |
157 |
|
158 |
|
159 |
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-07-29 18:18:55 |
160 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:0V6mrDQnN6VN2zcwfgoiyA |
161 |
|
162 |
__PACKAGE__->add_columns( |
163 |
'+ssl' => { is_boolean => 1 } |
164 |
); |
165 |
|
166 |
sub koha_objects_class { |
167 |
'Koha::SMTP::Servers'; |
168 |
} |
169 |
|
170 |
sub koha_object_class { |
171 |
'Koha::SMTP::Server'; |
172 |
} |
173 |
|
174 |
1; |