Column | Type | Options |
---|---|---|
nickname | string | null: false |
family_name | string | null :false |
family_name_kana | string | null :false |
first_name | string | null :false |
first_name_kana | string | null :false |
string | null: false | |
password | string | null: false |
birthday | date | null: false |
phone_number | string | unique:true |
profile | string |
- has_many :products
- has_many ::sns_credentials, :dependent => :destroy
- has_many :comments, :dependent => :destroy
- has_one :user_address
- has_one :card_info
Column | Type | Options |
---|---|---|
user_id | integer | null :false |
postal_code | integer | null :false |
prefectures | integer | null :false |
city | string | null :false |
address | string | null :false |
building | string |
- belongs_to :user, optional: true
Column | Type | Options |
---|---|---|
provider | string | |
uid | string | |
user_id | bigint |
- belongs_to :user
Column | Type | Options |
---|---|---|
user_id | integer | null :false |
card_number | bigint | |
security_code | integer | |
use_limit_month | integer | |
use_limit_year | integer | |
customer_id | string | null :false |
card_id | string | null :false |
- belongs_to :user,optional: true
Column | Type | Options |
---|---|---|
name | string | null: false |
text | text | null: false |
category_id | string | null: false, foreign_key: true |
brand_id | integer | foreign_key: true |
price | integer | null: false |
product_size | string | |
condition | string | null :false |
shipping_charge | string | |
shipping_method | string | |
delivery_area | string | null :false |
user_id | integer | null: false, foreign_key: true |
estimated_delivery | string | |
image | string | |
status | integer | |
buyer_id | integer |
- belongs_to :user
- belongs_to :category
- belongs_to :brand
- has_many :photos, :dependent => :destroy
- has_many :comments, :dependent => :destroy
Column | Type | Options |
---|---|---|
product_id | bigint | null :false, foreign_key: true |
image_url | string |
- belongs_to :product,optional: true, :dependent => :destroy
Column | Type | Options |
---|---|---|
text | text | null: false |
product_id | integer | null: false, foreign_key: true |
user_id | integer | null: false, foreign_key: true |
- belongs_to :user
- belongs_to :product
Column | Type | Options |
---|---|---|
name | string | null: false |
size_id | reference | null :false, foreign_key: true |
has_many :blands has_many :products has_one :category_size
Column | Type | Options |
---|---|---|
size_id | integer | null: false |
size | string |
Column | Type | Options |
---|---|---|
name | string |
- has_many :products
Column | Type | Options |
---|---|---|
shipping_method | string |
Column | Type | Options |
---|---|---|
shipping_charge | string |
Column | Type | Options |
---|---|---|
delivery_method | string |
Column | Type | Options |
---|---|---|
condition | string |