epic-s6ts
[kivitendo-erp.git] / SL / DB / Manager / Contact.pm
1 package SL::DB::Manager::Contact;
2
3 use strict;
4
5 use SL::DB::Helper::Manager;
6 use base qw(SL::DB::Helper::Manager);
7
8 use SL::DB::Helper::Sorted;
9
10 sub object_class { 'SL::DB::Contact' }
11
12 __PACKAGE__->make_manager_methods;
13
14 sub _sort_spec {
15   return (
16     default     => [ 'full_name', 1 ],
17     columns     => {
18       SIMPLE    => 'ALL',
19       full_name => [ 'lower(contacts.cp_name)', 'lower(contacts.cp_givenname)', ],
20       map { ( $_ => "lower(contacts.cp_$_)" ) } qw(abteilung city email fax givenname mobile1 mobile2 name phone1 phone2 position privatemail privatphone project satfax satphone street title zipcode)
21     });
22 }
23
24 1;