Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
ven-job
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Trịnh Hoàng Phúc
ven-job
Commits
9b293818
Commit
9b293818
authored
May 11, 2020
by
Trịnh Hoàng Phúc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix review 11/05/2020
parent
ff55254b
Pipeline
#609
failed with stages
in 0 seconds
Changes
7
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
33 additions
and
11 deletions
+33
-11
app/models/city.rb
+2
-0
app/models/company.rb
+2
-0
app/models/industry.rb
+2
-0
app/models/job.rb
+2
-0
db/migrate/20200511055632_add_columns_to_jobs.rb
+9
-0
db/schema.rb
+16
-11
lib/tasks/crawler.rake
+0
-0
No files found.
app/models/city.rb
View file @
9b293818
class
City
<
ApplicationRecord
validates
:title
,
presence:
true
has_and_belongs_to_many
:jobs
end
app/models/company.rb
View file @
9b293818
class
Company
<
ApplicationRecord
validates
:title
,
presence:
true
has_many
:jobs
end
app/models/industry.rb
View file @
9b293818
class
Industry
<
ApplicationRecord
validates
:title
,
presence:
true
has_and_belongs_to_many
:jobs
end
app/models/job.rb
View file @
9b293818
class
Job
<
ApplicationRecord
validates
:title
,
presence:
true
belongs_to
:company
has_many
:applies
...
...
db/migrate/20200511055632_add_columns_to_jobs.rb
0 → 100644
View file @
9b293818
class
AddColumnsToJobs
<
ActiveRecord
::
Migration
[
6.0
]
def
change
add_column
:jobs
,
:min_salary
,
:bigint
,
:default
=>
0
add_column
:jobs
,
:max_salary
,
:bigint
,
:default
=>
0
add_column
:jobs
,
:benefit
,
:text
add_column
:jobs
,
:job_requirements
,
:text
add_column
:jobs
,
:other_information
,
:text
end
end
db/schema.rb
View file @
9b293818
...
...
@@ -10,9 +10,9 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
2020_0
4_23_044651
)
do
ActiveRecord
::
Schema
.
define
(
version:
2020_0
5_11_055632
)
do
create_table
"admins"
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
COLLATE=utf8mb4_0900_ai_ci
"
,
force: :cascade
do
|
t
|
create_table
"admins"
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4"
,
force: :cascade
do
|
t
|
t
.
string
"email"
,
default:
""
,
null:
false
t
.
string
"encrypted_password"
,
default:
""
,
null:
false
t
.
string
"reset_password_token"
...
...
@@ -24,7 +24,7 @@ ActiveRecord::Schema.define(version: 2020_04_23_044651) do
t
.
index
[
"reset_password_token"
],
name:
"index_admins_on_reset_password_token"
,
unique:
true
end
create_table
"applies"
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
COLLATE=utf8mb4_0900_ai_ci
"
,
force: :cascade
do
|
t
|
create_table
"applies"
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4"
,
force: :cascade
do
|
t
|
t
.
bigint
"user_id"
,
null:
false
t
.
bigint
"job_id"
,
null:
false
t
.
datetime
"created_at"
,
precision:
6
,
null:
false
...
...
@@ -33,21 +33,21 @@ ActiveRecord::Schema.define(version: 2020_04_23_044651) do
t
.
index
[
"user_id"
],
name:
"index_applies_on_user_id"
end
create_table
"cities"
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
COLLATE=utf8mb4_0900_ai_ci
"
,
force: :cascade
do
|
t
|
create_table
"cities"
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4"
,
force: :cascade
do
|
t
|
t
.
string
"title"
t
.
datetime
"created_at"
,
precision:
6
,
null:
false
t
.
datetime
"updated_at"
,
precision:
6
,
null:
false
t
.
boolean
"foreign"
,
default:
false
end
create_table
"cities_jobs"
,
id:
false
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
COLLATE=utf8mb4_0900_ai_ci
"
,
force: :cascade
do
|
t
|
create_table
"cities_jobs"
,
id:
false
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4"
,
force: :cascade
do
|
t
|
t
.
bigint
"city_id"
,
null:
false
t
.
bigint
"job_id"
,
null:
false
t
.
index
[
"city_id"
,
"job_id"
],
name:
"index_cities_jobs_on_city_id_and_job_id"
t
.
index
[
"job_id"
,
"city_id"
],
name:
"index_cities_jobs_on_job_id_and_city_id"
end
create_table
"companies"
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
COLLATE=utf8mb4_0900_ai_ci
"
,
force: :cascade
do
|
t
|
create_table
"companies"
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4"
,
force: :cascade
do
|
t
|
t
.
string
"title"
t
.
string
"address"
t
.
string
"logo"
...
...
@@ -56,7 +56,7 @@ ActiveRecord::Schema.define(version: 2020_04_23_044651) do
t
.
datetime
"updated_at"
,
precision:
6
,
null:
false
end
create_table
"favorites"
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
COLLATE=utf8mb4_0900_ai_ci
"
,
force: :cascade
do
|
t
|
create_table
"favorites"
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4"
,
force: :cascade
do
|
t
|
t
.
bigint
"user_id"
,
null:
false
t
.
bigint
"job_id"
,
null:
false
t
.
datetime
"created_at"
,
precision:
6
,
null:
false
...
...
@@ -65,20 +65,20 @@ ActiveRecord::Schema.define(version: 2020_04_23_044651) do
t
.
index
[
"user_id"
],
name:
"index_favorites_on_user_id"
end
create_table
"industries"
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
COLLATE=utf8mb4_0900_ai_ci
"
,
force: :cascade
do
|
t
|
create_table
"industries"
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4"
,
force: :cascade
do
|
t
|
t
.
string
"title"
t
.
datetime
"created_at"
,
precision:
6
,
null:
false
t
.
datetime
"updated_at"
,
precision:
6
,
null:
false
end
create_table
"industries_jobs"
,
id:
false
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
COLLATE=utf8mb4_0900_ai_ci
"
,
force: :cascade
do
|
t
|
create_table
"industries_jobs"
,
id:
false
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4"
,
force: :cascade
do
|
t
|
t
.
bigint
"industry_id"
,
null:
false
t
.
bigint
"job_id"
,
null:
false
t
.
index
[
"industry_id"
,
"job_id"
],
name:
"index_industries_jobs_on_industry_id_and_job_id"
t
.
index
[
"job_id"
,
"industry_id"
],
name:
"index_industries_jobs_on_job_id_and_industry_id"
end
create_table
"jobs"
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
COLLATE=utf8mb4_0900_ai_ci
"
,
force: :cascade
do
|
t
|
create_table
"jobs"
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4"
,
force: :cascade
do
|
t
|
t
.
string
"title"
t
.
string
"updated_date_job"
t
.
string
"level"
...
...
@@ -89,10 +89,15 @@ ActiveRecord::Schema.define(version: 2020_04_23_044651) do
t
.
bigint
"company_id"
t
.
datetime
"created_at"
,
precision:
6
,
null:
false
t
.
datetime
"updated_at"
,
precision:
6
,
null:
false
t
.
bigint
"min_salary"
,
default:
0
t
.
bigint
"max_salary"
,
default:
0
t
.
text
"benefit"
t
.
text
"job_requirements"
t
.
text
"other_information"
t
.
index
[
"company_id"
],
name:
"index_jobs_on_company_id"
end
create_table
"users"
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
COLLATE=utf8mb4_0900_ai_ci
"
,
force: :cascade
do
|
t
|
create_table
"users"
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4"
,
force: :cascade
do
|
t
|
t
.
string
"email"
,
default:
""
,
null:
false
t
.
string
"encrypted_password"
,
default:
""
,
null:
false
t
.
string
"reset_password_token"
...
...
lib/tasks/crawler.rake
View file @
9b293818
This diff is collapsed.
Click to expand it.
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