add django backend in /core
ported from laravel in c3lf/lfbackend repo
This commit is contained in:
parent
dd75c2b0d6
commit
1f41b81b8f
29 changed files with 1201 additions and 0 deletions
30
core/files/migrations/0001_initial.py
Normal file
30
core/files/migrations/0001_initial.py
Normal file
|
@ -0,0 +1,30 @@
|
|||
# Generated by Django 4.2.7 on 2023-11-18 11:28
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
import files.models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
('inventory', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='File',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('created_at', models.DateTimeField(blank=True, null=True)),
|
||||
('updated_at', models.DateTimeField(blank=True, null=True)),
|
||||
('deleted_at', models.DateTimeField(blank=True, null=True)),
|
||||
('file', models.ImageField(upload_to=files.models.hash_upload)),
|
||||
('mime_type', models.CharField(max_length=255)),
|
||||
('hash', models.CharField(max_length=64, unique=True)),
|
||||
('item', models.ForeignKey(blank=True, db_column='iid', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='files', to='inventory.item')),
|
||||
],
|
||||
),
|
||||
]
|
0
core/files/migrations/__init__.py
Normal file
0
core/files/migrations/__init__.py
Normal file
Loading…
Add table
Add a link
Reference in a new issue