Merge branch 'b-3.6.1' into mebil
[kivitendo-erp.git] / SL / DB / ProjectStatus.pm
1 package SL::DB::ProjectStatus;
2
3 use strict;
4
5 use SL::DB::MetaSetup::ProjectStatus;
6 use SL::DB::Manager::ProjectStatus;
7
8 use SL::DB::Helper::ActsAsList;
9
10 __PACKAGE__->meta->add_relationship(
11   projects => {
12     type         => 'many to one',
13     class        => 'SL::DB::Project',
14     column_map   => { id => 'project_status_id' },
15   },
16 );
17
18 __PACKAGE__->meta->initialize;
19
20 sub validate {
21   my ($self) = @_;
22
23   my @errors;
24   push @errors, $::locale->text('The description is missing.') if !$self->description;
25
26   return @errors;
27 }
28
29 1;