Database/Model/Super/AuthoritiesPlugin.pm untested

filter: Statementstmt 0.0% 0 / 21 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 23 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Daje::Database::Model::Super::AuthoritiesPlugin;
2 use Mojo::Base 'Daje::Database::Model::Super::Common::Base', -base, -signatures, -async_await;
3 use v5.42;
4  
5 # NAME
6 # ====
7 #
8 # Daje::Database::Model::Super::AuthoritiesPlugin - Daje db model
9 #
10 # SYNOPSIS
11 # ========
12 #
13 #
14 # use Daje::Database::Model::Super::AuthoritiesPlugin;
15 #
16 # my $table = Daje::Database::Model::Super::AuthoritiesPlugin->new(db => $db);
17 #
18 # my $result = $table->load_authorities_plugin_pkey($self, $authorities_plugin_pkey);
19 ##
20 # my $result = $table->insert($self, $data);
21 #
22 # $table->update($self, $data) ;
23 #
24 #
25 # DESCRIPTION
26 # ===========
27 #
28 # Daje::Database::Model::Super::AuthoritiesPlugin is a Model super class
29 #
30 # METHODS
31 # =======
32 #
33 #
34 # LICENSE
35 # =======
36 #
37 # Copyright (C) janeskil1525.
38 #
39 # This library is free software; you can redistribute it and/or modify
40 # it under the same terms as Perl itself.
41 #
42 # AUTHOR
43 # ======
44 #
45 # janeskil1525 E<lt>janeskil1525@gmail.com
46 #
47  
48 # This file is generated automatically by Daje Tools 2026-03-01 05:33:52.
49 # It will be re-created by Daje Tools again and any changes
50 # will be over written.
51 #
52 # <!-- Autogenerated file 2026-03-01 05:33:52 -->
53  
54 our $VERSION = '0.01';
55  
56 has 'fields' => '"authorities_plugin_pkey", "editnum", "insby", "insdatetime", "modby", "moddatetime","description","name"';
57 has 'primary_key_name' => "authorities_plugin_pkey";
58 has 'table_name' => "authorities_plugin"; #
59 has 'mandatory' => 'description,name,';
60 has 'workflow' => '';
61  
62 async sub load_authorities_plugin_pkey_p($self, $authorities_plugin_pkey) {
63 return $self->load_authorities_plugin_pkey($authorities_plugin_pkey);
64 }
65  
66 sub load_authorities_plugin_pkey($self, $authorities_plugin_pkey) {
67 return $self->load_pk(
68 $self->table_name, $self->fields(), $self->primary_key_name(), $authorities_plugin_pkey
69 );
70 }
71  
72 sub insert($self, $data) {
73 my $result = $self->SUPER::insert(
74 $self->table_name, $data, $self->primary_key_name
75 );
76 return $result;
77 }
78  
79 sub update($self, $data) {
80 return $self->SUPER::update
81 (
82 $self->table_name, $data,
83 {
84 $self->primary_key_name() => $data->{$self->primary_key_name()}
85 }
86 );
87 }
88  
89 sub delete($self, $primary_key) {
90 return $self->SUPER::delete($self->table_name, { $self->primary_key_name() => $primary_key});
91 }
92 1;
93