NAME

Interchange6::Schema::Result::Message

TABLE: messages

DESCRIPTION

Shared messages table for blog, order comments, reviews, bb, etc.

ACCESSORS

type

A short-cut accessor which takes a message type name ("name" in Interchange6::Schema::Result::MessageType) as argument and sets "message_types_id" to the appropriate value;

messages_id

data_type: 'integer'
is_auto_increment: 1
is_nullable: 0

message_types_id

data_type: 'integer'
is_foreign_key: 1
is_nullable: 0

title

data_type: 'varchar'
default_value: (empty string)
is_nullable: 0
size: 255

uri

data_type: 'varchar'
is_nullable: 1
size: 255

content

data_type: 'text'
is_nullable: 0

author

data_type: 'integer'
is_foreign_key: 1
is_nullable: 1

rating

data_type: 'numeric'
default_value: 0.0
is_nullable: 0
size: [4,2]

recommend

data_type: 'boolean'
is_nullable: 1

public

data_type: 'boolean'
default_value: 0
is_nullable: 0

approved

data_type: 'boolean'
default_value: 0
is_nullable: 0

approved_by

data_type: 'integer'
is_foreign_key: 1
is_nullable: 1

created

data_type: 'datetime'
set_on_create: 1
is_nullable: 0

last_modified

data_type: 'datetime'
set_on_create: 1
set_on_update: 1
is_nullable: 0

PRIMARY KEY

RELATIONS

author

Type: belongs_to

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

approved_by

Type: belongs_to

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

message_type

Type: belongs_to

Related object: Interchange6::Schema::Result::MessageType

order_comment

Type: might_have

Related object: Interchange6::Schema::Result::OrderComment

orders

Type: many_to_many

Accessor to related Product results.

product_review

Type: might_have

Related object: Interchange6::Schema::Result::ProductReview

products

Type: many_to_many

Accessor to related Product results.

METHODS

FOREIGNBUILDARGS

Remove "type" attribute from call to parent class.

insert

Overload insert to set message_types_id if required. Throw exception if requested message type is not active. See "active" in Interchange6::Schema::Result::MessageType.