Column | Type | Options |
---|---|---|
nickname | string | null: false |
string | null: false | |
encrypted_password | string | null: false |
family_name | string | null: false |
first_name | string | null: false |
reading_family | string | null: false |
reading_first | string | null: false |
birthday | date | null: false |
- has_many :items
- has_many :comments
- has_many :orders
Column | Type | Option |
---|---|---|
name | string | null: false |
description | text | null: false |
category_id | integer | null: false |
status_id | integer | null: false |
shipping_fee_id | integer | null: false |
prefecture_id | integer | null: false |
shipping_date_id | integer | null: false |
price | integer | null: false |
user | references | null: false, foreign_key: true |
- belongs_to :user
- has_many :comments
- has_one :order
- belongs_to_active_hash :category
- belongs_to_active_hash :status
- belongs_to_active_hash :shipping_fee
- belongs_to_active_hash :prefecture
- belongs_to_active_hash :shipping_date
- has_one_attached :image
Column | Type | Options |
---|---|---|
item(FK) | references | foreign_key: true |
user(FK) | references | foreign_key: true |
- belongs_to :user
- belongs_to :item
- has_one :address
Column | Type | Option |
---|---|---|
content | text | |
user | references | null: false, foreign_key: true |
item | references | null: false, foreign_key: true |
- belongs_to :user
- belongs_to :item
Column | Type | Option |
---|---|---|
postal_code | string | null: false |
prefecture_id | integer | null: false |
city | string | null: false |
house_number | string | null: false |
building_name | string | |
tel_number | string | null: false |
order | references | null: false, foreign_key: true |
- belongs_to_active_hash :prefecture
- belongs_to :order