You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.5 KiB
40 lines
1.5 KiB
from django.db import models |
|
|
|
import asyncio |
|
|
|
|
|
class Orders(models.Model): |
|
SEND_MESSAGE = ( |
|
(True, 'Написать'), |
|
(False, 'Не отправлять'), |
|
(None, 'Неизвестно'), |
|
) |
|
|
|
IS_APPROVED = ( |
|
(True, 'Заказ подтвержден'), |
|
(False, 'Заказ не подтвержден'), |
|
(None, 'Неизвестно'), |
|
) |
|
|
|
|
|
orderID = models.AutoField(primary_key=True, verbose_name='id заказа') |
|
userID = models.CharField(max_length=100, verbose_name='id пользователя в tg', null=True) |
|
orderName = models.CharField(max_length=100, verbose_name='наименование', null=True) |
|
orderDesc = models.TextField(verbose_name='описание', null=True) |
|
orderPhoto = models.ImageField(upload_to='photo/', verbose_name='фото') |
|
orderPhotoPay = models.ImageField(upload_to='photo/', verbose_name='чек') |
|
orderAddress = models.CharField(max_length=100, verbose_name='адрес доставки', blank=True, null=True) |
|
orderAccess = models.CharField(max_length=100, verbose_name='доступ', blank=True, null=True) |
|
orderCreateDateTime = models.DateTimeField(auto_now_add=True, null=True, verbose_name='дата и время создания') |
|
orderStatus = models.CharField(max_length=100, verbose_name='статус заказа', blank=True, null=True) |
|
|
|
|
|
|
|
class Meta: |
|
# app_label = 'adminpanel' |
|
verbose_name_plural = 'Заказы' |
|
managed = False |
|
db_table = 'orders' |
|
|
|
# def __str__(self): |
|
# return self.name |