Bug 32257: Label for patron attributes misaligned
[koha-ffzg.git] / Koha / Schema / Result / AdvancedEditorMacro.pm
1 use utf8;
2 package Koha::Schema::Result::AdvancedEditorMacro;
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::AdvancedEditorMacro
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<advanced_editor_macros>
19
20 =cut
21
22 __PACKAGE__->table("advanced_editor_macros");
23
24 =head1 ACCESSORS
25
26 =head2 id
27
28   data_type: 'integer'
29   is_auto_increment: 1
30   is_nullable: 0
31
32 Unique ID of the macro
33
34 =head2 name
35
36   data_type: 'varchar'
37   is_nullable: 0
38   size: 80
39
40 Name of the macro
41
42 =head2 macro
43
44   data_type: 'longtext'
45   is_nullable: 1
46
47 The macro code itself
48
49 =head2 borrowernumber
50
51   data_type: 'integer'
52   is_foreign_key: 1
53   is_nullable: 1
54
55 ID of the borrower who created this macro
56
57 =head2 shared
58
59   data_type: 'tinyint'
60   default_value: 0
61   is_nullable: 1
62
63 Bit to define if shared or private macro
64
65 =cut
66
67 __PACKAGE__->add_columns(
68   "id",
69   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
70   "name",
71   { data_type => "varchar", is_nullable => 0, size => 80 },
72   "macro",
73   { data_type => "longtext", is_nullable => 1 },
74   "borrowernumber",
75   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
76   "shared",
77   { data_type => "tinyint", default_value => 0, is_nullable => 1 },
78 );
79
80 =head1 PRIMARY KEY
81
82 =over 4
83
84 =item * L</id>
85
86 =back
87
88 =cut
89
90 __PACKAGE__->set_primary_key("id");
91
92 =head1 RELATIONS
93
94 =head2 borrowernumber
95
96 Type: belongs_to
97
98 Related object: L<Koha::Schema::Result::Borrower>
99
100 =cut
101
102 __PACKAGE__->belongs_to(
103   "borrowernumber",
104   "Koha::Schema::Result::Borrower",
105   { borrowernumber => "borrowernumber" },
106   {
107     is_deferrable => 1,
108     join_type     => "LEFT",
109     on_delete     => "CASCADE",
110     on_update     => "CASCADE",
111   },
112 );
113
114
115 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29
116 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:abYuKrQLDx8KB3ZdEGBlqA
117
118 __PACKAGE__->add_columns(
119             '+shared' => { is_boolean => 1 },
120         );
121
122 # You can replace this text with custom code or comments, and it will be preserved on regeneration
123 1;