-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.py
19 lines (16 loc) · 841 Bytes
/
schema.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import models
# detect changes while migrating a class
class StudentSchema(models.Model):
id = models.IntegerField(primary=True, default=1, autoincrement=True)
course = models.CharField(max_length=255)
is_active = models.BooleanField(default=1)
class PersonSchema(models.Model):
id = models.IntegerField(primary=True, default=1, autoincrement=True)
first_name = models.CharField(max_length=255)
last_name = models.CharField(max_length=255, null=True, blank=True)
email = models.CharField(max_length=100, null=True, blank=True)
age = models.IntegerField(default=1, null=True, blank=True)
class ProfileSchema(models.Model):
id = models.IntegerField(primary=True, default=1, autoincrement=True)
image = models.ImageField(upload_to="images/")
created_date = models.DateTimeField(auto_now_add=True)