Skip to content
Snippets Groups Projects
Verified Commit 91fa2bb9 authored by Andrej Ramašeuski's avatar Andrej Ramašeuski
Browse files

Datovy model pro ACL

parent 793c2da7
No related branches found
No related tags found
No related merge requests found
......@@ -18,8 +18,7 @@ __PACKAGE__->add_columns(
},
qw(
event_id
subject_class
subject
subject_id
role
),
);
......@@ -31,4 +30,11 @@ __PACKAGE__->belongs_to(
},
);
__PACKAGE__->belongs_to(
subject => 'CF::Schema::Result::EventACLSubject',
{
'foreign.id' => 'self.subject_id',
},
);
1;
package CF::Schema::Result::EventACLSubject;
use strict;
use warnings;
use base 'DBIx::Class::Core';
our $VERSION = 1;
__PACKAGE__->table('events_acl_subjects');
__PACKAGE__->add_columns(
id => {
data_type => 'integer',
is_auto_increment => 1,
is_nullable => 0,
sequence => 'uid_seq'
},
qw(
updated
class
key
name
),
);
__PACKAGE__->set_primary_key('id');
__PACKAGE__->add_unique_constraint(
class_key => [qw(class key)]
);
1;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment