View | Details | Raw Unified | Return to bug 22343
Collapse All | Expand All

(-)a/Koha/Schema/Result/LibrarySmtpServer.pm (+120 lines)
Line 0 Link Here
1
use utf8;
2
package Koha::Schema::Result::LibrarySmtpServer;
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::LibrarySmtpServer
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<library_smtp_servers>
19
20
=cut
21
22
__PACKAGE__->table("library_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 library_id
33
34
  data_type: 'varchar'
35
  is_foreign_key: 1
36
  is_nullable: 0
37
  size: 10
38
39
=head2 smtp_server_id
40
41
  data_type: 'integer'
42
  is_foreign_key: 1
43
  is_nullable: 0
44
45
=cut
46
47
__PACKAGE__->add_columns(
48
  "id",
49
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
50
  "library_id",
51
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 10 },
52
  "smtp_server_id",
53
  { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
54
);
55
56
=head1 PRIMARY KEY
57
58
=over 4
59
60
=item * L</id>
61
62
=back
63
64
=cut
65
66
__PACKAGE__->set_primary_key("id");
67
68
=head1 UNIQUE CONSTRAINTS
69
70
=head2 C<library_id_idx>
71
72
=over 4
73
74
=item * L</library_id>
75
76
=back
77
78
=cut
79
80
__PACKAGE__->add_unique_constraint("library_id_idx", ["library_id"]);
81
82
=head1 RELATIONS
83
84
=head2 library
85
86
Type: belongs_to
87
88
Related object: L<Koha::Schema::Result::Branch>
89
90
=cut
91
92
__PACKAGE__->belongs_to(
93
  "library",
94
  "Koha::Schema::Result::Branch",
95
  { branchcode => "library_id" },
96
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
97
);
98
99
=head2 smtp_server
100
101
Type: belongs_to
102
103
Related object: L<Koha::Schema::Result::SmtpServer>
104
105
=cut
106
107
__PACKAGE__->belongs_to(
108
  "smtp_server",
109
  "Koha::Schema::Result::SmtpServer",
110
  { id => "smtp_server_id" },
111
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
112
);
113
114
115
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-08-24 13:41:24
116
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:qKAQAs3VFcitIGDGra/zuw
117
118
119
# You can replace this text with custom code or comments, and it will be preserved on regeneration
120
1;
(-)a/Koha/Schema/Result/SmtpServer.pm (-1 / +158 lines)
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 host
39
40
  data_type: 'varchar'
41
  default_value: 'localhost'
42
  is_nullable: 0
43
  size: 80
44
45
=head2 port
46
47
  data_type: 'integer'
48
  default_value: 25
49
  is_nullable: 0
50
51
=head2 timeout
52
53
  data_type: 'integer'
54
  default_value: 120
55
  is_nullable: 0
56
57
=head2 ssl_mode
58
59
  data_type: 'enum'
60
  extra: {list => ["disabled","ssl","starttls"]}
61
  is_nullable: 0
62
63
=head2 user_name
64
65
  data_type: 'varchar'
66
  is_nullable: 1
67
  size: 80
68
69
=head2 password
70
71
  data_type: 'varchar'
72
  is_nullable: 1
73
  size: 80
74
75
=head2 debug
76
77
  data_type: 'tinyint'
78
  default_value: 0
79
  is_nullable: 0
80
81
=cut
82
83
__PACKAGE__->add_columns(
84
  "id",
85
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
86
  "name",
87
  { data_type => "varchar", is_nullable => 0, size => 80 },
88
  "host",
89
  {
90
    data_type => "varchar",
91
    default_value => "localhost",
92
    is_nullable => 0,
93
    size => 80,
94
  },
95
  "port",
96
  { data_type => "integer", default_value => 25, is_nullable => 0 },
97
  "timeout",
98
  { data_type => "integer", default_value => 120, is_nullable => 0 },
99
  "ssl_mode",
100
  {
101
    data_type => "enum",
102
    extra => { list => ["disabled", "ssl", "starttls"] },
103
    is_nullable => 0,
104
  },
105
  "user_name",
106
  { data_type => "varchar", is_nullable => 1, size => 80 },
107
  "password",
108
  { data_type => "varchar", is_nullable => 1, size => 80 },
109
  "debug",
110
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
111
);
112
113
=head1 PRIMARY KEY
114
115
=over 4
116
117
=item * L</id>
118
119
=back
120
121
=cut
122
123
__PACKAGE__->set_primary_key("id");
124
125
=head1 RELATIONS
126
127
=head2 library_smtp_servers
128
129
Type: has_many
130
131
Related object: L<Koha::Schema::Result::LibrarySmtpServer>
132
133
=cut
134
135
__PACKAGE__->has_many(
136
  "library_smtp_servers",
137
  "Koha::Schema::Result::LibrarySmtpServer",
138
  { "foreign.smtp_server_id" => "self.id" },
139
  { cascade_copy => 0, cascade_delete => 0 },
140
);
141
142
143
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-08-21 18:02:08
144
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:OpyR6JhcwWKQP2+hyaLiww
145
146
__PACKAGE__->add_columns(
147
    '+debug' => { is_boolean => 1 }
148
);
149
150
sub koha_objects_class {
151
    'Koha::SMTP::Servers';
152
}
153
154
sub koha_object_class {
155
    'Koha::SMTP::Server';
156
}
157
158
1;

Return to bug 22343