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

(-)a/Koha/Schema/Result/L10nSource.pm (+113 lines)
Line 0 Link Here
1
use utf8;
2
package Koha::Schema::Result::L10nSource;
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::L10nSource
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<l10n_source>
19
20
=cut
21
22
__PACKAGE__->table("l10n_source");
23
24
=head1 ACCESSORS
25
26
=head2 l10n_source_id
27
28
  data_type: 'integer'
29
  is_auto_increment: 1
30
  is_nullable: 0
31
32
=head2 group
33
34
  data_type: 'varchar'
35
  is_nullable: 1
36
  size: 100
37
38
=head2 key
39
40
  data_type: 'varchar'
41
  is_nullable: 0
42
  size: 100
43
44
=head2 text
45
46
  data_type: 'text'
47
  is_nullable: 0
48
49
=cut
50
51
__PACKAGE__->add_columns(
52
  "l10n_source_id",
53
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
54
  "group",
55
  { data_type => "varchar", is_nullable => 1, size => 100 },
56
  "key",
57
  { data_type => "varchar", is_nullable => 0, size => 100 },
58
  "text",
59
  { data_type => "text", is_nullable => 0 },
60
);
61
62
=head1 PRIMARY KEY
63
64
=over 4
65
66
=item * L</l10n_source_id>
67
68
=back
69
70
=cut
71
72
__PACKAGE__->set_primary_key("l10n_source_id");
73
74
=head1 UNIQUE CONSTRAINTS
75
76
=head2 C<group_key>
77
78
=over 4
79
80
=item * L</group>
81
82
=item * L</key>
83
84
=back
85
86
=cut
87
88
__PACKAGE__->add_unique_constraint("group_key", ["group", "key"]);
89
90
=head1 RELATIONS
91
92
=head2 l10n_targets
93
94
Type: has_many
95
96
Related object: L<Koha::Schema::Result::L10nTarget>
97
98
=cut
99
100
__PACKAGE__->has_many(
101
  "l10n_targets",
102
  "Koha::Schema::Result::L10nTarget",
103
  { "foreign.l10n_source_id" => "self.l10n_source_id" },
104
  { cascade_copy => 0, cascade_delete => 0 },
105
);
106
107
108
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-03-28 15:03:23
109
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QRPw3vO+2BbF4AmGCuucGw
110
111
112
# You can replace this text with custom code or comments, and it will be preserved on regeneration
113
1;
(-)a/Koha/Schema/Result/L10nTarget.pm (-1 / +121 lines)
Line 0 Link Here
0
- 
1
use utf8;
2
package Koha::Schema::Result::L10nTarget;
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::L10nTarget
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<l10n_target>
19
20
=cut
21
22
__PACKAGE__->table("l10n_target");
23
24
=head1 ACCESSORS
25
26
=head2 l10n_target_id
27
28
  data_type: 'integer'
29
  is_auto_increment: 1
30
  is_nullable: 0
31
32
=head2 l10n_source_id
33
34
  data_type: 'integer'
35
  is_foreign_key: 1
36
  is_nullable: 0
37
38
=head2 language
39
40
  data_type: 'varchar'
41
  is_nullable: 0
42
  size: 10
43
44
=head2 translation
45
46
  data_type: 'text'
47
  is_nullable: 0
48
49
=head2 fuzzy
50
51
  data_type: 'tinyint'
52
  default_value: 0
53
  is_nullable: 0
54
55
=cut
56
57
__PACKAGE__->add_columns(
58
  "l10n_target_id",
59
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
60
  "l10n_source_id",
61
  { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
62
  "language",
63
  { data_type => "varchar", is_nullable => 0, size => 10 },
64
  "translation",
65
  { data_type => "text", is_nullable => 0 },
66
  "fuzzy",
67
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
68
);
69
70
=head1 PRIMARY KEY
71
72
=over 4
73
74
=item * L</l10n_target_id>
75
76
=back
77
78
=cut
79
80
__PACKAGE__->set_primary_key("l10n_target_id");
81
82
=head1 UNIQUE CONSTRAINTS
83
84
=head2 C<l10n_source_language>
85
86
=over 4
87
88
=item * L</l10n_source_id>
89
90
=item * L</language>
91
92
=back
93
94
=cut
95
96
__PACKAGE__->add_unique_constraint("l10n_source_language", ["l10n_source_id", "language"]);
97
98
=head1 RELATIONS
99
100
=head2 l10n_source
101
102
Type: belongs_to
103
104
Related object: L<Koha::Schema::Result::L10nSource>
105
106
=cut
107
108
__PACKAGE__->belongs_to(
109
  "l10n_source",
110
  "Koha::Schema::Result::L10nSource",
111
  { l10n_source_id => "l10n_source_id" },
112
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
113
);
114
115
116
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-03-28 15:03:23
117
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:oXnI0NR9rifXbtfWYqcxzg
118
119
120
# You can replace this text with custom code or comments, and it will be preserved on regeneration
121
1;

Return to bug 24975