Araki / CouplingServer

0 stars 0 forks source link

Userのパラメーターについて。 #8

Open ofl opened 11 years ago

ofl commented 11 years ago

こちらで。

ofl commented 11 years ago
t.integer  "facebook_id" facebookから
t.string   "access_token" facebookから
t.string   "profile_status" ??
t.string   "email" facebookから
t.string   "certification" 本人確認??
t.string   "certification_status" 本人確認??
t.string   "public_status" ??
t.datetime "first_login_at" => created_atで充分ではないか?
t.datetime "last_login_at"
t.string   "invitation_code" ??
t.string   "contract_type" ??
t.integer  "like_point" Likeされた回数。
t.integer  "point" 初期値は?
t.string   "nickname" facebookから=>  自由入力
t.string   "introduction"  自由入力
t.integer  "gender" facebookから
t.integer  "age" facebookから
t.string   "country" どういう書式か? 選択?
t.string   "language" どういう書式か? 選択?
t.string   "address"  どういう書式か? 選択?
t.string   "birthplace"  県名? どういう書式か? 選択?
t.string   "roommate" [0..3]
t.integer  "height" [130..210]
t.integer  "proportion" [0..7]
t.integer  "constellation" ??
t.string   "blood_type" ABOそれとも数字?
t.integer  "marital_history" 
t.integer  "marriage_time" 
t.integer  "want_child"  boolean?
t.integer  "relationship"  ??
t.integer  "have_child"  boolean?
t.integer  "smoking" [0..2]
t.integer  "alcohol"  [0..3]
t.integer  "industry" ??
t.integer  "job"  [0..26]
t.string   "job_description"  自由入力?
t.string   "workplace"  自由入力?
t.integer  "income"  [0..7]
t.string   "qualification" 資格?? 自由入力?
t.integer  "school"  [0..]
t.integer  "holiday"  [0..3]
t.string   "sociability" ??
t.string   "character" 複数選択
t.string   "speciality" 複数選択?
t.string   "hobby" 複数選択
t.string   "dislike" 自由入力?
t.datetime "created_at",           :null => false
t.datetime "updated_at",           :null => false
t.string   "login_token" ??いらない?
t.integer  "prefecture" [0..46]
t.string   "school_name"  自由入力?
ofl commented 11 years ago

システム上独立していたほうがいいもの

t.integer  "facebook_id"
t.string   "access_token"
t.integer  "gender"
t.integer  "point"
t.integer  "like_point"
t.datetime "created_at",           :null => false
t.datetime "updated_at",           :null => false
t.datetime "first_login_at"
t.datetime "last_login_at"
t.string   "nickname"
t.string   "email" ?
t.string   "introduction"
t.string   "certification_status"

検索に必要な項目。

t.integer  "age"
t.string   "roommate"
t.integer  "height"
t.integer  "proportion"
t.integer  "job"
t.integer  "prefecture"
t.integer  "smoking"
t.integer  "alcohol"
t.integer  "income"
t.integer  "school"
t.string   "hobby"
t.string   "character"
t.integer  "holiday"
t.string   "blood_type" ?

検索の対象に多分ならないもの (独立したカラムにしなくてもシリアライズして一つに入れるのでもよさそうなもの)

t.integer  "marital_history"
t.integer  "marriage_time"
t.string   "workplace"
t.string   "qualification"
t.string   "school_name"
t.string   "dislike"
t.integer  "have_child"
t.string   "country"
t.string   "language"
t.string   "address"
t.string   "birthplace"
t.string   "job_description"

どちらか不明なもの

t.string   "profile_status"
t.string   "certification"
t.string   "public_status"
t.string   "invitation_code"
t.string   "contract_type"
t.integer  "constellation"
t.integer  "want_child"
t.integer  "relationship"
t.integer  "industry"
t.string   "sociability"
t.string   "speciality"
t.string   "login_token"
uniom commented 11 years ago

システム上独立するとはどういう意味でしょうか?別テーブルにするという意味でしょうか?

ofl commented 11 years ago

いえ、たとえば profile = { school_name: 'xxx', have_child: false, dislike: 'xxx', } といったように検索には特に必要のない内容についてはシリアライズ化して一つのカラムにまとめて突っ込むということです。 もちろんアプリ側に送るときには他のデータと同様にそれらを読み込めるものとして返します。

uniom commented 11 years ago

【??不明カラム説明】 t.string "profile_status" ステータス入力状況 → "status"に変更したください。 t.string "certification" 本人確認 → 仕様変更により不要。 t.string "certification_status" 本人確認ステータス → 仕様変更により不要。 t.string "public_status" 公開ステータス(検索にひっかかるかどうか) t.datetime "first_login_at" => created_atで充分ではないか? → 不要です。 t.string "invitation_code" ?? → 招待コード 招待キャンペーンを行うときのためです。default nullで。 t.string "contract_type" ?? → default nullで。 t.integer "point" → default 0で。 t.string "country" どういう書式か? 選択? → 不要です。 t.string "language" どういう書式か? 選択? → 不要です。 t.string "address" どういう書式か? 選択? → 不要です。 t.string "birthplace" 県名? どういう書式か? 選択? → 出身地、都道府県コードです。 t.integer "constellation" ?? → 星座です。生年月日から分かるので不要です。 t.string "blood_type" ABOそれとも数字? → ABOで。 t.integer "want_child" boolean? → 不要です。 t.integer "relationship" ?? → 不要です。 t.integer "have_child" boolean? → 不要です。 t.string "job_description" 自由入力? → 自由入力です。 t.string "workplace" 自由入力? → 自由入力です。 t.string "qualification" 資格?? 自由入力? → 不要です。 t.string "sociability" ?? → 社交性、選択式です。 t.string "character" 複数選択 → 複数選択です。別テーブル t.string "speciality" 複数選択? → 複数選択です。別テーブル t.string "hobby" 複数選択 → 複数選択です。別テーブル t.string "login_token" ??いらない? → 不要です。 t.string "school_name" 自由入力? → 不要です。

【カラム追加】 t.integer "reward_point" → リワード広告から得たポイント、default 0で。

uniom commented 11 years ago

【groupテーブル追加】 グループの年齢 グループの人数 プルダウン ex.3人 ~ 4人 グループの学歴 高校卒業~大学卒業 グループイメージ 複数選択 グループメンバーとの関係 自由記入 ex.同僚 お相手グループに対する希望 自由記入 ex.同い年か年上 開催希望曜日 複数選択 開催希望時間 プルダウン detetime 希望年齢  プルダウン 開催希望地 都道府県 複数選択 開催希望エリア 自由記入

uniom commented 11 years ago

シリアライズ化する必要があるのは何故でしょうか?

ofl commented 11 years ago

カラム数を減らしたいからです。 必要があるからカラムとして独立しているという状態の方がメインテナンスしていく上でいいと思うのですが、このあたりはもちろん好みの問題ですので、絶対にそうでなければならないというものではないです。

ofl commented 11 years ago

Groupというのはuserが一つ以上持てるのか?

ofl commented 11 years ago

複数選択で別テーブルというものはhas_many throughの関係になるがそれで良いか?。

User has_many :user_character has_many :characters, :through => :user_character

この場合characterというカラム自体は必要なくなるがそれで良いか?。

ofl commented 11 years ago

設定で必要な要素

一日の上限いいね受け取り数 いいねのお知らせ設定 お知らせ頻度

のカラムも追加すべきか

uniom commented 11 years ago

user belongings group. group has many users です。 usersテーブルにgroup_idを追加する必要がありますね。

複数選択で別テーブルというものはhas_many throughの関係になるがそれで良いか?。

それでいいです。

場合characterというカラム自体は必要なくなるがそれで良いか?。

それでいいです。

設定で必要な要素 一日の上限いいね受け取り数 いいねのお知らせ設定 お知らせ頻度 のカラムも追加すべきか

これらはDBに入れなくてもいいかなと思っております。

ofl commented 11 years ago

グループに所属するお友達もUserテーブルに保存するということでしょうか?

個人的にはuserのprofile部分を別テーブルにしてprofileがgroupに所属する形をとったほうが良いかとは思います。

ofl commented 11 years ago

お友達の数に上限はあるのでしょうか?

ofl commented 11 years ago

t.integer "industry" とは

t.string "sociability" これは数字での保存でなくて良いか

uniom commented 11 years ago

確かに、友達テーブル必要ですね。 freinds_groupsテーブルとfriendsテーブル作りましょう。 group has many usersは無しで。

友達の数の上限はデータ上では無しです。

t.integer "industry" とはt.string "sociability" これは数字での保存でなくて良いか

数字での保存でお願いします。

ofl commented 11 years ago

誕生日が必要でしょうか 必要ならばageは必要でしょうか

uniom commented 11 years ago

誕生日は必要です。 ageは要らないですね。