@@ -1,4 +1,3 @@ |
||
| 1 | 1 |
class StepValidation < ActiveRecord::Base |
| 2 | 2 |
belongs_to :agent_step |
| 3 |
- has_many :step_verifications |
|
| 4 | 3 |
end |
@@ -1,4 +1,3 @@ |
||
| 1 | 1 |
class StepVerification < ActiveRecord::Base |
| 2 |
- belongs_to :step_validation |
|
| 3 | 2 |
belongs_to :validated_by, :class_name => "User" |
| 4 | 3 |
end |
@@ -0,0 +1,5 @@ |
||
| 1 |
+class RemoveStepVerificationFromStepValidations < ActiveRecord::Migration |
|
| 2 |
+ def change |
|
| 3 |
+ remove_reference :step_validations, :step_verifications, index: true |
|
| 4 |
+ end |
|
| 5 |
+end |
@@ -0,0 +1,5 @@ |
||
| 1 |
+class RemoveStepValidationFromStepVerification < ActiveRecord::Migration |
|
| 2 |
+ def change |
|
| 3 |
+ remove_reference :step_verifications, :step_validation, index: true |
|
| 4 |
+ end |
|
| 5 |
+end |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 |
# |
| 12 | 12 |
# It's strongly recommended that you check this file into your version control system. |
| 13 | 13 |
|
| 14 |
-ActiveRecord::Schema.define(version: 20150216000743) do |
|
| 14 |
+ActiveRecord::Schema.define(version: 20150217035951) do |
|
| 15 | 15 |
|
| 16 | 16 |
# These are extensions that must be enabled in order to support this database |
| 17 | 17 |
enable_extension "plpgsql" |
@@ -140,7 +140,6 @@ ActiveRecord::Schema.define(version: 20150216000743) do |
||
| 140 | 140 |
|
| 141 | 141 |
create_table "step_validations", force: true do |t| |
| 142 | 142 |
t.integer "agent_step_id" |
| 143 |
- t.integer "step_verifications_id" |
|
| 144 | 143 |
t.string "mode" |
| 145 | 144 |
t.string "description" |
| 146 | 145 |
t.datetime "created_at" |
@@ -148,10 +147,8 @@ ActiveRecord::Schema.define(version: 20150216000743) do |
||
| 148 | 147 |
end |
| 149 | 148 |
|
| 150 | 149 |
add_index "step_validations", ["agent_step_id"], name: "index_step_validations_on_agent_step_id", using: :btree |
| 151 |
- add_index "step_validations", ["step_verifications_id"], name: "index_step_validations_on_step_verifications_id", using: :btree |
|
| 152 | 150 |
|
| 153 | 151 |
create_table "step_verifications", force: true do |t| |
| 154 |
- t.integer "step_validation_id" |
|
| 155 | 152 |
t.boolean "validated" |
| 156 | 153 |
t.integer "validated_by_id" |
| 157 | 154 |
t.string "content" |
@@ -159,7 +156,6 @@ ActiveRecord::Schema.define(version: 20150216000743) do |
||
| 159 | 156 |
t.datetime "updated_at" |
| 160 | 157 |
end |
| 161 | 158 |
|
| 162 |
- add_index "step_verifications", ["step_validation_id"], name: "index_step_verifications_on_step_validation_id", using: :btree |
|
| 163 | 159 |
add_index "step_verifications", ["validated_by_id"], name: "index_step_verifications_on_validated_by_id", using: :btree |
| 164 | 160 |
|
| 165 | 161 |
create_table "subscriptions", force: true do |t| |
@@ -49,4 +49,44 @@ Second prototype source code of the avalanche network web app. |
||
| 49 | 49 |
agent_step |
| 50 | 50 |
- step_validations |
| 51 | 51 |
- step_submissions |
| 52 |
- - step_verification |
|
| 52 |
+ - step_verification |
|
| 53 |
+ |
|
| 54 |
+# Avalacnhe2 system scaffolding and notes |
|
| 55 |
+```shell |
|
| 56 |
+ |
|
| 57 |
+rails g scaffold mission mission_agents:references title:string objective:string briefing:text owner:references status:integer launched:boolean |
|
| 58 |
+language:string cover_img:string |
|
| 59 |
+ |
|
| 60 |
+rails g model mission_agent mission:references agent_steps:references mission_candidates:references objective:string briefing:text role:string |
|
| 61 |
+description:text user:references agent_number:integer debriefing:text |
|
| 62 |
+ |
|
| 63 |
+rails g model agent_step mission_agent:references step:integer title:string description:text completed:bool completed_date:datetime |
|
| 64 |
+ |
|
| 65 |
+rails g model step_validation agent_step:reference step_verifications:references mode:string description:string |
|
| 66 |
+ |
|
| 67 |
+rails g model step_verification step_validation:references validated:boolean validated_by:references content:string |
|
| 68 |
+ |
|
| 69 |
+rails g model mission_candidate user:reference mission_agent:reference status:integer |
|
| 70 |
+ |
|
| 71 |
+``` |
|
| 72 |
+ |
|
| 73 |
+# Undone |
|
| 74 |
+```shell |
|
| 75 |
+rails g model agent_reward mission_agent:reference category:string title:string description:text img:string |
|
| 76 |
+``` |
|
| 77 |
+ |
|
| 78 |
+mission controller |
|
| 79 |
+agent controller |
|
| 80 |
+mission_list_controller |
|
| 81 |
+settings_controller |
|
| 82 |
+ |
|
| 83 |
+mission_list_index |
|
| 84 |
+agent_dashboard |
|
| 85 |
+mission_index |
|
| 86 |
+mission_show |
|
| 87 |
+mission_edit/create |
|
| 88 |
+ |
|
| 89 |
+Emails: |
|
| 90 |
+- pending missions (3-5 days pending steps) |
|
| 91 |
+- Mission Acomplished |
|
| 92 |
+- Mission Failed |