Skip to content

Commit

Permalink
add new model
Browse files Browse the repository at this point in the history
  • Loading branch information
adlius committed Nov 13, 2023
1 parent d5331da commit f5fd5fd
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions osf/models/cedar_metadata.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from django.db import models
from osf.utils.datetime_aware_jsonfield import DateTimeAwareJSONField
from .base import BaseModel, ObjectIDMixin


class CedarMetadataTemplate(ObjectIDMixin, BaseModel):
title = models.CharField(max_length=255)
template = DateTimeAwareJSONField(default=dict)
active = models.BooleanField(default=True)
tempate_version = models.PositiveIntegerField

class Meta:
unique_together = ('title', 'template_version')

def __unicode__(self):
return f'({self.title}, version {self.tempate_version})'

0 comments on commit f5fd5fd

Please sign in to comment.