You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
xmrauctions/items/migrations/0001_initial.py

42 lines
1.7 KiB
Python

# Generated by Django 2.2.7 on 2019-12-24 08:08
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import items.models
import core.validators
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='Item',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=100)),
('list_date', models.DateTimeField(auto_now_add=True)),
('last_updated', models.DateTimeField(auto_now=True)),
('description', models.TextField(max_length=500)),
('ask_price_xmr', models.FloatField()),
('available', models.BooleanField(default=True)),
('payout_address', models.CharField(max_length=100, validators=[core.validators.address_is_valid_monero])),
('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='owner', to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='ItemImage',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('image', models.ImageField(upload_to='%Y/%m/%d')),
('item', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='images', to='items.Item')),
('thumbnail', models.ImageField(upload_to='%Y/%m/%d')),
],
),
]