Bug 33606: (QA follow-up) Cosmetic changes
[koha.git] / Koha / Schema / Result / IdentityProvider.pm
1 use utf8;
2 package Koha::Schema::Result::IdentityProvider;
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::IdentityProvider
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<identity_providers>
19
20 =cut
21
22 __PACKAGE__->table("identity_providers");
23
24 =head1 ACCESSORS
25
26 =head2 identity_provider_id
27
28   data_type: 'integer'
29   is_auto_increment: 1
30   is_nullable: 0
31
32 unique key, used to identify the provider
33
34 =head2 code
35
36   data_type: 'varchar'
37   is_nullable: 0
38   size: 20
39
40 Provider code
41
42 =head2 description
43
44   data_type: 'varchar'
45   is_nullable: 0
46   size: 255
47
48 Description for the provider
49
50 =head2 protocol
51
52   data_type: 'enum'
53   extra: {list => ["OAuth","OIDC","LDAP","CAS"]}
54   is_nullable: 0
55
56 Protocol provider speaks
57
58 =head2 config
59
60   data_type: 'longtext'
61   is_nullable: 0
62
63 Configuration of the provider in JSON format
64
65 =head2 mapping
66
67   data_type: 'longtext'
68   is_nullable: 0
69
70 Configuration to map provider data to Koha user
71
72 =head2 matchpoint
73
74   data_type: 'enum'
75   extra: {list => ["email","userid","cardnumber"]}
76   is_nullable: 0
77
78 The patron attribute to be used as matchpoint
79
80 =head2 icon_url
81
82   data_type: 'varchar'
83   is_nullable: 1
84   size: 255
85
86 Provider icon URL
87
88 =cut
89
90 __PACKAGE__->add_columns(
91   "identity_provider_id",
92   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
93   "code",
94   { data_type => "varchar", is_nullable => 0, size => 20 },
95   "description",
96   { data_type => "varchar", is_nullable => 0, size => 255 },
97   "protocol",
98   {
99     data_type => "enum",
100     extra => { list => ["OAuth", "OIDC", "LDAP", "CAS"] },
101     is_nullable => 0,
102   },
103   "config",
104   { data_type => "longtext", is_nullable => 0 },
105   "mapping",
106   { data_type => "longtext", is_nullable => 0 },
107   "matchpoint",
108   {
109     data_type => "enum",
110     extra => { list => ["email", "userid", "cardnumber"] },
111     is_nullable => 0,
112   },
113   "icon_url",
114   { data_type => "varchar", is_nullable => 1, size => 255 },
115 );
116
117 =head1 PRIMARY KEY
118
119 =over 4
120
121 =item * L</identity_provider_id>
122
123 =back
124
125 =cut
126
127 __PACKAGE__->set_primary_key("identity_provider_id");
128
129 =head1 UNIQUE CONSTRAINTS
130
131 =head2 C<code>
132
133 =over 4
134
135 =item * L</code>
136
137 =back
138
139 =cut
140
141 __PACKAGE__->add_unique_constraint("code", ["code"]);
142
143 =head1 RELATIONS
144
145 =head2 identity_provider_domains
146
147 Type: has_many
148
149 Related object: L<Koha::Schema::Result::IdentityProviderDomain>
150
151 =cut
152
153 __PACKAGE__->has_many(
154   "identity_provider_domains",
155   "Koha::Schema::Result::IdentityProviderDomain",
156   { "foreign.identity_provider_id" => "self.identity_provider_id" },
157   { cascade_copy => 0, cascade_delete => 0 },
158 );
159
160
161 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-11-10 13:01:32
162 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xSD/bRC3hJCF+nP/EYwn3Q
163
164 __PACKAGE__->has_many(
165   "domains",
166   "Koha::Schema::Result::IdentityProviderDomain",
167   { "foreign.identity_provider_id" => "self.identity_provider_id" },
168   { cascade_copy => 0, cascade_delete => 0 },
169 );
170
171 sub koha_object_class {
172     'Koha::Auth::Identity::Provider';
173 }
174 sub koha_objects_class {
175     'Koha::Auth::Identity::Providers';
176 }
177
178 1;