Line 0
Link Here
|
0 |
- |
1 |
use utf8; |
|
|
2 |
package Koha::Schema::Result::WebauthnCredential; |
3 |
|
4 |
# Created by DBIx::Class::Schema::Loader |
5 |
# DO NOT MODIFY THE FIRST PART OF THIS FILE |
6 |
|
7 |
=head1 NAME |
8 |
|
9 |
Koha::Schema::Result::WebauthnCredential |
10 |
|
11 |
=cut |
12 |
|
13 |
use strict; |
14 |
use warnings; |
15 |
|
16 |
use base 'DBIx::Class::Core'; |
17 |
|
18 |
=head1 TABLE: C<webauthn_credentials> |
19 |
|
20 |
=cut |
21 |
|
22 |
__PACKAGE__->table("webauthn_credentials"); |
23 |
|
24 |
=head1 ACCESSORS |
25 |
|
26 |
=head2 id |
27 |
|
28 |
data_type: 'integer' |
29 |
is_auto_increment: 1 |
30 |
is_nullable: 0 |
31 |
|
32 |
=head2 borrowernumber |
33 |
|
34 |
data_type: 'integer' |
35 |
is_foreign_key: 1 |
36 |
is_nullable: 0 |
37 |
|
38 |
=head2 credential_id |
39 |
|
40 |
data_type: 'varbinary' |
41 |
is_nullable: 0 |
42 |
size: 255 |
43 |
|
44 |
=head2 public_key |
45 |
|
46 |
data_type: 'varbinary' |
47 |
is_nullable: 0 |
48 |
size: 1024 |
49 |
|
50 |
=head2 sign_count |
51 |
|
52 |
data_type: 'integer' |
53 |
default_value: 0 |
54 |
extra: {unsigned => 1} |
55 |
is_nullable: 0 |
56 |
|
57 |
=head2 transports |
58 |
|
59 |
data_type: 'varchar' |
60 |
is_nullable: 1 |
61 |
size: 255 |
62 |
|
63 |
=head2 nickname |
64 |
|
65 |
data_type: 'varchar' |
66 |
is_nullable: 1 |
67 |
size: 255 |
68 |
|
69 |
=head2 created_on |
70 |
|
71 |
data_type: 'datetime' |
72 |
datetime_undef_if_invalid: 1 |
73 |
default_value: 'current_timestamp()' |
74 |
is_nullable: 0 |
75 |
|
76 |
=head2 last_used |
77 |
|
78 |
data_type: 'datetime' |
79 |
datetime_undef_if_invalid: 1 |
80 |
is_nullable: 1 |
81 |
|
82 |
=cut |
83 |
|
84 |
__PACKAGE__->add_columns( |
85 |
"id", |
86 |
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, |
87 |
"borrowernumber", |
88 |
{ data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, |
89 |
"credential_id", |
90 |
{ data_type => "varbinary", is_nullable => 0, size => 255 }, |
91 |
"public_key", |
92 |
{ data_type => "varbinary", is_nullable => 0, size => 1024 }, |
93 |
"sign_count", |
94 |
{ |
95 |
data_type => "integer", |
96 |
default_value => 0, |
97 |
extra => { unsigned => 1 }, |
98 |
is_nullable => 0, |
99 |
}, |
100 |
"transports", |
101 |
{ data_type => "varchar", is_nullable => 1, size => 255 }, |
102 |
"nickname", |
103 |
{ data_type => "varchar", is_nullable => 1, size => 255 }, |
104 |
"created_on", |
105 |
{ |
106 |
data_type => "datetime", |
107 |
datetime_undef_if_invalid => 1, |
108 |
default_value => "current_timestamp()", |
109 |
is_nullable => 0, |
110 |
}, |
111 |
"last_used", |
112 |
{ |
113 |
data_type => "datetime", |
114 |
datetime_undef_if_invalid => 1, |
115 |
is_nullable => 1, |
116 |
}, |
117 |
); |
118 |
|
119 |
=head1 PRIMARY KEY |
120 |
|
121 |
=over 4 |
122 |
|
123 |
=item * L</id> |
124 |
|
125 |
=back |
126 |
|
127 |
=cut |
128 |
|
129 |
__PACKAGE__->set_primary_key("id"); |
130 |
|
131 |
=head1 UNIQUE CONSTRAINTS |
132 |
|
133 |
=head2 C<credential_id> |
134 |
|
135 |
=over 4 |
136 |
|
137 |
=item * L</credential_id> |
138 |
|
139 |
=back |
140 |
|
141 |
=cut |
142 |
|
143 |
__PACKAGE__->add_unique_constraint("credential_id", ["credential_id"]); |
144 |
|
145 |
=head1 RELATIONS |
146 |
|
147 |
=head2 borrowernumber |
148 |
|
149 |
Type: belongs_to |
150 |
|
151 |
Related object: L<Koha::Schema::Result::Borrower> |
152 |
|
153 |
=cut |
154 |
|
155 |
__PACKAGE__->belongs_to( |
156 |
"borrowernumber", |
157 |
"Koha::Schema::Result::Borrower", |
158 |
{ borrowernumber => "borrowernumber" }, |
159 |
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "RESTRICT" }, |
160 |
); |
161 |
|
162 |
|
163 |
# Created by DBIx::Class::Schema::Loader v0.07051 @ 2025-08-10 16:01:43 |
164 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:RYGHkNCeMvGQwrjVzFXU6Q |
165 |
|
166 |
|
167 |
# You can replace this text with custom code or comments, and it will be preserved on regeneration |
168 |
1; |