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

NAME

Interchange6::Schema::Result::User

ACCESSORS

users_id

  data_type: 'integer'
  is_auto_increment: 1
  is_nullable: 0
  sequence: 'users_users_id_seq'
  primary key

username

  data_type: 'varchar'
  is_nullable: 0
  size: 255
  unique

The username is automatically converted to lowercase so we make sure that the unique constraint on username works.

nickname

  data_type: 'varchar'
  is_nullable: 1
  size: 255
  unique

email

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

password

  data_type: 'varchar'
  default_value: (empty string)
  is_nullable: 0
  size: 60
  encode_column: 1
  encode_class: 'Crypt::Eksblowfish::Bcrypt'
  encode_args: { key_nul => 1, cost => 14 }
  encode_check_method: 'check_password'

first_name

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

last_name

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

last_login

  data_type: 'datetime'
  is_nullable: 1

fail_count

  data_type: 'integer'
  is_nullable: 0
  default_value: 0

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: 1
  is_nullable: 0

RELATIONS

addresses

Type: has_many

Related object: Interchange6::Schema::Result::Address

carts

Type: has_many

Related object: Interchange6::Schema::Result::Cart

orders

Type: has_many

Related object: Interchange6::Schema::Result::Order

user_attributes

Type: has_many

Related object: Interchange6::Schema::Result::UserAttribute

user_roles

Type: has_many

Related object: Interchange6::Schema::Result::UserRole

roles

Type: many_to_many

Composing rels: "user_roles" -> role

approvals

Type: has_many

Related object: Interchange6::Schema::Result::Message FK approved_by_users_id

messages

Type: has_many

Related object: Interchange6::Schema::Result::Message FK author_users_id

METHODS

Attribute methods are provided by the Interchange6::Schema::Base::Attribute class.

new

Overloaded method. Die if username is undef, empty string or not lowercase.

insert

Overloaded method. Always add new users to Role with name 'user'.

update

Overloaded method. Throw exception if username is undef, empty string or not lowercase.

blog_posts

Returns resultset of messages that are blog posts (Message->type eq 'blog_post')

name

Returns "first_name" and "last_name" joined by a single space.

reviews

Returns resultset of messages that are reviews (referenced by ProductReview class).