Commit 0a91564d by ivan Lan

Add report_time to Other::WeatherIndex

parent 0a439b6e
...@@ -3,6 +3,7 @@ class CreateWeatherIndex < ActiveRecord::Migration[5.0] ...@@ -3,6 +3,7 @@ class CreateWeatherIndex < ActiveRecord::Migration[5.0]
create_table :weather_index do |t| create_table :weather_index do |t|
t.datetime :publishtime t.datetime :publishtime
t.string :type t.string :type
t.string :report_time
t.text :list t.text :list
t.timestamps t.timestamps
......
...@@ -6,6 +6,7 @@ module WeatherModel ...@@ -6,6 +6,7 @@ module WeatherModel
schema: { schema: {
publishtime: :datetime, publishtime: :datetime,
type: :string, type: :string,
report_time: :string,
list: :text list: :text
}, },
options: { options: {
...@@ -16,6 +17,7 @@ module WeatherModel ...@@ -16,6 +17,7 @@ module WeatherModel
factory_name: :weather_index, factory_name: :weather_index,
factory: { factory: {
publishtime: Time.parse('2017-05-16 16:00'), publishtime: Time.parse('2017-05-16 16:00'),
report_time: '2017-05-16 16:00',
warning_type: "雷电", warning_type: "雷电",
list: [ list: [
{:detail=>"日照强度强,外出需加强防护。", :id=>"1", :level=>"3级", :mean=>"加强防护", :name=>"日照指数", :shortcues=>"强", :time=>"2017-06-02"}, {:detail=>"日照强度强,外出需加强防护。", :id=>"1", :level=>"3级", :mean=>"加强防护", :name=>"日照指数", :shortcues=>"强", :time=>"2017-06-02"},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment