This README would normally document whatever steps are necessary to get the application up and running.
Things you may want to cover:
- Ruby version
ruby 2.5.1
- Rails version
rails 5.2.3
-
System dependencies
-
Configuration
-
Database creation
-
Database initialization
-
How to run the test suite
-
Services (job queues, cache servers, search engines, etc.)
-
Deployment instructions
Column | Type | Options |
---|---|---|
family_name | string | null: false |
family_name_kana | string | null: false |
first_name | string | null: false |
first_name_kana | string | null: false |
nickname | string | null: false, unique: true |
birthday | date | null: false |
zipcode | string | null: false |
address | text | null: false |
string | null: false, unique: true | |
phone | string | null: false, unique: true |
profile | text | |
prefecture_id | integer | null: false, foreign_key: true |
password | string | null: false, unique: true |
credit | text | null: false, unique: true |
- has_many :items
Column | Type | Options |
---|---|---|
name | string | null: false |
description | text | null: false |
brand | string | |
size | string | null: false |
condition_id | integer | null: false, foreign_key: true |
shipping_fee_payer_id | integer | null: false, foreign_key: true |
prefecture_id | integer | null: false, foreign_key: true |
shipping_days_id | integer | null: false, foreign_key: true |
price | integer | null: false |
owner_id | integer | null: false, foreign_key: true |
buyer_id | integer | foreign_key: true |
state_id | integer | null: false, foreign_key: true |
large_class_id | integer | null: false, foreign_key: true |
middle_class_id | integer | null: false, foreign_key: true |
small_class_id | integer | null: false, foreign_key: true |
- belongs_to :state
- belongs_to :condition
- belongs_to :shipping_fee_payer
- belongs_to :shipping_day
- belongs_to :large_class
- belongs_to :middle_class
- belongs_to :small_class
- has_many :images
- belongs_to :owner, class_name: "User"
- belongs_to :buyer, class_name: "User"
Column | Type | Options |
---|---|---|
item_id | integer | foreign_key: true |
image_url | string | null: false |
- belongs_to :item
Column | Type | Options |
---|---|---|
condition_rank | string | null: false |
- has_many :items
Column | Type | Options |
---|---|---|
payer | string | null: false |
- has_many :items
Column | Type | Options |
---|---|---|
days | string | null: false |
- has_many :items
Column | Type | Options |
---|---|---|
state | string | null: false |
- has_many :items
Column | Type | Options |
---|---|---|
name | string | null: false, unique: true |
- has_many :items
- has_many :middle_classes
Column | Type | Options |
---|---|---|
name | string | null: false, unique: true |
large_class_id | integer | null: false |
- has_many :items
- belongs_to :large_class
- has_many :small_classes
Column | Type | Options |
---|---|---|
name | string | null: false, unique: true |
middle_class_id | integer | null: false |
- has_many :items
- belongs_to :middle_class
都道府県データはgemのactive_hashを利用してPrefectureModelを作成して管理する。