1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
# Wallet schema for an ACL.
#
# Written by Jon Robertson <jonrober@stanford.edu>
# Copyright 2012, 2013
# The Board of Trustees of the Leland Stanford Junior University
#
# See LICENSE for licensing terms.
package Wallet::Schema::Result::Acl;
use strict;
use warnings;
use base 'DBIx::Class::Core';
=for stopwords
ACL
=head1 NAME
Wallet::Schema::Result::Acl - Wallet schema for an ACL
=head1 DESCRIPTION
=cut
__PACKAGE__->table("acls");
=head1 ACCESSORS
=head2 ac_id
data_type: 'integer'
is_auto_increment: 1
is_nullable: 0
=head2 ac_name
data_type: 'varchar'
is_nullable: 0
size: 255
=cut
__PACKAGE__->add_columns(
"ac_id",
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
"ac_name",
{ data_type => "varchar", is_nullable => 0, size => 255 },
);
__PACKAGE__->set_primary_key("ac_id");
__PACKAGE__->add_unique_constraint("ac_name", ["ac_name"]);
__PACKAGE__->has_one(
'acl_entries',
'Wallet::Schema::Result::AclEntry',
{ 'foreign.ae_id' => 'self.ac_id' },
{ cascade_copy => 0, cascade_delete => 0 },
);
__PACKAGE__->has_many(
'acl_history',
'Wallet::Schema::Result::AclHistory',
{ 'foreign.ah_id' => 'self.ac_id' },
{ cascade_copy => 0, cascade_delete => 0 },
);
# References for all of the various potential ACLs in owners.
__PACKAGE__->has_many(
'acls_owner',
'Wallet::Schema::Result::Object',
{ 'foreign.ob_owner' => 'self.ac_id' },
);
__PACKAGE__->has_many(
'acls_get',
'Wallet::Schema::Result::Object',
{ 'foreign.ob_acl_get' => 'self.ac_id' },
);
__PACKAGE__->has_many(
'acls_store',
'Wallet::Schema::Result::Object',
{ 'foreign.ob_acl_store' => 'self.ac_id' },
);
__PACKAGE__->has_many(
'acls_show',
'Wallet::Schema::Result::Object',
{ 'foreign.ob_acl_show' => 'self.ac_id' },
);
__PACKAGE__->has_many(
'acls_destroy',
'Wallet::Schema::Result::Object',
{ 'foreign.ob_acl_destroy' => 'self.ac_id' },
);
__PACKAGE__->has_many(
'acls_flags',
'Wallet::Schema::Result::Object',
{ 'foreign.ob_acl_flags' => 'self.ac_id' },
);
# Override the insert method so that we can automatically create history
# items.
#sub insert {
# my ($self, @args) = @_;
# my $ret = $self->next::method (@args);
# print "ID: ".$self->ac_id."\n";
# use Data::Dumper; print Dumper (@args);
# return $self;
#}
1;
|