diff --git a/app/models/group.rb b/app/models/group.rb new file mode 100644 index 0000000..c3e23f5 --- /dev/null +++ b/app/models/group.rb @@ -0,0 +1,7 @@ +class Group + include Mongoid::Document + include Mongoid::Timestamps + + field :group_name, type: String + embeds_many :UserSummary +end diff --git a/app/models/user.rb b/app/models/user.rb new file mode 100644 index 0000000..6a175af --- /dev/null +++ b/app/models/user.rb @@ -0,0 +1,8 @@ +class User + include Mongoid::Document + include Mongoid::Timestamps + + field :user_id, type: BSON::ObjectId + field :user_name, type: String + field :user_description, type: String +end diff --git a/app/models/user_summary.rb b/app/models/user_summary.rb new file mode 100644 index 0000000..25df1d9 --- /dev/null +++ b/app/models/user_summary.rb @@ -0,0 +1,7 @@ +class UserSummary + include Mongoid::Document + include Mongoid::Timestamps + + field :user_id, type: BSON::ObjectId + field :user_name, type: String +end diff --git a/app/views/main/.keep b/app/views/main/.keep new file mode 100644 index 0000000..e69de29 diff --git a/test/fixtures/groups.yml b/test/fixtures/groups.yml new file mode 100644 index 0000000..d7a3329 --- /dev/null +++ b/test/fixtures/groups.yml @@ -0,0 +1,11 @@ +# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +# This model initially had no columns defined. If you add columns to the +# model remove the "{}" from the fixture names and add the columns immediately +# below each fixture, per the syntax in the comments below +# +one: {} +# column: value +# +two: {} +# column: value diff --git a/test/fixtures/user_summaries.yml b/test/fixtures/user_summaries.yml new file mode 100644 index 0000000..d7a3329 --- /dev/null +++ b/test/fixtures/user_summaries.yml @@ -0,0 +1,11 @@ +# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +# This model initially had no columns defined. If you add columns to the +# model remove the "{}" from the fixture names and add the columns immediately +# below each fixture, per the syntax in the comments below +# +one: {} +# column: value +# +two: {} +# column: value diff --git a/test/fixtures/users.yml b/test/fixtures/users.yml new file mode 100644 index 0000000..d7a3329 --- /dev/null +++ b/test/fixtures/users.yml @@ -0,0 +1,11 @@ +# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +# This model initially had no columns defined. If you add columns to the +# model remove the "{}" from the fixture names and add the columns immediately +# below each fixture, per the syntax in the comments below +# +one: {} +# column: value +# +two: {} +# column: value diff --git a/test/models/group_test.rb b/test/models/group_test.rb new file mode 100644 index 0000000..eddbcc8 --- /dev/null +++ b/test/models/group_test.rb @@ -0,0 +1,7 @@ +require "test_helper" + +class GroupTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/user_summary_test.rb b/test/models/user_summary_test.rb new file mode 100644 index 0000000..da4b988 --- /dev/null +++ b/test/models/user_summary_test.rb @@ -0,0 +1,7 @@ +require "test_helper" + +class UserSummaryTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/user_test.rb b/test/models/user_test.rb new file mode 100644 index 0000000..5c07f49 --- /dev/null +++ b/test/models/user_test.rb @@ -0,0 +1,7 @@ +require "test_helper" + +class UserTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end