Column | Type | Options |
---|---|---|
nickname | string | null: false |
string | null: false | |
encrypted_password | string | null: false |
last_name | string | null: false |
first_name | string | null: false |
last_name_kana | string | null: false |
first_name_kana | string | null: false |
birthday | date | null: false |
- has_many :items
- has_many :orders
Column | Type | Options |
---|---|---|
item_name | string | null: false |
item_info | text | null: false |
category_id | integer | null: false |
price | integer | null: false |
condition_id | integer | null: false |
delivery_fee_id | integer | null: false |
shipped_from_id | integer | null: false |
until_shipped_id | integer | null: false |
user | references | null: false, foreign_key: true |
- belongs_to :user
- has_one :order
Column | Type | Options |
---|---|---|
user | references | null: false, foreign_key: true |
item | references | null: false, foreign_key: true |
- belongs_to :user
- belongs_to :item
- has_one :address
Column | Type | Options |
---|---|---|
zip_code | string | null: false |
prefecture_id | integer | null: false |
city | string | null: false |
house_number | string | null: false |
building_name | string | null: true |
phone_number | string | null: false |
order | references | null: false, foreign_key: true |
- belongs_to :order