aboutsummaryrefslogtreecommitdiff
path: root/perl/lib/Wallet/Schema/Result/Type.pm
blob: 7ffd03cc43c4ee3ed6b0aca56a6fe70e95230290 (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
# Wallet schema for object types.
#
# Written by Jon Robertson <jonrober@stanford.edu>
# Copyright 2012-2013
#     The Board of Trustees of the Leland Stanford Junior University
#
# SPDX-License-Identifier: MIT

package Wallet::Schema::Result::Type;

use strict;
use warnings;

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

our $VERSION = '1.05';

=for stopwords
APIs

=head1 NAME

Wallet::Schema::Result::Type - Wallet schema for object types

=head1 DESCRIPTION

This is a normalization table used to constrain the values in other
tables.  It contains the types of wallet objects that are considered
valid, and the modules that govern each.

By default it contains the following entries:

  insert into types (ty_name, ty_class)
      values ('file', 'Wallet::Object::File');
  insert into types (ty_name, ty_class)
      values ('keytab', 'Wallet::Object::Keytab');

If you have extended the wallet to support additional object types ,
you will want to add additional rows to this table mapping those types
to Perl classes that implement the object APIs.

=cut

__PACKAGE__->table("types");

=head1 ACCESSORS

=head2 ty_name

  data_type: 'varchar'
  is_nullable: 0
  size: 16

=head2 ty_class

  data_type: 'varchar'
  is_nullable: 1
  size: 64

=cut

__PACKAGE__->add_columns(
  "ty_name",
  { data_type => "varchar", is_nullable => 0, size => 16 },
  "ty_class",
  { data_type => "varchar", is_nullable => 1, size => 64 },
);
__PACKAGE__->set_primary_key("ty_name");

#__PACKAGE__->has_many(
#                      'objects',
#                      'Wallet::Schema::Result::Object',
#                      { 'foreign.ob_type' => 'self.ty_name' },
#                      { cascade_copy => 0, cascade_delete => 0 },
#                     );

1;