diff --git a/chebi_models/migrations/0002_ontologyproperties.py b/chebi_models/migrations/0002_ontologyproperties.py new file mode 100644 index 0000000000000000000000000000000000000000..3d9859c64d27172a92853f3279003ea5b9a5e0a7 --- /dev/null +++ b/chebi_models/migrations/0002_ontologyproperties.py @@ -0,0 +1,39 @@ +# Generated by Django 4.1 on 2023-02-20 16:52 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("chebi_models", "0001_initial"), + ] + + operations = [ + migrations.CreateModel( + name="OntologyProperties", + fields=[ + ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")), + ("curie", models.CharField(max_length=60, unique=True)), + ("property_type", models.CharField(default="owl:Class", max_length=40)), + ("characteristic", models.CharField(max_length=30, null=True)), + ("label", models.CharField(max_length=60, null=True)), + ("sub_property", models.CharField(max_length=60, null=True)), + ("inverse_of", models.CharField(max_length=40, null=True)), + ("comment", models.TextField(null=True)), + ("xref", models.CharField(max_length=60, null=True)), + ("namespace", models.CharField(max_length=40, null=True)), + ("object_property", models.CharField(max_length=60, null=True)), + ("is_cyclic", models.BooleanField(null=True)), + ("is_transitive", models.BooleanField(null=True)), + ("created_on", models.DateTimeField(auto_now_add=True, null=True)), + ("created_by", models.CharField(max_length=256, null=True)), + ("modified_on", models.DateTimeField(auto_now=True, null=True)), + ("modified_by", models.CharField(max_length=256, null=True)), + ("deleted_on", models.DateTimeField(auto_now=True, null=True)), + ("deleted_by", models.CharField(max_length=256, null=True)), + ], + options={ + "db_table": "ontology_properties", + }, + ), + ] diff --git a/chebi_models/models/compound.py b/chebi_models/models/compound.py index 9158df277bacd4a5008208c1913daad27ea8e9b0..223435bd15ed7a3fb8ae6a983745eb8f509d1dd5 100644 --- a/chebi_models/models/compound.py +++ b/chebi_models/models/compound.py @@ -218,3 +218,20 @@ class Wurcs(BaseModel): class Meta: db_table = "wurcs" + +class OntologyProperties(BaseModel): + curie = models.CharField(max_length=60, unique=True) + property_type = models.CharField(max_length=40, default='owl:Class') + characteristic = models.CharField(max_length=30, null=True) + label = models.CharField(max_length=60, null=True) + sub_property = models.CharField(max_length=60, null=True) + inverse_of = models.CharField(max_length=40, null=True) + comment = models.TextField(null=True) + xref = models.CharField(max_length=60, null=True) + namespace = models.CharField(max_length=40, null=True) + object_property = models.CharField(max_length=60, null=True) + is_cyclic = models.BooleanField(null=True) + is_transitive = models.BooleanField(null=True) + + class Meta: + db_table = 'ontology_properties' \ No newline at end of file