Column | Type | Option |
---|---|---|
string | null: false, unique: true | |
password | string | null: false |
name_first | string | null: false |
name_middle | string | null: false |
name_last | string | null: false |
name_first_kana | string | null: false |
name_middle_kana | string | null: false |
name_last_kana | string | null: false |
nickname | string | null: false |
birthday | string | null: false |
status | integer | null: false |
- has_many :products
- has_many :likes dependent: :destroy
- has_many :comments dependent: :destroy
- has_many :messages dependent: :destroy
- has_many :alerts dependent: :destroy
- has_many :orders dependent: :destroy
- has_one :address dependent: :destroy
Column | Type | Option |
---|---|---|
postal_code | integer | null: false |
country | string | null: false |
prefectures | string | null: false |
city | string | null: false |
address | null: false | |
name | string | null: false |
last_name | string | null: false |
tell | string | unique: true |
- belongs_to :user
Column | Type | Option |
---|---|---|
name | string | null: false |
condition | string | null: false |
dscription | text | null: false |
price | integer | null: false |
profit | integer | null: false |
deu_time | datetime | null: false |
brand_id | references | null: false foreign_key: true |
shipping_id | references | null: false foreign_key: true |
cotegory_id | references | null: false foreign_key: true |
user_id | references | null: false foreign_key: true |
messages | references | null: true |
- belongs_to :user
- belongs_to :category
- belongs_to :brand
- has_many :likes dependent: :destroy
- has_many :comments dependent: :destroy
- has_many :messages dependent: :destroy
- has_one :shipping
- has_many :evaluations
- has_many :images dependent: :destroy
- has_many :alerts dependent: :destroy
- has_many :orders
Column | Type | Option |
---|---|---|
image_url | text | null: false |
products_id | references | null: false foreign_key: true |
- belongs_to :product
Column | Type | Option |
---|---|---|
category_id | references | null: false foreign_key: true |
name | string | null: false |
- has_many :products
- belongs_to :category
Column | Type | Option |
---|---|---|
name | string | null: false |
path | text | null: false |
ancestry | string | null: false |
- has_many :brands
- has_many :products
Column | Type | Option |
---|---|---|
category_id | references | null: false foreign_key: true |
products_id | references | null: false foreign_key: true |
- belongs_to :product
- belongs_to :category
Column | Type | Option |
---|---|---|
user_id | references | null: false foreign_key: true |
product_id | references | null: false foreign_key: true |
text | text | null: false |
- belongs_to :user
- belongs_to :product
Column | Type | Option |
---|---|---|
user_id | references | null: false foreign_key: true |
product_id | references | null: false foreign_key: true |
text | text | null: false |
- belongd_to :user
- belongs_to :product
Column | Type | Option |
---|---|---|
fee_burden | string | null: false |
shipping_time | string | null:false |
- belongs_to :product
Column | Type | Option |
---|---|---|
product_id | references | null: false foreign_key: true |
user_id | references | null: false foreign_key: true |
text | text | null: false |
rate | string | null: false |
- belongs_to :product
- belongs_to :user
- has_one :comment
Column | Type | Option |
---|---|---|
user_id | references | null: false foreign_key: true |
product_id | references | null: false foreign_key: true |
- belongs_to :product
- belongs_to :user
Column | Type | Option |
---|---|---|
user_id | references | null: false foreign_key: true |
product_id | references | null: false |
- belongs_to :product
- belongs_to :user
Column | Type | Option |
---|---|---|
user_id | references | null: false foreign_key: true |
product_id | references | null: false foreign_key: true |
- belongs_to :product
- belongs_to :user