Advertisement
Guest User

Untitled

a guest
Aug 5th, 2020
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.66 KB | None | 0 0
  1. from django.db import models
  2.  
  3.  
  4. # Create your models here.
  5.  
  6. class List(models.Model):
  7.     id = models.AutoField(primary_key=True)
  8.     name = models.CharField(max_length=250)
  9.  
  10.  
  11. class Domain(models.Model):
  12.     id = models.AutoField(primary_key=True)
  13.     domain_name = models.CharField(max_length=50)
  14.  
  15.  
  16. class Journal(models.Model):
  17.     id = models.AutoField(primary_key=True)
  18.     title = models.CharField(max_length=250)
  19.     abbreviation = models.CharField(max_length=50)
  20.     impact_factor = models.IntegerField()
  21.     ministerial_points = models.IntegerField()
  22.     domain = models.ManyToManyField(Domain)
  23.  
  24.     def __str__(self):
  25.         return self.title
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement