Fakultas Ilmu Komputer UI

models.py 768 Bytes
Newer Older
1
from django.db import models
2
3
4
5
from django.contrib.postgres.fields import JSONField

from app.models import Materi, VERIFICATION_STATUS
from authentication.models import User
6

7

8
class VerificationSetting(models.Model):
9
    title = models.CharField(max_length=250, blank=False)
10
    description = models.TextField(blank=False, default="")
11
    archived = models.BooleanField(default=False, blank=False)
12
13
14
15
16
17
18
19
20


class VerificationReport(models.Model):
    report = JSONField()
    materi = models.ForeignKey(Materi, models.SET_NULL, null=True)
    user = models.ForeignKey(User, models.SET_NULL, null=True)
    timestamp = models.DateTimeField(auto_now_add=True)
    status = models.CharField(
        max_length=30, choices=VERIFICATION_STATUS, default=VERIFICATION_STATUS[0][0])