View | Details | Raw Unified | Return to bug 39601
Collapse All | Expand All

(-)a/Koha/Schema/Result/Borrower.pm (-2 / +17 lines)
Lines 2161-2166 __PACKAGE__->has_many( Link Here
2161
  { cascade_copy => 0, cascade_delete => 0 },
2161
  { cascade_copy => 0, cascade_delete => 0 },
2162
);
2162
);
2163
2163
2164
=head2 webauthn_credentials
2165
2166
Type: has_many
2167
2168
Related object: L<Koha::Schema::Result::WebauthnCredential>
2169
2170
=cut
2171
2172
__PACKAGE__->has_many(
2173
  "webauthn_credentials",
2174
  "Koha::Schema::Result::WebauthnCredential",
2175
  { "foreign.borrowernumber" => "self.borrowernumber" },
2176
  { cascade_copy => 0, cascade_delete => 0 },
2177
);
2178
2164
=head2 basketnoes
2179
=head2 basketnoes
2165
2180
2166
Type: many_to_many
2181
Type: many_to_many
Lines 2212-2219 Composing rels: L</user_permissions> -> permission Link Here
2212
__PACKAGE__->many_to_many("permissions", "user_permissions", "permission");
2227
__PACKAGE__->many_to_many("permissions", "user_permissions", "permission");
2213
2228
2214
2229
2215
# Created by DBIx::Class::Schema::Loader v0.07051 @ 2025-10-29 16:44:27
2230
# Created by DBIx::Class::Schema::Loader v0.07051 @ 2026-01-07 14:02:35
2216
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SSJcjPvlr82qecmbk1Q8iA
2231
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:a7+tJLDpuCCrE3BVSdgN2g
2217
2232
2218
__PACKAGE__->belongs_to(
2233
__PACKAGE__->belongs_to(
2219
  "library",
2234
  "library",
(-)a/Koha/Schema/Result/WebauthnCredential.pm (-1 / +186 lines)
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 webauthn_credential_id
27
28
  data_type: 'integer'
29
  is_auto_increment: 1
30
  is_nullable: 0
31
32
primary key
33
34
=head2 borrowernumber
35
36
  data_type: 'integer'
37
  is_foreign_key: 1
38
  is_nullable: 0
39
40
foreign key to borrowers.borrowernumber
41
42
=head2 credential_id
43
44
  data_type: 'varbinary'
45
  is_nullable: 0
46
  size: 1024
47
48
WebAuthn credential identifier
49
50
=head2 public_key
51
52
  data_type: 'varbinary'
53
  is_nullable: 0
54
  size: 1024
55
56
COSE public key for the credential
57
58
=head2 sign_count
59
60
  data_type: 'integer'
61
  default_value: 0
62
  extra: {unsigned => 1}
63
  is_nullable: 0
64
65
signature counter for replay detection
66
67
=head2 transports
68
69
  data_type: 'varchar'
70
  is_nullable: 1
71
  size: 255
72
73
comma-separated list of authenticator transports
74
75
=head2 nickname
76
77
  data_type: 'varchar'
78
  is_nullable: 1
79
  size: 255
80
81
user-assigned name for the credential
82
83
=head2 created_date
84
85
  data_type: 'timestamp'
86
  datetime_undef_if_invalid: 1
87
  default_value: current_timestamp
88
  is_nullable: 0
89
90
date and time the credential was registered
91
92
=head2 last_used_date
93
94
  data_type: 'datetime'
95
  datetime_undef_if_invalid: 1
96
  is_nullable: 1
97
98
date and time the credential was last used to authenticate
99
100
=cut
101
102
__PACKAGE__->add_columns(
103
  "webauthn_credential_id",
104
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
105
  "borrowernumber",
106
  { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
107
  "credential_id",
108
  { data_type => "varbinary", is_nullable => 0, size => 1024 },
109
  "public_key",
110
  { data_type => "varbinary", is_nullable => 0, size => 1024 },
111
  "sign_count",
112
  {
113
    data_type => "integer",
114
    default_value => 0,
115
    extra => { unsigned => 1 },
116
    is_nullable => 0,
117
  },
118
  "transports",
119
  { data_type => "varchar", is_nullable => 1, size => 255 },
120
  "nickname",
121
  { data_type => "varchar", is_nullable => 1, size => 255 },
122
  "created_date",
123
  {
124
    data_type => "timestamp",
125
    datetime_undef_if_invalid => 1,
126
    default_value => \"current_timestamp",
127
    is_nullable => 0,
128
  },
129
  "last_used_date",
130
  {
131
    data_type => "datetime",
132
    datetime_undef_if_invalid => 1,
133
    is_nullable => 1,
134
  },
135
);
136
137
=head1 PRIMARY KEY
138
139
=over 4
140
141
=item * L</webauthn_credential_id>
142
143
=back
144
145
=cut
146
147
__PACKAGE__->set_primary_key("webauthn_credential_id");
148
149
=head1 UNIQUE CONSTRAINTS
150
151
=head2 C<credential_id>
152
153
=over 4
154
155
=item * L</credential_id>
156
157
=back
158
159
=cut
160
161
__PACKAGE__->add_unique_constraint("credential_id", ["credential_id"]);
162
163
=head1 RELATIONS
164
165
=head2 borrowernumber
166
167
Type: belongs_to
168
169
Related object: L<Koha::Schema::Result::Borrower>
170
171
=cut
172
173
__PACKAGE__->belongs_to(
174
  "borrowernumber",
175
  "Koha::Schema::Result::Borrower",
176
  { borrowernumber => "borrowernumber" },
177
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
178
);
179
180
181
# Created by DBIx::Class::Schema::Loader v0.07051 @ 2026-03-06 10:23:30
182
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:izt03pOZk7Hp9yDp9VoSjQ
183
184
185
# You can replace this text with custom code or comments, and it will be preserved on regeneration
186
1;

Return to bug 39601