NAME
Interchange6::Schema::Result::User
TABLE: users
ACCESSORS
users_id
data_type: 'integer'
is_auto_increment: 1
is_nullable: 0
sequence: 'users_users_id_seq'
username
data_type: 'varchar'
is_nullable: 0
size: 255
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
nickname is automatically converted to lowercase
data_type: 'varchar'
default_value: (empty string)
is_nullable: 0
size: 255
password
data_type: 'varchar'
default_value: (empty string)
is_nullable: 0
size: 255
encode_column: 1
encode_class: 'Digest'
encode_args: { algorithm => 'SHA-512', format => 'hex', salt_length => 10 }
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
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
METHODS
add_attribute
Add user attribute.
$user->add_attribute('hair_color', 'blond');
Where 'hair_color' is Attribute and 'blond' is AttributeValue
update_attribute
Update user atttibute
$user->update_attribute('hair_color', 'brown');
delete_attribute
Delete user attribute
$user->delete_attribute('hair_color', 'purple');
_related_attribute
Creates attribute_value and sets current user.
_validate_input
Check both values 'attribute' and 'attribute_value' were correctly input.
_validate_exist
Check 'attribute' and 'attribute_value' pair exist for user.
PRIMARY KEY
UNIQUE CONSTRAINTS
users_username
users_nickname
RELATIONS
Address
Type: has_many
Related object: Interchange6::Schema::Result::Address
Cart
Type: has_many
Related object: Interchange6::Schema::Result::Cart
Order
Type: has_many
Related object: Interchange6::Schema::Result::Order
UserAttribute
Type: has_many
Related object: Interchange6::Schema::Result::UserAttribute
UserRole
Type: has_many
Related object: Interchange6::Schema::Result::UserRole
roles
Type: many_to_many
Composing rels: "user_roles" -> role