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

NAME

Interchange6::Schema::Result::Message

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

Primary key.

title

The title of the message.

message_types_id

Foreign key constraint on "message_types_id" in Interchange6::Schema::Result::MessageType via "message_type" relationship.

uri

The uri of the message data.

Unique constraint.

format

The format of the text held in "content", e.g. plain, html or markdown. Defaults to 'plain'.

content

Content for the message.

summary

Summary/teaser for "content".

Defaults to empty string.

author_users_id

Foreign key constraint on "users_id" in Interchange6::Schema::Result::User via "author" relationship. Is nullable.

rating

Numeric rating of the message by a user.

recommend

Do you recommend the message? Default is no. Is nullable.

public

Is this public viewable? Default is no.

approved

Has this been approved by someone with proper rights?

approved_by_users_id

Foreign key constraint on "users_id" in Interchange6::Schema::Result::User via "approved_by" relationship. Is nullable

parent_id

For use by DBIx::Class::Tree::AdjacencyList this defines the "messages_id" of the parent of this message (if any).

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

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 Order results.

product_messages

Type: has_many

Related object: Interchange6::Schema::Result::ProductMessage

products

Type: many_to_many

Accessor to related Product results.

Type: has_many

Related object: Interchange6::Schema::Result::NavigationMessage

Type: many_to_many

Accessor to related Navigation results.

media_messages

Type: has_many

Related object: Interchange6::Schema::Result::MediaMessage

media

Type: many_to_many with media

INHERITED METHODS

DBIx::Class::Tree::AdjacencyList

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.