NAME

Interchange6::Schema::Result::Media

TABLE: media

ACCESSORS

media_id

data_type: 'integer'
is_auto_increment: 1
is_nullable: 0
sequence: 'media_media_id_seq'

file

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

uri

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

mime_type

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

label

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

author_users_id

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

active

data_type: 'boolean'
default_value: true
is_nullable: 0

media_types_id

data_type: 'integer'
is_foreign_key: 1
is_nullable: 0

PRIMARY KEY

UNIQUE CONSTRAINTS

media_id_media_types_id_unique

media_file_unique

File should be 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).