The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Interchange6::Schema::Result::Address

DESCRIPTION

The Address class is used to store any kind of address such as billing, delivery, etc along with company and individual names if needed.

ACCESSORS

addresses_id

Primary key.

users_id

Foreign key constraint on "users_id" in Interchange6::Schema::Result::User via "user" relationship.

type

Address "type" for such things as "billing" or "shipping". Defaults to empty string.

archived

Boolean indicating that address has been archived and so should no longer appear in normal address listings.

first_name

First name of person associated with address. Defaults to empty string.

last_name

Last name of person associated with address. Defaults to empty string.

company

Company name associated with address. Defaults to empty string.

address

First line of address. Defaults to empty string.

address_2

Second line of address. Defaults to empty string.

postal_code

Postal/zip code. Defaults to empty string.

city

City/town name. Defaults to empty string.

phone

Telephone number. Defaults to empty string.

states_id

Foreign key constraint on "states_id" in Interchange6::Schema::Result::State via "state" relationship. NULL values are allowed.

country_iso_code

Two character country ISO code. Foreign key constraint on "country_iso_code" in Interchange6::Schema::Result::Country via "country" relationship.

priority

Signed integer priority. We normally order descending. A simple use might be to set default address to 1 and others to 0.

Defaults to 0.

created

Date and time when this record was created returned as DateTime object. Value is auto-set on insert.

last_modified

Date and time when this record was last modified returned as DateTime object. Value is auto-set on insert and update.

RELATIONS

orderlines_shipping

Type: has_many

Related object: Interchange6::Schema::Result::OrderlinesShipping

orders

Type: has_many

Related object: Interchange6::Schema::Result::Order

user

Type: belongs_to

Related object: Interchange6::Schema::Result::User

state

Type: belongs_to

Related object: Interchange6::Schema::Result::State

country

Type: belongs_to

Related object: Interchange6::Schema::Result::Country

orderlines

Type: many_to_many

Composing rels: "orderlines_shipping" -> orderline

METHODS

delete

If an address cannot be deleted due to foreign key constraints (perhaps it has "orders" or "orderlines_shipping") then instead of deleting the row set "archived" to true.