2 package Koha::Schema::Result::IdentityProviderDomain;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Koha::Schema::Result::IdentityProviderDomain
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<identity_provider_domains>
22 __PACKAGE__->table("identity_provider_domains");
26 =head2 identity_provider_domain_id
32 unique key, used to identify providers domain
34 =head2 identity_provider_id
48 Domain name. If null means all domains
56 Allow user auto register
64 Update user data on auth login
66 =head2 default_library_id
73 Default library to create user if auto register is enabled
75 =head2 default_category_id
82 Default category to create user if auto register is enabled
90 Allow provider from opac interface
98 Allow provider from staff interface
102 __PACKAGE__->add_columns(
103 "identity_provider_domain_id",
104 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
105 "identity_provider_id",
106 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
108 { data_type => "varchar", is_nullable => 1, size => 100 },
110 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
112 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
113 "default_library_id",
114 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
115 "default_category_id",
116 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
118 { data_type => "tinyint", default_value => 1, is_nullable => 0 },
120 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
127 =item * L</identity_provider_domain_id>
133 __PACKAGE__->set_primary_key("identity_provider_domain_id");
135 =head1 UNIQUE CONSTRAINTS
137 =head2 C<identity_provider_id>
141 =item * L</identity_provider_id>
149 __PACKAGE__->add_unique_constraint("identity_provider_id", ["identity_provider_id", "domain"]);
153 =head2 default_category
157 Related object: L<Koha::Schema::Result::Category>
161 __PACKAGE__->belongs_to(
163 "Koha::Schema::Result::Category",
164 { categorycode => "default_category_id" },
168 on_delete => "CASCADE",
169 on_update => "RESTRICT",
173 =head2 default_library
177 Related object: L<Koha::Schema::Result::Branch>
181 __PACKAGE__->belongs_to(
183 "Koha::Schema::Result::Branch",
184 { branchcode => "default_library_id" },
188 on_delete => "CASCADE",
189 on_update => "RESTRICT",
193 =head2 identity_provider
197 Related object: L<Koha::Schema::Result::IdentityProvider>
201 __PACKAGE__->belongs_to(
203 "Koha::Schema::Result::IdentityProvider",
204 { identity_provider_id => "identity_provider_id" },
205 { is_deferrable => 1, on_delete => "CASCADE", on_update => "RESTRICT" },
209 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-11-08 17:35:26
210 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:uUnzFzRKWAiYUsmapofXwQ
212 __PACKAGE__->add_columns(
213 '+auto_register' => { is_boolean => 1 },
214 '+update_on_auth' => { is_boolean => 1 },
215 '+allow_opac' => { is_boolean => 1 },
216 '+allow_staff' => { is_boolean => 1 }
219 sub koha_object_class {
220 'Koha::Auth::Identity::Provider::Domain';
222 sub koha_objects_class {
223 'Koha::Auth::Identity::Provider::Domains';