forked from itsadityagupta/track-job-applications
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate.py
More file actions
51 lines (41 loc) · 1.49 KB
/
update.py
File metadata and controls
51 lines (41 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import typer
from shared.dao import db_functions
app = typer.Typer()
@app.command()
def company(
application_id: int = typer.Argument(
..., help="ID for job application you want to update"
),
company_name: str = typer.Argument(..., help="Company name"),
):
"""Updates the company name in the application with the given ID"""
db_functions.update_company(application_id, company_name)
@app.command()
def position(
application_id: int = typer.Argument(
..., help="ID for job application you want to update"
),
position_name: str = typer.Argument(..., help="Position applied for"),
):
"""Updates the position in the application with the given ID"""
db_functions.update_position(application_id, position_name)
@app.command()
def status(
application_id: int = typer.Argument(
..., help="ID for job application you want to update"
),
status_name: str = typer.Argument(..., help="Status of the application"),
):
"""Updates the status of the application with the given ID"""
db_functions.update_status(application_id, status_name)
@app.command()
def applied_at(
application_id: int = typer.Argument(
..., help="ID for job application you want to update"
),
applied_at_value: str = typer.Argument(
..., help="Date at which applied for the application"
),
):
"""Updates the applied_at date in the application with the given ID"""
db_functions.update_applied_at_date(application_id, applied_at_value)