deseasion.backend.models.project module

class deseasion.backend.models.project.Project(name, manager=None, description='', extent=None, is_public=False)

Bases: ProjectBase

Represents a project and its data

created_at
data_list
description
extent
classmethod from_template(template, manager=None)

Create a project from a template.

The manager of the project will be the owner of the template.

Args:

template: the template to copy

id
is_public
is_template
manager_id
modified_at
name
permissions

Create new a permissions table linking a user with an object

The table created will be called ‘<name>_permission’, with <name> being the name of the table where this mixin is used

project_tasks
query: t.ClassVar[Query]

A SQLAlchemy query for a model. Equivalent to db.session.query(Model). Can be customized per-model by overriding query_class.

Warning

The query interface is considered legacy in SQLAlchemy. Prefer using session.execute(select()) instead.

class deseasion.backend.models.project.ProjectBase(name, manager=None, description='', extent=None, is_public=False)

Bases: TimestampMixin, HasPermissions, Model

Permission

alias of ProjectBasePermission

created_at
data_list
description
extent
id
is_public
is_template
manager
manager_id
modified_at
name
permissions

Create new a permissions table linking a user with an object

The table created will be called ‘<name>_permission’, with <name> being the name of the table where this mixin is used

class deseasion.backend.models.project.Template(name, manager=None, description='', extent=None, is_public=False)

Bases: ProjectBase

Represents the template of a project.

A template does not have permissions. Only the manager of the template should have access to it.

created_at
data_list
description
extent
classmethod from_project(project, manager=None)

Create a new project template from an existing project.

id
is_public
is_template
manager_id
modified_at
name
permissions

Create new a permissions table linking a user with an object

The table created will be called ‘<name>_permission’, with <name> being the name of the table where this mixin is used

query: t.ClassVar[Query]

A SQLAlchemy query for a model. Equivalent to db.session.query(Model). Can be customized per-model by overriding query_class.

Warning

The query interface is considered legacy in SQLAlchemy. Prefer using session.execute(select()) instead.