added model for sourcePerson

Signed-off-by: Jochen Mehlich <contact@jochenmehlich.de>
This commit is contained in:
Jochen Mehlich 2023-11-29 18:29:43 +01:00
parent 28c721d7aa
commit c529ff1a5f
16 changed files with 143 additions and 0 deletions

8
.idea/.gitignore generated vendored Normal file
View File

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

View File

@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

7
.idea/misc.xml generated Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Black">
<option name="sdkName" value="Python 3.11 (quoteMe)" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.11 (quoteMe)" project-jdk-type="Python SDK" />
</project>

8
.idea/modules.xml generated Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/quoteMe.iml" filepath="$PROJECT_DIR$/.idea/quoteMe.iml" />
</modules>
</component>
</project>

29
.idea/quoteMe.iml generated Normal file
View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="FacetManager">
<facet type="django" name="Django">
<configuration>
<option name="rootFolder" value="$MODULE_DIR$" />
<option name="settingsModule" value="quoteMe/settings.py" />
<option name="manageScript" value="$MODULE_DIR$/manage.py" />
<option name="environment" value="&lt;map/&gt;" />
<option name="doNotUseTestRunner" value="false" />
<option name="trackFilePattern" value="migrations" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/env" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="PyDocumentationSettings">
<option name="format" value="PLAIN" />
<option name="myDocStringFormat" value="Plain" />
</component>
<component name="TemplatesService">
<option name="TEMPLATE_CONFIGURATION" value="Django" />
</component>
</module>

6
.idea/vcs.xml generated Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

View File

@ -38,6 +38,7 @@ INSTALLED_APPS = [
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'sourcePerson'
]
MIDDLEWARE = [

0
sourcePerson/__init__.py Normal file
View File

3
sourcePerson/admin.py Normal file
View File

@ -0,0 +1,3 @@
from django.contrib import admin
# Register your models here.

6
sourcePerson/apps.py Normal file
View File

@ -0,0 +1,6 @@
from django.apps import AppConfig
class SourcepersonConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'sourcePerson'

View File

@ -0,0 +1,25 @@
# Generated by Django 3.2.18 on 2023-11-29 17:26
from django.db import migrations, models
import uuid
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='sourcePerson',
fields=[
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('name', models.CharField(max_length=200)),
('isActive', models.BooleanField(default=True)),
('isArchived', models.BooleanField(default=False)),
('description', models.TextField()),
],
),
]

View File

@ -0,0 +1,25 @@
# Generated by Django 3.2.18 on 2023-11-29 17:29
import datetime
from django.db import migrations, models
from django.utils.timezone import utc
class Migration(migrations.Migration):
dependencies = [
('sourcePerson', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='sourceperson',
name='created_at',
field=models.DateTimeField(default=datetime.datetime(2023, 11, 29, 17, 29, 16, 298686, tzinfo=utc)),
),
migrations.AddField(
model_name='sourceperson',
name='updated_at',
field=models.DateTimeField(default=datetime.datetime(2023, 11, 29, 17, 29, 16, 298700, tzinfo=utc)),
),
]

View File

13
sourcePerson/models.py Normal file
View File

@ -0,0 +1,13 @@
from django.db import models
from django.utils import timezone
import uuid
# Create your models here.
class sourcePerson(models.Model):
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
name = models.CharField(max_length=200)
isActive = models.BooleanField(default=True)
isArchived = models.BooleanField(default=False)
description = models.TextField()
created_at = models.DateTimeField(default=timezone.now())
updated_at = models.DateTimeField(default=timezone.now())

3
sourcePerson/tests.py Normal file
View File

@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

3
sourcePerson/views.py Normal file
View File

@ -0,0 +1,3 @@
from django.shortcuts import render
# Create your views here.