mirror of
https://github.com/lemeow125/DocManagerBackend.git
synced 2025-04-28 02:31:23 +08:00
Add documents app
This commit is contained in:
parent
ccd7c5873c
commit
bb9fcc3d7c
12 changed files with 182 additions and 0 deletions
50
docmanager_backend/documents/migrations/0001_initial.py
Normal file
50
docmanager_backend/documents/migrations/0001_initial.py
Normal file
|
@ -0,0 +1,50 @@
|
|||
# Generated by Django 5.1.3 on 2024-11-23 14:13
|
||||
|
||||
import django.utils.timezone
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = []
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name="Document",
|
||||
fields=[
|
||||
(
|
||||
"id",
|
||||
models.BigAutoField(
|
||||
auto_created=True,
|
||||
primary_key=True,
|
||||
serialize=False,
|
||||
verbose_name="ID",
|
||||
),
|
||||
),
|
||||
("name", models.CharField(max_length=100)),
|
||||
(
|
||||
"document_type",
|
||||
models.CharField(
|
||||
choices=[
|
||||
("pdf", "PDF"),
|
||||
("image", "Image"),
|
||||
("video", "Video"),
|
||||
("doc", "Word Document"),
|
||||
("excel", "Excel Document"),
|
||||
("ppt", "Powerpoint Document"),
|
||||
],
|
||||
max_length=32,
|
||||
),
|
||||
),
|
||||
("file", models.FileField(upload_to="documents/")),
|
||||
(
|
||||
"date_uploaded",
|
||||
models.DateTimeField(
|
||||
default=django.utils.timezone.now, editable=False
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
]
|
0
docmanager_backend/documents/migrations/__init__.py
Normal file
0
docmanager_backend/documents/migrations/__init__.py
Normal file
Loading…
Add table
Add a link
Reference in a new issue