NAME

Mango::Schema::Order - DBIC schema class for orders

SYNOPSIS

use Mango::Schema;
my $schema = Mango::Schema->connect;
my $orders = $schema->resultset('Orders')->search;

DESCRIPTION

Mango::Schema::Order is loaded by Mango::Schema to read/write order data.

COLUMNS

id

Contains the primary key for each order record.

id => {
    data_type         => 'INT',
    is_auto_increment => 1,
    is_nullable       => 0,
    extras            => {unsigned => 1}
},

user_id

Contains the foreign key to the user this order belongs to.

user_id => {
    data_type      => 'INT',
    is_nullable    => 1,
    is_foreign_key => 1,
    default_value  => undef,
    extras         => {unsigned => 1}
},

type

Contains the type for this order. The current values are ORDER_TYPE_TEMP and ORDER_TYPE_SAVED from Handel::Constants.

type => {
    data_type     => 'tinyint',
    size          => 3,
    is_nullable   => 0,
    default_value => 0
},

number

The order number for this order.

number => {
    data_type     => 'varchar',
    size          => 20,
    is_nullable   => 1,
    default_value => undef
},

created

The date this order record was created.

created => {
    data_type     => 'datetime',
    is_nullable   => 1,
    default_value => undef
},

updated

The date this order record was last updated.

updated => {
    data_type     => 'datetime',
    is_nullable   => 1,
    default_value => undef
},

comments

Any user comments for this order.

comments => {
    data_type     => 'varchar',
    size          => 100,
    is_nullable   => 1,
    default_value => undef
},

shipmethod

The shipping method for this order.

shipmethod => {
    data_type     => 'varchar',
    size          => 20,
    is_nullable   => 1,
    default_value => undef
},

shipping

The shipping cost for this order.

shipping => {
    data_type      => 'decimal',
    size           => [9,2],
    is_nullable    => 0,
    default_value  => '0.00'
},

handling

The handling charge for this order.

handling => {
    data_type      => 'decimal',
    size           => [9,2],
    is_nullable    => 0,
    default_value  => '0.00'
},

tax

The tax amount for this order.

tax => {
    data_type      => 'decimal',
    size           => [9,2],
    is_nullable    => 0,
    default_value  => '0.00'
},

subtotal

The subtotal of all the items on this order.

subtotal => {
    data_type      => 'decimal',
    size           => [9,2],
    is_nullable    => 0,
    default_value  => '0.00'
},

total

The total cost of the current order.

total => {
    data_type      => 'decimal',
    size           => [9,2],
    is_nullable    => 0,
    default_value  => '0.00'
},

billtofirstname

The first name for the billing address for this order.

billtofirstname => {
    data_type     => 'varchar',
    size          => 25,
    is_nullable   => 1,
    default_value => undef
},

billtolastname

The last name for the billing address for this order.

billtolastname => {
    data_type     => 'varchar',
    size          => 25,
    is_nullable   => 1,
    default_value => undef
},

billtoaddress1

The billing address line 1 for this order.

billtoaddress1 => {
    data_type     => 'varchar',
    size          => 50,
    is_nullable   => 1,
    default_value => undef
},

billtoaddress2

The billing address line 2 for this order.

billtoaddress2 => {
    data_type     => 'varchar',
    size          => 50,
    is_nullable   => 1,
    default_value => undef
},

billtoaddress3

The billing address line 3 for this order.

billtoaddress3 => {
    data_type     => 'varchar',
    size          => 50,
    is_nullable   => 1,
    default_value => undef
},

billtocity

The billing address city for this order.

billtocity => {
    data_type     => 'varchar',
    size          => 50,
    is_nullable   => 1,
    default_value => undef
},

billtostate

The billing address state/province for this order.

billtostate => {
    data_type     => 'varchar',
    size          => 50,
    is_nullable   => 1,
    default_value => undef
},

billtozip

The billing address zip/postal code for this order.

billtozip => {
    data_type     => 'varchar',
    size          => 10,
    is_nullable   => 1,
    default_value => undef
},

billtocountry

The billing address country for this order.

billtocountry => {
    data_type     => 'varchar',
    size          => 25,
    is_nullable   => 1,
    default_value => undef
},

billtodayphone

The billing address daytime phone number for this order.

billtodayphone => {
    data_type     => 'varchar',
    size          => 25,
    is_nullable   => 1,
    default_value => undef
},

billtonightphone

The billing address night time phone number for this order.

billtonightphone => {
    data_type     => 'varchar',
    size          => 25,
    is_nullable   => 1,
    default_value => undef
},

billtofax

The billing address fax number for this order.

billtofax => {
    data_type     => 'varchar',
    size          => 25,
    is_nullable   => 1,
    default_value => undef
},

billtoemail

The billing address email address for this order.

billtoemail => {
    data_type     => 'varchar',
    size          => 50,
    is_nullable   => 1,
    default_value => undef
},

shiptosameasbillto

When set to true, the shipping address is the same as the billing address.

shiptosameasbillto => {
    data_type     => 'tinyint',
    size          => 3,
    is_nullable   => 0,
    default_value => 1
},

shiptofirstname

The first name for the shipping address for this order.

shiptofirstname => {
    data_type     => 'varchar',
    size          => 25,
    is_nullable   => 1,
    default_value => undef
},

shiptolastname

The last name for the shipping address for this order.

shiptolastname => {
    data_type     => 'varchar',
    size          => 25,
    is_nullable   => 1,
    default_value => undef
},

shiptoaddress1

The shipping address line 1 for this order.

shiptoaddress1 => {
    data_type     => 'varchar',
    size          => 50,
    is_nullable   => 1,
    default_value => undef
},

shiptoaddress2

The shipping address line 2 for this order.

shiptoaddress2 => {
    data_type     => 'varchar',
    size          => 50,
    is_nullable   => 1,
    default_value => undef
},

shiptoaddress3

The shipping address line 3 for this order.

shiptoaddress3 => {
    data_type     => 'varchar',
    size          => 50,
    is_nullable   => 1,
    default_value => undef
},

shiptocity

The shipping address city for this order.

shiptocity => {
    data_type     => 'varchar',
    size          => 50,
    is_nullable   => 1,
    default_value => undef
},

shiptostate

The shipping address state/province for this order.

shiptostate => {
    data_type     => 'varchar',
    size          => 50,
    is_nullable   => 1,
    default_value => undef
},

shiptozip

The shipping address zip/postal code for this order.

shiptozip => {
    data_type     => 'varchar',
    size          => 10,
    is_nullable   => 1,
    default_value => undef
},

shiptocountry

The shipping address country for this order.

shiptocountry => {
    data_type     => 'varchar',
    size          => 25,
    is_nullable   => 1,
    default_value => undef
},

shiptodayphone

The shipping address daytime phone number for this order.

shiptodayphone => {
    data_type     => 'varchar',
    size          => 25,
    is_nullable   => 1,
    default_value => undef
},

shiptonightphone

The shipping address night time phone number for this order.

shiptonightphone => {
    data_type     => 'varchar',
    size          => 25,
    is_nullable   => 1,
    default_value => undef
},

shiptofax

The shipping address fax number for this order.

shiptofax => {
    data_type     => 'varchar',
    size          => 25,
    is_nullable   => 1,
    default_value => undef
},

shiptoemail

The shipping address email address for this order.

shiptoemail => {
    data_type     => 'varchar',
    size          => 50,
    is_nullable   => 1,
    default_value => undef
}

AUTHOR

Christopher H. Laco
CPAN ID: CLACO
claco@chrislaco.com
http://today.icantfocus.com/blog/