1 package SL::DB::AuthClient;
5 use SL::DB::MetaSetup::AuthClient;
6 use SL::DB::Manager::AuthClient;
7 use SL::DB::Helper::Util;
9 __PACKAGE__->meta->add_relationship(
11 type => 'many to many',
12 map_class => 'SL::DB::AuthClientUser',
17 type => 'many to many',
18 map_class => 'SL::DB::AuthClientGroup',
24 __PACKAGE__->meta->initialize;
30 push @errors, $::locale->text('The name is missing.') if !$self->name;
31 push @errors, $::locale->text('The database name is missing.') if !$self->dbname;
32 push @errors, $::locale->text('The database host is missing.') if !$self->dbhost;
33 push @errors, $::locale->text('The database port is missing.') if !$self->dbport;
34 push @errors, $::locale->text('The database user is missing.') if !$self->dbuser;
35 push @errors, $::locale->text('The name is not unique.') if !SL::DB::Helper::Util::is_unique($self, 'name');
36 push @errors, $::locale->text('The combination of database host, port and name is not unique.') if !SL::DB::Helper::Util::is_unique($self, 'dbhost', 'dbport', 'dbname');