Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
weather-model
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
weather-model
Commits
3105c91c
Commit
3105c91c
authored
Jun 01, 2017
by
Ivan Lan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'lan/update_weather_index' into 'master'
Add report_time to Other::WeatherIndex See merge request
!18
parents
0a439b6e
0a91564d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
0 deletions
+3
-0
6_create_weather_index.rb
db/migrate/6_create_weather_index.rb
+1
-0
other.rb
lib/weather-model/source_schemas/other.rb
+2
-0
No files found.
db/migrate/6_create_weather_index.rb
View file @
3105c91c
...
@@ -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
...
...
lib/weather-model/source_schemas/other.rb
View file @
3105c91c
...
@@ -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"
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment