datatypes.models
Module that contains the database models and return types
Module Contents
Classes
Helper class that prepends the table name to the fields |
|
str(object='') -> str |
|
str(object='') -> str |
|
str(object='') -> str |
|
int([x]) -> integer |
|
Generic enumeration. |
|
- class datatypes.models.StringFields
Bases:
type
Helper class that prepends the table name to the fields
- __getattribute__(self, item)
Return getattr(self, name).
- class datatypes.models.UserBase(__pydantic_self__, **data)
Bases:
sqlmodel.SQLModel
- Parameters
data (Any) –
- user_name :str
- class datatypes.models.UserCreate(__pydantic_self__, **data)
Bases:
UserBase
- Parameters
data (Any) –
- password :str
- class datatypes.models.User(__pydantic_self__, **data)
Bases:
sqlmodel.SQLModel
- Parameters
data (Any) –
- user_name :str
- password :str
- system_permissions :List[SystemPermission]
- project_permissions :List[ProjectPermission]
- documents_permissions :List[DocumentPermission]
- owned_projects :List[Project]
- class datatypes.models.SysPermissions
Bases:
str
,enum.Enum
str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.
- create_projects = create_projects
- view_projects = view_projects
- edit_projects = edit_projects
- delete_projects = delete_projects
- view_users = view_users
- edit_users = edit_users
- delete_users = delete_users
- edit_users_permissions = edit_users_permissions
- edit_projects_permissions = edit_projects_permissions
- class datatypes.models.SystemPermission(__pydantic_self__, **data)
Bases:
sqlmodel.SQLModel
- Parameters
data (Any) –
- user_name :str
- permission :SysPermissions
- user :User
- class datatypes.models.Project(__pydantic_self__, **data)
Bases:
sqlmodel.SQLModel
- Parameters
data (Any) –
- project_name :str
- owner_name :str
- owner :User
- documents :List[Document]
- users_permissions :List[ProjectPermission]
- processes :List[Process]
- class datatypes.models.ProjPermissions
Bases:
str
,enum.Enum
str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.
- view = view
- edit = edit
- delete = delete
- create_documents = create_documents
- view_documents = view_documents
- edit_documents = edit_documents
- delete_documents = delete_documents
- edit_project_permissions = edit_project_permissions
- edit_documents_permissions = edit_documents_permissions
- class datatypes.models.ProjectPermission(__pydantic_self__, **data)
Bases:
sqlmodel.SQLModel
- Parameters
data (Any) –
- user_name :str
- project_name :str
- permission :ProjPermissions
- user :User
- project :Project
- class datatypes.models.Document(__pydantic_self__, **data)
Bases:
sqlmodel.SQLModel
- Parameters
data (Any) –
- class Fields
- table_name = document
- project_name = project_name
- document_name = document_name
- author_name = author_name
- jsonschema = jsonschema
- first = first
- last = last
- schema_add_date = schema_add_date
- creation_date = creation_date
- updated_date = updated_date
- project_name :str
- document_name :str
- author_name :str
- jsonschema :Dict
- first :Dict
- last :Dict
- schema_add_date :datetime.datetime
- creation_date :datetime | None
- updated_date :datetime | None
- patches :List[Patch]
- project :Project
- permissions :List[DocumentPermission]
- documents_processes :List[DocumentProcess]
- computed_fields :List[ComputedField]
- computed_fields_reference :List[ComputedField]
- ms_computed_fields :List[MSProjectComputedField]
- class datatypes.models.Patch(__pydantic_self__, **data)
Bases:
sqlmodel.SQLModel
- Parameters
data (Any) –
- class Fields
- table_name = patch
- project_name = project_name
- document_name = document_name
- user_name = user_name
- updated_date = updated_date
- patch = patch
- id :int | None
- project_name :str
- document_name :str
- user_name :str
- updated_date :datetime.datetime
- patch :List[Dict]
- document :Document
- class datatypes.models.DocPermissions
Bases:
str
,enum.Enum
str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.
- view = view
- edit = edit
- delete = delete
- edit_permissions = edit_permissions
- class datatypes.models.DocumentPermission(__pydantic_self__, **data)
Bases:
sqlmodel.SQLModel
- Parameters
data (Any) –
- class Fields
- table_name = documentpermission
- project_name = project_name
- document_name = document_name
- user_name = user_name
- permission = permission
- project_name :str
- document_name :str | None
- user_name :str
- permission :DocPermissions
- user :User
- document :Document
- class datatypes.models.Process(__pydantic_self__, **data)
Bases:
sqlmodel.SQLModel
- Parameters
data (Any) –
- project_name :str
- process_name :str
- project :Project
- documents_processes :List[DocumentProcess]
- class datatypes.models.DocumentRole
Bases:
int
,enum.Enum
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- input = 1
- output = 2
- class datatypes.models.DocumentProcess(__pydantic_self__, **data)
Bases:
sqlmodel.SQLModel
- Parameters
data (Any) –
- class Fields
- table_name = documentprocess
- project_name = project_name
- process_name = process_name
- document_name = document_name
- document_role = document_role
- project_name :str
- process_name :str
- document_name :str
- document_role :DocumentRole
- document :Document
- process :Process
- class datatypes.models.MSProject(__pydantic_self__, **data)
Bases:
sqlmodel.SQLModel
- Parameters
data (Any) –
- class Fields
- table_name = msproject
- project_name = project_name
- ms_project_name = ms_project_name
- tasks = tasks
- resources = resources
- project_name :str
- author_name :str
- update_author_name :str
- ms_project_name :str
- tasks :List[Dict]
- resources :List[Dict]
- computed_fields_reference :List[MSProjectComputedField]
- class datatypes.models.MSProjectField
Bases:
enum.Enum
Generic enumeration.
Derive from this class to define new enumerations.
- tasks = tasks
- resources = resources
- class datatypes.models.MSProjectComputedField(__pydantic_self__, **data)
Bases:
sqlmodel.SQLModel
- Parameters
data (Any) –
- class Fields
- table_name = msprojectcomputedfield
- project_name = project_name
- ms_project_name = ms_project_name
- field_document_name = field_document_name
- field_name = field_name
- jsonpath = jsonpath
- field_value = field_value
- field_from = field_from
- project_name :str
- ms_project_name :str
- field_document_name :str
- field_name :str
- jsonpath :str
- field_value :List | None
- field_from :str
- field_document :Document
- ms_project :MSProject
- class datatypes.models.ComputedField(__pydantic_self__, **data)
Bases:
sqlmodel.SQLModel
- Parameters
data (Any) –
- class Fields
- table_name = computedfield
- project_name = project_name
- field_document_name = field_document_name
- reference_document_name = reference_document_name
- field_name = field_name
- jsonpath = jsonpath
- field_value = field_value
- project_name :str
- field_document_name :str
- reference_document_name :str
- field_name :str
- jsonpath :str
- field_value :List | None
- field_document :Document
- reference_document :Document
- class datatypes.models.PatchReturn(__pydantic_self__, **data)
Bases:
sqlmodel.SQLModel
- Parameters
data (Any) –
- id :int | None
- user_name :str | None
- updated_date :datetime | None
- patch :List[Dict] = []
- class datatypes.models.ComputedFieldReturn(__pydantic_self__, **data)
Bases:
sqlmodel.SQLModel
- Parameters
data (Any) –
- field_name :str | None
- field_value :List | None
- class datatypes.models.MSComputedFieldReturn(__pydantic_self__, **data)
Bases:
sqlmodel.SQLModel
- Parameters
data (Any) –
- field_name :str | None
- field_value :List | None
- class datatypes.models.DocumentReturn(__pydantic_self__, **data)
Bases:
sqlmodel.SQLModel
- Parameters
data (Any) –
- project_name :str | None
- document_name :str | None
- author_name :str | None
- jsonschema :Dict | None
- first :Dict | None
- last :Dict | None
- creation_date :datetime | None
- patches :List[PatchReturn] = []
- computed_fields :List[ComputedFieldReturn] = []
- ms_computed_fields :List[MSComputedFieldReturn] = []
- transform_comp_fields(cls, v)
- Parameters
v (list[ComputedFieldReturn]) –
- transform_ms_comp_fields(cls, v)
- Parameters
v (list[ComputedFieldReturn]) –
- class datatypes.models.ProjectReturn(__pydantic_self__, **data)
Bases:
sqlmodel.SQLModel
- Parameters
data (Any) –
- project_name :str | None
- owner_name :str | None
- documents :List[DocumentReturn] = []