GithubHelp home page GithubHelp logo

workout_management_app'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

  • ...

workout_management_app's People

Contributors

k44-ysmr avatar tomohiro-yamamoto201 avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

k44-ysmr

workout_management_app's Issues

DB設計

DB設計

Users TB

Column Type Options
id integer ---
nickname string null: false
email string null: false, unique: true
gender integer null: false
height integer null: false
body_weight integer null: false
born_on date ---
  • has_many : training_menus
  • has_many : training_reports
  • has_many : likes
  • has_many :liked_training_reports, through: :likes, source: :training_report

ユーザー情報のルーティング

HTTP動詞 パス コントローラー#アクション 目的
GET /users users#index すべてのユーザー一覧、筋トレ情報を表示
GET /users/new users#new ユーザーアカウントを新規作成するためのHTMLフォームを返す
POST /users users#create ユーザーアカウントを作成する
GET /users/:id users#show マイページを表示する。筋トレ予定登録、筋トレ報告ページにそれぞれ進むことができる。
GET /users/:id/edit users#edit ユーザー情報編集用のHTMLフォームを1つ返す
PATCH/PUT /users/:id users#update ユーザー情報を更新する
DELETE /users/:id users#destroy ユーザー情報を削除する

TrainingMenus TB

メニューのタイトルを入力する。

Column Type Options
id integer ---
training_menu string null: false
published_at datetime ---
user_id references null: false, index: true, foreign_key: true
  • belongs_to : user
  • has_many : trainings

Trainings TB

筋トレ内容とスケジュールを入力する

Column Type Options
id integer ---
training_category string null: false
training_name string null: false
training_menu_id references null: false, index: true, foreign_key: true
growing_parts string null: false
  • belongs_to : training_menu

TrainingReports TB

掲示板に投稿する内容を入力する

Column Type Options
id integer ---
content text null: false
user_id references null: false, index: true, foreign_key: true
  • belongs_to : user
  • has_many : likes
  • liked_users, through: :likes, source: :user

筋トレ投稿のルーティング

HTTP動詞 パス コントローラー#アクション 目的
GET /training_reports training_reports#index ログイン前:ログインへのリンク ログイン後:投稿一覧を表示、投稿ができる
GET /training_reports/:id training_reports#show ・投稿の詳細・「いいね」ができる・投稿に「いいね」したユーザー一覧表示
DELETE /training_reports/:id training_reports#destroy 投稿を削除する

Likes TB

ユーザーの投稿に「いいね」する

Column Type Options
id integer ---
user_id references null: false, index: true, foreign_key: true
training_report_id references null: false, index: true, foreign_key: true
  • belongs_to : user
  • belongs_to : training_report

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.