Giter Site home page Giter Site logo

freemarket_sample_64b's Introduction

README

This README would normally document whatever steps are necessary to get the application up and running.

Things you may want to cover:

  • Ruby version

  • System dependencies

  • Configuration

  • Database creation

  • Database initialization

  • How to run the test suite

  • Services (job queues, cache servers, search engines, etc.)

  • Deployment instructions

usersテーブル

Column Type Options
nickname string null: false
email string null: false
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
phone_number string null: false, unique: true
birthyear_id reference null: false, foreign_key: true
birthmonth_id reference null: false, foreign_key: true
birthday integer null: false
icon text null: false
header_image text null: false
introduce text

Association

has_many :items has_many :comments has_many :messages has_many :dns_credentials, dependent: :destroy has_many :buyed_items, forign_key: ”buyer_id”, class_name: ‘Item’ has_many :selling_items, -> { where(“buyer_id is NULL") }, foreign_key: “seller_id", class_name: “Item” has_many :sold_items, -> { where(“buyer_id is not NULL") }, foreign_key: “seller_id", class_name: “Item” belongs_to_active_hash :birthyear belongs_to_active_hash :birthmonth has_one :user_address

user_addressテーブル

Column Type Options
user reference null: false, foreign_key: true
postcode string null: false
prefecture_id reference null: false, foreign_key: true
city string null: false
address string null: false
building_name string
address_phone_number string

Association

belongs_to :user belongs_to_active_hash :prefecture

sns_credentialsテーブル

Column Type Options
uid string
provider string
user reference foreign_key: true

Association

belongs_to :user, optional: true

items

Column Type Options
seller reference null: false, foreign_key: true
buyer reference null: false, foreign_key: true
name string null: false, add_index: true
description string null: false
category reference null: false, foreign_key: true
size reference null: false, foreign_key: true
brand reference null: false, foreign_key: true
condition reference null: false, foreign_key: true
prefecture reference null: false, foreign_key: true
sendingmethod reference null: false, foreign_key: true
postageburden reference null: false, foreign_key: true
shippingday reference null: false, foreign_key: true
price integer null: false
profit integer null: false

Association

has_many :images, dependent: :destroy accepts_nested_attributes_for :images, allow_destroy: true has_many :comments has_many :messages belongs_to :buyer, class_name: 'User', optional: true belongs_to :seller, class_name: 'User' belongs_to :category belongs_to :size belongs_to :brand belongs_to_active_hash :prefecture belongs_to_active_hash :condition belongs_to_active_hash :sendingmethod belongs_to_active_hash :postageburden belongs_to_active_hash :shippingday

categoriesテーブル

Column Type Options
name text null: false, add_index: true
ancestry string null: false, add_index: true

Association

has_many: items has_many: brands, through: :category_brands has_many: category_brands has_ancestry

brandsテーブル

Column Type Options
name text null: false, add_index: true

Association

has_many :items has_many :categories, through: :category_brands has_many :category_brands

category_brandsテーブル

Column Type Options
category_id reference null: false, foreign_key: true
brand_id reference null: false, foreign_key: true

Association

belongs_to :category belongs_to :brand

imagesテーブル

Column Type Options
item_id integer null: false, foreign_key: true
image_url text null: false

### Association belongs_to :item, optional: true

commentsテーブル

Column Type Options
content text null: false
user_id integer null: false, foreign_key: true
item_id integer null: false, foreign_key: true

Association

belongs_to :user belongs_to :item

messagesテーブル

Column Type Options
content string null: false
item_id reference null: false, foreign_key: true
user_id reference null: false, foreign_key: true

Association

belongs_to :user belongs_to :item

freemarket_sample_64b's People

Contributors

ryu1234-tech avatar ueda-kohei avatar pirikara avatar icecreammikan avatar arikawa0831 avatar sumako0301 avatar dependabot[bot] avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.