summaryrefslogtreecommitdiff
path: root/perl/lib/Wallet/Schema/Result/Object.pm
blob: fdec3b8f13446b917b24ff5842935d0d06ecf344 (plain)
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
# Wallet schema for an object.
#
# 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::Object;

use strict;
use warnings;

use base 'DBIx::Class::Core';

our $VERSION = '1.03';

__PACKAGE__->load_components("InflateColumn::DateTime");

=head1 NAME

Wallet::Schema::Result::Object - Wallet schema for an object

=head1 DESCRIPTION

=cut

__PACKAGE__->table("objects");

=head1 ACCESSORS

=head2 ob_type

  data_type: 'varchar'
  is_nullable: 0
  size: 16

=head2 ob_name

  data_type: 'varchar'
  is_nullable: 0
  size: 255

=head2 ob_owner

  data_type: 'integer'
  is_nullable: 1

=head2 ob_acl_get

  data_type: 'integer'
  is_nullable: 1

=head2 ob_acl_store

  data_type: 'integer'
  is_nullable: 1

=head2 ob_acl_show

  data_type: 'integer'
  is_nullable: 1

=head2 ob_acl_destroy

  data_type: 'integer'
  is_nullable: 1

=head2 ob_acl_flags

  data_type: 'integer'
  is_nullable: 1

=head2 ob_expires

  data_type: 'datetime'
  datetime_undef_if_invalid: 1
  is_nullable: 1

=head2 ob_created_by

  data_type: 'varchar'
  is_nullable: 0
  size: 255

=head2 ob_created_from

  data_type: 'varchar'
  is_nullable: 0
  size: 255

=head2 ob_created_on

  data_type: 'datetime'
  datetime_undef_if_invalid: 1
  is_nullable: 0

=head2 ob_stored_by

  data_type: 'varchar'
  is_nullable: 1
  size: 255

=head2 ob_stored_from

  data_type: 'varchar'
  is_nullable: 1
  size: 255

=head2 ob_stored_on

  data_type: 'datetime'
  datetime_undef_if_invalid: 1
  is_nullable: 1

=head2 ob_downloaded_by

  data_type: 'varchar'
  is_nullable: 1
  size: 255

=head2 ob_downloaded_from

  data_type: 'varchar'
  is_nullable: 1
  size: 255

=head2 ob_downloaded_on

  data_type: 'datetime'
  datetime_undef_if_invalid: 1
  is_nullable: 1

=head2 ob_comment

  data_type: 'varchar'
  is_nullable: 1
  size: 255

=cut

__PACKAGE__->add_columns(
  "ob_type",
  { data_type => "varchar", is_nullable => 0, size => 16 },
  "ob_name",
  { data_type => "varchar", is_nullable => 0, size => 255 },
  "ob_owner",
  { data_type => "integer", is_nullable => 1 },
  "ob_acl_get",
  { data_type => "integer", is_nullable => 1 },
  "ob_acl_store",
  { data_type => "integer", is_nullable => 1 },
  "ob_acl_show",
  { data_type => "integer", is_nullable => 1 },
  "ob_acl_destroy",
  { data_type => "integer", is_nullable => 1 },
  "ob_acl_flags",
  { data_type => "integer", is_nullable => 1 },
  "ob_expires",
  {
    data_type => "datetime",
    datetime_undef_if_invalid => 1,
    is_nullable => 1,
  },
  "ob_created_by",
  { data_type => "varchar", is_nullable => 0, size => 255 },
  "ob_created_from",
  { data_type => "varchar", is_nullable => 0, size => 255 },
  "ob_created_on",
  {
    data_type => "datetime",
    datetime_undef_if_invalid => 1,
    is_nullable => 0,
  },
  "ob_stored_by",
  { data_type => "varchar", is_nullable => 1, size => 255 },
  "ob_stored_from",
  { data_type => "varchar", is_nullable => 1, size => 255 },
  "ob_stored_on",
  {
    data_type => "datetime",
    datetime_undef_if_invalid => 1,
    is_nullable => 1,
  },
  "ob_downloaded_by",
  { data_type => "varchar", is_nullable => 1, size => 255 },
  "ob_downloaded_from",
  { data_type => "varchar", is_nullable => 1, size => 255 },
  "ob_downloaded_on",
  {
    data_type => "datetime",
    datetime_undef_if_invalid => 1,
    is_nullable => 1,
  },
  "ob_comment",
  { data_type => "varchar", is_nullable => 1, size => 255 },
);
__PACKAGE__->set_primary_key("ob_name", "ob_type");

__PACKAGE__->has_one(
                     'types',
                     'Wallet::Schema::Result::Type',
                     { 'foreign.ty_name' => 'self.ob_type' },
                    );

__PACKAGE__->has_many(
                      'flags',
                      'Wallet::Schema::Result::Flag',
                      { 'foreign.fl_type' => 'self.ob_type',
                        'foreign.fl_name' => 'self.ob_name' },
                      { cascade_copy => 0, cascade_delete => 0 },
                     );

__PACKAGE__->has_many(
                      'object_history',
                      'Wallet::Schema::Result::ObjectHistory',
                      { 'foreign.oh_type' => 'self.ob_type',
                        'foreign.oh_name' => 'self.ob_name' },
                      { cascade_copy => 0, cascade_delete => 0 },
                     );

__PACKAGE__->has_many(
                      'keytab_enctypes',
                      'Wallet::Schema::Result::KeytabEnctype',
                      { 'foreign.ke_name' => 'self.ob_name' },
                      { cascade_copy => 0, cascade_delete => 0 },
                     );

__PACKAGE__->has_many(
                      'keytab_sync',
                      'Wallet::Schema::Result::KeytabSync',
                      { 'foreign.ks_name' => 'self.ob_name' },
                      { cascade_copy => 0, cascade_delete => 0 },
                     );

# References for all of the various potential ACLs.
__PACKAGE__->belongs_to(
                        'acls_owner',
                        'Wallet::Schema::Result::Acl',
                        { 'foreign.ac_id' => 'self.ob_owner' },
                       );
__PACKAGE__->belongs_to(
                        'acls_get',
                        'Wallet::Schema::Result::Acl',
                        { 'foreign.ac_id' => 'self.ob_acl_get' },
                       );
__PACKAGE__->belongs_to(
                        'acls_store',
                        'Wallet::Schema::Result::Acl',
                        { 'foreign.ac_id' => 'self.ob_acl_store' },
                       );
__PACKAGE__->belongs_to(
                        'acls_show',
                        'Wallet::Schema::Result::Acl',
                        { 'foreign.ac_id' => 'self.ob_acl_show' },
                       );
__PACKAGE__->belongs_to(
                        'acls_destroy',
                        'Wallet::Schema::Result::Acl',
                        { 'foreign.ac_id' => 'self.ob_acl_destroy' },
                       );
__PACKAGE__->belongs_to(
                        'acls_flags',
                        'Wallet::Schema::Result::Acl',
                        { 'foreign.ac_id' => 'self.ob_acl_flags' },
                       );

1;