Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision b8b112a3

Von Sven Schöling vor mehr als 11 Jahren hinzugefügt

  • ID b8b112a39bd601b0bc717646d78de470631da22a
  • Vorgänger c0931303
  • Nachfolger 2d7e4203

MetaSetup neu generiert

Unterschiede anzeigen:

SL/DB/MetaSetup/FollowUp.pm
6 6

  
7 7
use base qw(SL::DB::Object);
8 8

  
9
__PACKAGE__->meta->setup(
10
  table   => 'follow_ups',
11

  
12
  columns => [
13
    id               => { type => 'integer', not_null => 1, sequence => 'follow_up_id' },
14
    follow_up_date   => { type => 'date', not_null => 1 },
15
    created_for_user => { type => 'integer', not_null => 1 },
16
    done             => { type => 'boolean', default => 'false' },
17
    note_id          => { type => 'integer', not_null => 1 },
18
    created_by       => { type => 'integer', not_null => 1 },
19
    itime            => { type => 'timestamp', default => 'now()' },
20
    mtime            => { type => 'timestamp' },
21
  ],
22

  
23
  primary_key_columns => [ 'id' ],
24

  
25
  allow_inline_column_values => 1,
26

  
27
  foreign_keys => [
28
    employee => {
29
      class       => 'SL::DB::Employee',
30
      key_columns => { created_for_user => 'id' },
31
    },
32

  
33
    employee_obj => {
34
      class       => 'SL::DB::Employee',
35
      key_columns => { created_by => 'id' },
36
    },
37

  
38
    note => {
39
      class       => 'SL::DB::Note',
40
      key_columns => { note_id => 'id' },
41
    },
42
  ],
9
__PACKAGE__->meta->table('follow_ups');
10

  
11
__PACKAGE__->meta->columns(
12
  id               => { type => 'integer', not_null => 1, sequence => 'follow_up_id' },
13
  follow_up_date   => { type => 'date', not_null => 1 },
14
  created_for_user => { type => 'integer', not_null => 1 },
15
  done             => { type => 'boolean', default => 'false' },
16
  note_id          => { type => 'integer', not_null => 1 },
17
  created_by       => { type => 'integer', not_null => 1 },
18
  itime            => { type => 'timestamp', default => 'now()' },
19
  mtime            => { type => 'timestamp' },
43 20
);
44 21

  
22
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
23

  
24
__PACKAGE__->meta->allow_inline_column_values(1);
25

  
26
__PACKAGE__->meta->foreign_keys(
27
  employee => {
28
    class       => 'SL::DB::Employee',
29
    key_columns => { created_for_user => 'id' },
30
  },
31

  
32
  employee_obj => {
33
    class       => 'SL::DB::Employee',
34
    key_columns => { created_by => 'id' },
35
  },
36
);
37

  
38
__PACKAGE__->meta->relationships(
39
  follow_up_links => {
40
    class      => 'SL::DB::FollowUpLink',
41
    column_map => { id => 'follow_up_id' },
42
    type       => 'one to many',
43
  },
44
);
45

  
46
# __PACKAGE__->meta->initialize;
47

  
45 48
1;
46 49
;

Auch abrufbar als: Unified diff