Changeset View
Changeset View
Standalone View
Standalone View
swh/deposit/models.py
# Copyright (C) 2017-2018 The Software Heritage developers | # Copyright (C) 2017-2020 The Software Heritage developers | ||||
# See the AUTHORS file at the top-level directory of this distribution | # See the AUTHORS file at the top-level directory of this distribution | ||||
# License: GNU General Public License version 3, or any later version | # License: GNU General Public License version 3, or any later version | ||||
# See top-level LICENSE file for more information | # See top-level LICENSE file for more information | ||||
# Generated from: | # Generated from: | ||||
# cd swh_deposit && \ | # cd swh_deposit && \ | ||||
# python3 -m manage inspectdb | # python3 -m manage inspectdb | ||||
▲ Show 20 Lines • Show All 112 Lines • ▼ Show 20 Lines | class Deposit(models.Model): | ||||
collection = models.ForeignKey("DepositCollection", models.DO_NOTHING) | collection = models.ForeignKey("DepositCollection", models.DO_NOTHING) | ||||
# Deposit's external identifier | # Deposit's external identifier | ||||
external_id = models.TextField() | external_id = models.TextField() | ||||
# Deposit client | # Deposit client | ||||
client = models.ForeignKey("DepositClient", models.DO_NOTHING) | client = models.ForeignKey("DepositClient", models.DO_NOTHING) | ||||
# SWH's loading result identifier | # SWH's loading result identifier | ||||
swh_id = models.TextField(blank=True, null=True) | swh_id = models.TextField(blank=True, null=True) | ||||
swh_id_context = models.TextField(blank=True, null=True) | swh_id_context = models.TextField(blank=True, null=True) | ||||
swh_anchor_id = models.TextField(blank=True, null=True) | |||||
swh_anchor_id_context = models.TextField(blank=True, null=True) | |||||
# Deposit's status regarding loading | # Deposit's status regarding loading | ||||
status = models.TextField(choices=DEPOSIT_STATUS, default=DEPOSIT_STATUS_PARTIAL) | status = models.TextField(choices=DEPOSIT_STATUS, default=DEPOSIT_STATUS_PARTIAL) | ||||
status_detail = JSONField(null=True) | status_detail = JSONField(null=True) | ||||
# deposit can have one parent | # deposit can have one parent | ||||
parent = models.ForeignKey("self", on_delete=models.PROTECT, null=True) | parent = models.ForeignKey("self", on_delete=models.PROTECT, null=True) | ||||
check_task_id = models.TextField( | check_task_id = models.TextField( | ||||
blank=True, null=True, verbose_name="Scheduler's associated checking task id" | blank=True, null=True, verbose_name="Scheduler's associated checking task id" | ||||
) | ) | ||||
▲ Show 20 Lines • Show All 96 Lines • Show Last 20 Lines |