Column | Type | Options |
---|---|---|
nickname | string | null: false |
string | null: false, unique: true | |
password | string | null: false |
first_name | string | null: false |
first_furigana | string | null: false |
family_name | string | null: false |
family_furigana | string | null: false |
birthday | date | null: false |
telephone | integer | null: false |
profile | text | |
sales | bigint | null: false |
- has many items, dependent: :destroy
- has many trades, dependent: :destroy
- has many points, dependent: :destroy
- has many notices, dependent: :destroy
- has many todos, dependent: :destroy
- has many iines, dependent: :destroy
- has many comments, dependent: :destroy
- has many ngs
- has many payments, dependent: :destroy
- has many banks, dependent: :destroy
- has many addresses, dependent: :destroy
- has many shipping_addresses, dependent: :destroy
Column | Type | Options |
---|---|---|
postal_code | string | |
prefecture | string | |
city | string | |
address | integer | |
building_name | string | |
user_id | references | null: false,foreign_key:true |
- belongs to user,optional: true
Column | Type | Options |
---|---|---|
postal_code | string | null: false |
prefecture | string | null: false |
city | string | null: false |
address | integer | null: false |
building_name | string | |
user_id | references | null: false,foreign_key:true |
- belongs to user,optional: true
Column | Type | Options |
---|---|---|
customer_id | string | null: false |
card_id | string | null: false |
user_id | references | null: false,foreign_key:true |
- belongs to user,optional: true
Column | Type | Options |
---|---|---|
provider | string | |
uid | string | |
user_id | references | null: false,foreign_key:true |
- belongs to user,optional: true
Column | Type | Options |
---|---|---|
bank_name | string | null: false |
account_type | string | null: false |
branch_code | integer | null: false |
account_number | integer | null: false |
first_name | string | null: false |
family_name | string | null: false |
user_id | references | null: false,foreign_key:true |
- belongs to user,optional: true
Column | Type | Options |
---|---|---|
amount | integer | null: false |
date | datetime | null: false |
user_id | references | null: false, foreign_key: true |
- belongs to user
Column | Type | Options |
---|---|---|
date | datetime | null: false |
title | string | null: false |
text | text | null: false |
user_id | references | null: false, foreign_key: true |
- belongs to user
Column | Type | Options |
---|---|---|
date | datetime | null: false |
title | string | null: false |
text | text | null: false |
user_id | references | null: false, foreign_key: true |
trade_id | references | null: false, foreign_key: true |
- belongs to user
- belongs to trade
Column | Type | Options |
---|---|---|
date | datetime | null: false |
user_id | references | null: false, foreign_key: true |
item_id | references | null: false, foreign_key: true |
- belongs to user
- belongs to item
Column | Type | Options |
---|---|---|
name | string | null: false, limit: 40 |
price | intger | null: false |
description | text | null: false, limit: 1000 |
size_id | integer | null: false, foreign_key: true |
condition_id | integer | null: false, foreign_key: true |
shipping_charge_id | integer | null: false, foreign_key: true |
shipping_method_id | integer | null: false, foreign_key: true |
delivery_area_id | integer | null: false, foreign_key: true |
status_id | references | null: false, foreign_key: true |
estimated_shipping_date_id | integer | null: false, foreign_key: true |
category_id | references | null: false, foreign_key: true |
brand_id | references | null: false, foreign_key: true |
user_id | references | null: false, foreign_key: true |
- has_many iines
- has_many comments, dependent: :destroy
- has_many ngs
- belongs_to categories, dependent: :destroy
- belongs_to brands, dependent: :destroy
- has_many images, dependent: :destroy
- belongs_to sizes, dependent: :destroy
- belongs_to conditions, dependent: :destroy
- belongs_to shipping_charges, dependent: :destroy
- belongs_to shipping_methods, dependent: :destroy
- belongs_to statuses, dependent: :destroy
- belings to user
- has_many trades
- add_index :items, :price
Column | Type | Options |
---|---|---|
image | string | null: false |
item_id | references | null: false, foreign_key: true |
- belongs to item
Column | Type | Options |
---|---|---|
size | string | null: false |
- has_many items
- add_index :size, :size
Column | Type | Options |
---|---|---|
condition | string | null: false |
- has_many items
- add_index :condition, :condition
Column | Type | Options |
---|---|---|
shipping_charge | string | null: false |
- has_many items
- add_index :shipping_charge, :shipping_charge
Column | Type | Options |
---|---|---|
shipping_method | string | null: false |
- has_many items
- add_index :shipping_method, :shipping_method
Column | Type | Options |
---|---|---|
delivery_area | string | null: false |
- has_many items
- add_index :delivery_area, :delivery_area
Column | Type | Options |
---|---|---|
estimated_shipping_date | string | null: false |
- has_many items
- add_index :estimated_shipping_date, :estimated_shipping_date
Column | Type | Options |
---|---|---|
status | string | null: false |
- has_many item
- add_index :status, :status
Column | Type | Options |
---|---|---|
date | datetime | null: false |
text | text | null: false |
user_id | references | null: false, foreign_key: true |
item_id | references | null: false, foreign_key: true |
- belongs to user
- belongs to item
Column | Type | Options |
---|---|---|
brand | string | null: false |
- has_many items
- add_index :brand, :name
Column | Type | Options |
---|---|---|
category | string | null: false |
tree_parent | integer |
- has_many items
- add_index :category, :name
Column | Type | Options |
---|---|---|
transaction_date | datetime | null: false |
trading_date | datetime | |
user_id | references | null: false, foreign_key: true |
item_id | references | null: false, foreign_key: true |
- belongs to user
- belongs to item
Column | Type | Options |
---|---|---|
date | datetime | null: false |
text | text | null: false |
grade | string | null: false |
user_id | references | null: false, foreign_key: true |
item_id | references | null: false, foreign_key: true |
- belongs to user
- belongs to item