NAME

Interchange6::Schema::Result::Media

ACCESSORS

media_id

Primary key.

file

The image/video file.

Defaults to empty string.

uri

The image/video uri.

Defaults to empty string.

mime_type

Mime type.

Defaults to empty string.

label

Label.

Defaults to empty string.

author_users_id

FK on "users_id" in Interchange6::Schema::Result::User.

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.

active

Boolean whether media is active. Defaults to true (1).

media_types_id

FK on "media_types_id" in Interchange6::Schema::Result::MediaType.

UNIQUE CONSTRAINTS

media_id_media_types_id_unique

RELATIONS

author

Type: belongs_to

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

media_type

Type: belongs_to

Related object: Interchange6::Schema::Result::MediaType

media_products

Type: has_many

Related object: Interchange6::Schema::Result::MediaProduct

products

Type: many_to_many with product.

displays

Type: many_to_many with media_displays

METHODS

type

Return the media type looking into MediaDisplay and MediaType.

display_uris

Return an hashref with the media display type and the final uri.

display_uri('display_type')

Return the uri for the display type (or undef if not found).