Browse Source

Finished base data model

main
Artemis 2 months ago
parent
commit
6016abb305
  1. 3
      bookmarks/migrations/0001_initial.py
  2. 1
      bookmarks/models.py

3
bookmarks/migrations/0001_initial.py

@ -1,4 +1,4 @@
# Generated by Django 3.1.4 on 2021-11-20 15:08
# Generated by Django 3.1.4 on 2021-11-20 21:05
from django.db import migrations, models
import uuid
@ -19,6 +19,7 @@ class Migration(migrations.Migration):
('public_id', models.UUIDField(db_index=True, default=uuid.uuid4, unique=True)),
('title', models.CharField(max_length=255)),
('link', models.URLField()),
('icon', models.ImageField(upload_to='bookmarks-icons')),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
],

1
bookmarks/models.py

@ -16,6 +16,7 @@ class Bookmark(models.Model):
public_id = models.UUIDField(default=uuid4, db_index=True, unique=True)
title = models.CharField(max_length=255)
link = models.URLField()
icon = models.ImageField(upload_to='bookmarks-icons')
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)

Loading…
Cancel
Save