Column | Type | Options |
---|---|---|
nickname | string | null: false |
family_name | string | null: false |
first_name | string | null: false |
family_kana | string | null: false |
first_kana | string | null: false |
birthday | date | null: false |
postal_code | string | null: false |
prefectures | integer | null: false |
city | string | null: false |
house_number | string | null: false |
building_name | string | null: false |
phone_number | string | null: false, unique: true |
profile | text | |
image | string | default: "" |
string | default: "", index: true, unique: true | |
encrypted_password | string | null: false |
reset_password_token | string | index: true |
- has_many :items
- has_many :purchaces
- has_many :cards
- has_one :private_information
Column | Type | Options |
---|---|---|
image | string | null: false |
item | references | null: false, foreign_key:true |
- belongs_to :item
Column | Type | Options |
---|---|---|
price | integer | null: false |
description | string | null: false |
title | string | |
category | references | null: false, foreign_key: true |
status | integer | null: false |
shipping_charge | integer | null: false |
delivery_source | integer | null: false |
shipping_day | integer | null: false |
shipping_method | integer | null: false |
dealing | integer | null: false default: 0 |
user | references | null: false, foreign_key: true |
brand | string |
- belongs_to :user
- belongs_to :category
- belongs_to :brand
- has_many :comments
- has_many :images
- has_one :purchace
Column | Type | Options |
---|---|---|
text | string | |
user | references | null: false, foreign_key: true |
item | references | null: false, foreign_key: true |
- belongs_to :item
- belongs_to :user
Column | Type | Options |
---|---|---|
user | references | null: false, foreign_key: true |
customer_id | string | null: false |
card_id | string | null: false |
- belongs_to :user
Column | Type | Options |
---|---|---|
name | string | null: false |
text | text | |
ancestry | string | index: true |
- belongs_to :parent, class_name: :Category
- has_many :children, class_name: :Category, foreign_key: :parent_id
Column | Type | Options |
---|---|---|
user | references | null: false, foreign_key: true |
item | references | null: false, foreign_key: true |
- belongs_to :user
- belongs_to :item
Column | Type | Options |
---|---|---|
family_name | string | null: false |
first_name | string | null: false |
family_kana | string | null: false |
first_kana | string | null: false |
birthday | date | null: false |
postal_code | string | |
prefectures | integer | |
city | string | |
house_number | string | |
building_name | string | |
user | references | null: false, foreign_key: true |
- belongs_to :user