yurikomura / furima-39644

0 stars 0 forks source link

テーブル設計

users テーブル

Column Type Options
nickname string null: false
email string null: false, unique:true
encrypted_password 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
birth_date date null: false

Association

items テーブル

Column Type Options
name string null: false
info text null: false
category_id integer null: false
sales_status_id integer null: false
shipping_fee_status_id integer null: false
prefecture_id integer null: false
scheduled_delivery_id integer null: false
price integer null: false
user references null: false, foreign_key: true

Association

orders テーブル

Column Type Options
user references null: false, foreign_key: true
item references null: false, foreign_key: true

Association

addresses テーブル

Column Type Options
post_code string null: false
prefecture_id integer null: false
city string null: false
addresses string null: false
building string
phone_number string null: false
order references null: false, foreign_key: true

Association