diff --git a/dongtai/models/sca_maven_db.py b/dongtai/models/sca_maven_db.py index ed7766a..cf86b13 100644 --- a/dongtai/models/sca_maven_db.py +++ b/dongtai/models/sca_maven_db.py @@ -8,14 +8,25 @@ from dongtai.utils.settings import get_managed +class ImportFrom(models.IntegerChoices): + SYSTEM = 1 + USER = 2 + __empty__ = 2 + + class ScaMavenDb(models.Model): group_id = models.CharField(max_length=255, blank=True, null=True) atrifact_id = models.CharField(max_length=255, blank=True, null=True) version = models.CharField(max_length=255, blank=True, null=True) - sha_1 = models.CharField(unique=True, max_length=255, blank=True, null=True) + sha_1 = models.CharField(unique=True, + max_length=255, + blank=True, + null=True) package_name = models.CharField(max_length=255, blank=True, null=True) aql = models.CharField(max_length=255, blank=True, null=True) license = models.CharField(max_length=255, blank=True, null=True) + import_from = models.IntegerField(choices=ImportFrom.choices, + default=ImportFrom.USER) class Meta: managed = get_managed()