Skip to content

Commit 319e8cf

Browse files
committed
Added a person model
I added a person model to the community db part
1 parent 398b152 commit 319e8cf

2 files changed

Lines changed: 36 additions & 1 deletion

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Generated by Django 4.1 on 2022-08-11 02:58
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
initial = True
9+
10+
dependencies = []
11+
12+
operations = [
13+
migrations.CreateModel(
14+
name="Person",
15+
fields=[
16+
(
17+
"id",
18+
models.BigAutoField(
19+
auto_created=True,
20+
primary_key=True,
21+
serialize=False,
22+
verbose_name="ID",
23+
),
24+
),
25+
("first_name", models.CharField(max_length=100)),
26+
("last_name", models.CharField(blank=True, max_length=100)),
27+
("country", models.CharField(blank=True, max_length=100)),
28+
("mobile_number", models.CharField(blank=True, max_length=20)),
29+
],
30+
),
31+
]

src/community_db/models.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
from django.db import models
22

3-
# Create your models here.
3+
class Person(models.Model):
4+
first_name = models.CharField(max_length=100)
5+
last_name = models.CharField(max_length=100, blank=True)
6+
country = models.CharField(max_length=100, blank=True)
7+
mobile_number = models.CharField(max_length=20, blank=True)

0 commit comments

Comments
 (0)