-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
246830f
commit b1c1fd0
Showing
6 changed files
with
203 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,32 @@ | ||
import datetime | ||
from typing import Optional | ||
from enum import Enum | ||
|
||
from pydantic import BaseModel, ConfigDict | ||
|
||
from api.models.object import Object | ||
from api.schemas import IngestState | ||
|
||
|
||
class IngestProcess(BaseModel): | ||
class Post(BaseModel): | ||
|
||
object_id: int | ||
state: Optional[IngestState] = None | ||
comments: Optional[str] = None | ||
source_id: Optional[int] = None | ||
access_group_id: Optional[int] = None | ||
|
||
class Config: | ||
orm_mode = True | ||
extra = "ignore" | ||
|
||
|
||
class ResponseIngestProcess(IngestProcess): | ||
class Get(Post): | ||
|
||
id: int | ||
group_id: Optional[int] = None | ||
object_group_id: int | ||
created_on: datetime.datetime | ||
completed_on: Optional[datetime.datetime] = None | ||
|
||
|
||
class ResponseIngestProcessWithObject(ResponseIngestProcess): | ||
object: Object | ||
|
||
class Patch(Post): | ||
pass | ||
|
||
class IngestProcessPatch(BaseModel): | ||
group_id: Optional[int] = None | ||
comments: Optional[str] = None | ||
completed_on: Optional[datetime.datetime] = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.