line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
2
|
|
|
2
|
|
1166
|
use utf8; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
12
|
|
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package Interchange6::Schema::Result::State; |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 NAME |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
Interchange6::Schema::Result::State |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=cut |
10
|
|
|
|
|
|
|
|
11
|
2
|
|
|
2
|
|
91
|
use Interchange6::Schema::Candy; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
14
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 DESCRIPTION |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
ISO 3166-2 codes for sub_country identification "states" |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 ACCESSORS |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head2 states_id |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
Primary key. |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=cut |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
primary_column states_id => |
26
|
|
|
|
|
|
|
{ data_type => "integer", is_auto_increment => 1 }; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head2 scope |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
Scope. Defaults to empty string. |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=cut |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
column scope => |
35
|
|
|
|
|
|
|
{ data_type => "varchar", default_value => "", size => 32 }; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head2 country_iso_code |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
FK on L<Interchange6::Schema::Result::Country/country_iso_code>. |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=cut |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
column country_iso_code => |
44
|
|
|
|
|
|
|
{ data_type => "char", size => 2 }; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head2 state_iso_code |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
State ISO code, e.g.: NY. |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=cut |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
column state_iso_code => |
53
|
|
|
|
|
|
|
{ data_type => "varchar", default_value => "", size => 6 }; |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head2 name |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Full name of state/province, e.g.: New York. |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
Defaults to empty string. |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=cut |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
column name => { |
64
|
|
|
|
|
|
|
data_type => "varchar", |
65
|
|
|
|
|
|
|
default_value => "", |
66
|
|
|
|
|
|
|
size => 255 |
67
|
|
|
|
|
|
|
}; |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head2 priority |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
Display sort order. Defaults to 0. |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=cut |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
column priority => |
76
|
|
|
|
|
|
|
{ data_type => "integer", default_value => 0 }; |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head2 active |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
Whether state is an active shipping destination. Defaults to 1 (true). |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=cut |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
column active => |
85
|
|
|
|
|
|
|
{ data_type => "boolean", default_value => 1 }; |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head1 UNIQUE CONSTRAINT |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=head2 states_state_country |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=over 4 |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=item * L</country_iso_code> |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=item * L</state_iso_code> |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=back |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=cut |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
unique_constraint states_state_country => [qw/country_iso_code state_iso_code/]; |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=head1 RELATIONS |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=head2 country |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
Type: belongs_to |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
Related object: L<Interchange6::Schema::Result::Country> |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=cut |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
belongs_to |
114
|
|
|
|
|
|
|
country => "Interchange6::Schema::Result::Country", |
115
|
|
|
|
|
|
|
"country_iso_code", |
116
|
|
|
|
|
|
|
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }; |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=head2 zone_states |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
Type: has_many |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
Related object L<Interchange6::Schema::Result::ZoneState> |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=cut |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
has_many |
127
|
|
|
|
|
|
|
zone_states => "Interchange6::Schema::Result::ZoneState", |
128
|
|
|
|
|
|
|
"states_id", |
129
|
|
|
|
|
|
|
{ cascade_copy => 0, cascade_delete => 0 }; |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
=head2 zones |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
Type: many_to_many |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
Composing rels: L</zone_states> -> zone |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
=cut |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
many_to_many zones => "zone_states", "zone"; |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
1; |