-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path0001_initial.py
More file actions
68 lines (62 loc) · 3.95 KB
/
0001_initial.py
File metadata and controls
68 lines (62 loc) · 3.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Generated by Django 3.2.3 on 2022-01-16 05:33
import datetime
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
from django.utils.timezone import utc
import services.validators
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Advertisement',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('product_description', models.TextField()),
('buy_or_sell', models.CharField(choices=[('Buy', 'Buy'), ('Sell', 'Sell')], max_length=4)),
('basic_price', models.FloatField(validators=[django.core.validators.MinValueValidator(9999)])),
('excel_file', models.FileField(blank=True, null=True, upload_to='')),
('excel_file_link', models.URLField(blank=True, max_length=300, null=True)),
('pdf_file', models.FileField(blank=True, null=True, upload_to='')),
('pdf_file_link', models.URLField(blank=True, max_length=300, null=True)),
('image_1', models.FileField(upload_to='')),
('image_1_link', models.URLField(max_length=300)),
('image_2', models.FileField(blank=True, null=True, upload_to='')),
('image_2_link', models.URLField(blank=True, max_length=300, null=True)),
('image_3', models.FileField(blank=True, null=True, upload_to='')),
('image_3_link', models.URLField(blank=True, max_length=300, null=True)),
('image_4', models.FileField(blank=True, null=True, upload_to='')),
('image_4_link', models.URLField(blank=True, max_length=300, null=True)),
('quality', models.CharField(blank=True, choices=[('Prime', 'Prime'), ('Defective', 'Defective')], max_length=10, null=True)),
('temper', models.CharField(blank=True, choices=[('Hard', 'Hard'), ('Soft', 'Soft')], max_length=4, null=True)),
('dimensions', models.CharField(blank=True, max_length=100, null=True)),
('grade', models.CharField(blank=True, max_length=50, null=True)),
('specification_number', models.CharField(blank=True, max_length=20, null=True)),
('quantity', models.IntegerField(blank=True, null=True)),
('coating_in_gsm', models.CharField(blank=True, max_length=30, null=True)),
('color', models.CharField(blank=True, max_length=20, null=True)),
('bidding', models.BooleanField(default=True)),
('bidding_close_date', models.DateTimeField(default=datetime.datetime(2022, 1, 31, 5, 33, 13, 170198, tzinfo=utc))),
('approval', models.BooleanField(blank=True, default=False, null=True)),
('name', models.CharField(max_length=40)),
('mobile_number', models.CharField(max_length=10, validators=[services.validators.validate_phone_number])),
('business_address', models.CharField(max_length=100)),
('location', models.CharField(max_length=100)),
('latitude', models.CharField(blank=True, max_length=15, null=True)),
('longitude', models.CharField(blank=True, max_length=15, null=True)),
('visible', models.BooleanField(default=False)),
('timestamp', models.DateTimeField(auto_now=True)),
],
),
migrations.CreateModel(
name='Bid',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('amount', models.FloatField()),
('selected', models.BooleanField(default=False)),
('advertisement', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='Ads.advertisement')),
],
),
]