Column | Type | Options |
---|---|---|
string | null: false, unipue: true | |
nickname | 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 | integer |
- has_many :scores
- has_many :likes
- has_many :items, foreign_key: 'saler_id'
- has_many :comments
Colum | Type | Option |
---|---|---|
postal_code | string | |
prefectures | string | null: false |
city | string | null: false |
number | string | null: false |
building | string | |
user | references | foreign_key: true |
- belongs_to: user
Colum | Type | Option |
---|---|---|
name | string | null: false |
price | integer | null: false |
description | text | null: false |
category | references | foreign_key: true |
buyer_id | integer | |
saler_id | integer | null, false |
shipping_date | references | foreign_key: true |
condition | references | foreign_key: true |
region | references | foreign_key: true |
delivery_fee | references | foreign_key: true |
ship_method | references | foreign_key: true |
brand | references | foreign_key: true |
size | references | foreign_key: true |
trading | integer | null: false,default: 1 |
- belongs_to :size, optional:true
- belongs_to :shipping_date
- belongs_to :condition
- belongs_to :region
- belongs_to :ship_method ,optional: true
- belongs_to :delivery_fee
- belongs_to :category
- belongs_to :brand ,optional: true
- has_many :comments, dependent: :destroy
- has_many :item_photos, dependent: :destroy
- has_many :likes, dependent: :destroy
- has_many :snslikes
- has_many :snscredential
- accepts_nested_attributes_for :item_photos
Colum | Type | Option |
---|---|---|
name | integer | null:false |
parent_id | integer | index: true |
group | integer |
- has_many :items
Colum | Type | Option |
---|---|---|
type | integer | null: false, default: 0 |
group | integer |
- has_many :items
Colum | Type | Option |
---|---|---|
category | references | foreign_key: true |
size | references | foreign_key: true |
- belongs_to :category
- belongs_to :size
Colum | Type | Option |
---|---|---|
name | string | null: false |
- has_many :items
Colum | Type | Option |
---|---|---|
status | string | null: false |
item | references | foreign_key: true |
user | references | foreign_key: true |
- belongs_to: user
- belongs_to: item
Colum | Type | Option |
---|---|---|
user | references | foreign_key: true |
item | references | foreign_key: true |
-
belongs_to: user belongs_to :item belongs_to :item
-
belongs_to: item
Colum | Type | Option |
---|---|---|
day | integer | null: false |
- has_many :items
Colum | Type | Option |
---|---|---|
type | string | null: false |
user | references | foreign_key: true |
item | references | foreign_key: true |
- belongs_to: user
- belongs_to: item
Colum | Type | Option |
---|---|---|
name | integer | null: false |
- has_many :items
Colum | Type | Option |
---|---|---|
photo | text | null: false |
item | references | foreign_key: true |
belongs_to :item
Colum | Type | Option |
---|---|---|
type | integer | null: false |
- has_many :items
Colum | Type | Option |
---|---|---|
type | integer | null: false |
- has_many :items
Colum | Type | Option |
---|---|---|
type | integer | null: false |
user | references | foreign_key: true |
item | references | foreign_key: true |
- belongs_to: user
Colum | Type | Option |
---|---|---|
user | references | foreign_key: true |
item | references | foreign_key: true |
comment | text |
- belongs_to: user
- belongs_to: item
Colum | Type | Option |
---|---|---|
type | integer | null: false |
- has_many: items
Colum | Type | Option |
---|---|---|
provider | string | |
uid | string | |
name | string | |
string | ||
oauth_token | string | |
oauth_expires_at | datetime |
- has_many :scores
- has_many :snslikes
- has_many :items
Colum | Type | Option |
---|---|---|
snscredential | references | foreign_key: true |
item | references | foreign_key: true |
- belongs_to :item
- belongs_to :snscredential
|Colum|Type|Option| |avator|text|| |comment|text|| |tel|string|unique: true| |postal_code|string|| |prefectuer|string|| |city|string|| |number|string|| |building|string|| |user_id|integer|| |snscredential_id|integer||