models/tasksdb.py¶
models.tasksdb ¶
TasksDB
TasksDB ¶
Bases: DBBase
TasksDB Collection
Source code in models/tasksdb.py
index ¶
new
staticmethod
¶
new data
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pid |
str
|
Project id. |
required |
body |
dict
|
The data must have |
required |
endtime |
datetime
|
Optional, The end datetime. |
None
|
Returns:
Type | Description |
---|---|
dict[str, Any]
|
Return a default struct. |
Struct
_id
: Unique task id.pid
: Project id.title
: Task title.cate
: Category, any strings by user's definitions.desc
: Description.limit
:int
The max numbers of users.people
: List of user id. (They will join into)starttime
: The datetime.datetime of when to start.endtime
: The datetime.datetime in the end.created_by
: Created by who in user id.created_at
: Created at in datetime.datetime.
TODO
Need refactor in pydantic.
Source code in models/tasksdb.py
TasksStarDB ¶
Bases: DBBase
TasksStarDB Collection
Source code in models/tasksdb.py
new
staticmethod
¶
new data
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pid |
str
|
Project id. |
required |
uid |
str
|
User id. |
required |
Returns:
Type | Description |
---|---|
dict[str, Any]
|
Return a default struct. |
Struct
pid
: Project id.uid
: User id.created_at
: Created at in datetime.datetime.
TODO
Need refactor in pydantic.