Metadata-Version: 2.4
Name: bdrc-db-models
Version: 2.0.3a0
Summary: More Secure Bdrc Db library
Author-email: jimk <jimk@tbrc.org>, Buddhist Digital Resource Center <jimk@tbrc.org>
License-Expression: MIT
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 5 - Production/Stable
Requires-Python: >=3.9
Description-Content-Type: text/x-rst
Requires-Dist: bdrc-db-lib2>=2.0.3a
Requires-Dist: pytest>=8.4.2

==============
Bdrc Db Models
==============

SqlAlchemy classes representing parts of the DRS database.

Schema

IdMixin
=======

Provides generic id in primary key

**Attributes:**

- id

TimestampMixin
==============

Injects created and update times

**Attributes:**

- create_time
- update_time

IdTimestampMixin
================

Provides generic id and create+update time columns

ProjectTypes
============

Types of projects, e.g. capture, digitization, distribution, analyis, etc.

**Attributes:**

- project_type_name
- project_type_desc
- project

Projects
========

Specific projects, e.g. Google books, DRS

**Attributes:**

- name
- description
- project_type_id
- project_type
- m_type_id
- m_type
- member

MemberTypes
===========

Ususally, container level (work, volume).

**Attributes:**

- m_type
- project
- members

MemberStates
============

States of project members (See States)

**Attributes:**

- m_state_name
- m_state_desc
- project_member

ProjectMembers
==============

An instance of a work or volume in a specific project

**Attributes:**

- pm_id
- pm_type
- pm_work_id
- pm_volume_id
- pm_project
- project
- pm_project_state_id
- member_type
- project_member_state

Steps
=====

All possible steps.

**Attributes:**

- s_name
- s_desc

ProjectSteps
============

A Step instance in a specific project

**Attributes:**

- ps_project
- ps_step
- project
- step

ProjectMemberSteps
==================

Lookup table to track steps completed for project members

**Attributes:**

- project_member_id
- project_step_id
- project_step_time

Works
=====

**Attributes:**

- workId
- WorkName
- WorkSize
- HOLLIS
- WorkFileCount
- WorkImageFileCount
- WorkImageTotalFileSize
- WorkNonImageFileCount
- WorkNonImageTotalFileSize
- volumes
- create_time
- update_time

Volumes
=======

**Attributes:**

- volumeId
- label
- workId
- work
- gb_downloads
- gb_content
- gb_state
- gb_dist
- gb_unpack
- create_time
- update_time

GbMetadata
==========

Record the upload of a work's metadata to GB

**Attributes:**

- id
- work_id
- upload_time
- upload_result
- create_time
- update_time

GbContent
=========

Records the steps in an **image group's** process. Captures the steps that **this service** has performed

**Attributes:**

- id
- volume_id
- job_step
- step_time
- step_rc
- gb_log
- volume
- create_time
- update_time

GbState
=======

Records raw google book data as we poll for it. Captures the state of Google's processing

**Attributes:**

- volume_id
- job_state
- gb_log
- state_date
- volume
- create_time
- update_time

GbDownload
==========

**Attributes:**

- id
- volume_id
- download_object_name
- download_path
- download_time
- create_time
- update_time
- volume

GbReadyTrack
============

Queue of items ready to be acted on

**Attributes:**

- target_id
- activity

GbUnpack
========

**Attributes:**

- volume_id
- unpack_object_name
- unpacked_path
- unpack_time
- volume

GbDistribution
==============

Records the steps in an **image group's** process. Captures the steps that **this service** has performed

**Attributes:**

- volume_id
- dist_time
- src
- dest
- volume

DipActivities
=============

Legal DIP activities

**Attributes:**

- id
- label
