first commit

This commit is contained in:
2024-12-10 10:32:13 -03:00
commit 78a4cb3c37
6881 changed files with 843683 additions and 0 deletions

View File

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,3 @@
from django.contrib import admin
# Register your models here.

View File

@@ -0,0 +1,6 @@
from django.apps import AppConfig
class ComandasConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'comandas'

View File

@@ -0,0 +1,30 @@
# Generated by Django 5.1.4 on 2024-12-10 01:19
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
('clients', '0001_initial'),
('mesas', '0001_initial'),
('typePay', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Comanda',
fields=[
('id', models.AutoField(primary_key=True, serialize=False)),
('dt_open', models.DateTimeField(auto_now_add=True)),
('dt_close', models.DateTimeField(blank=True, null=True)),
('name', models.CharField(max_length=255)),
('client', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='clients.client')),
('mesa', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mesas.mesa')),
('type_pay', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='typePay.typepay')),
],
),
]

View File

@@ -0,0 +1,25 @@
# Generated by Django 5.1.4 on 2024-12-10 01:20
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('comandas', '0001_initial'),
('products', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='ProductComanda',
fields=[
('id', models.AutoField(primary_key=True, serialize=False)),
('data_time', models.DateTimeField(auto_now_add=True)),
('applicant', models.CharField(blank=True, max_length=255, null=True)),
('comanda', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='comandas.comanda')),
('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='products.product')),
],
),
]

View File

@@ -0,0 +1,23 @@
from django.db import models
from clients.models import Client
from products.models import Product
from mesas.models import Mesa
from typePay.models import TypePay
# Create your models here.
class Comanda(models.Model):
id = models.AutoField(primary_key=True)
mesa = models.ForeignKey(Mesa, on_delete=models.CASCADE)
type_pay = models.ForeignKey(TypePay, on_delete=models.SET_NULL, null=True)
dt_open = models.DateTimeField(auto_now_add=True)
dt_close = models.DateTimeField(null=True, blank=True)
client = models.ForeignKey(Client, on_delete=models.SET_NULL, null=True, blank=True)
name = models.CharField(max_length=255)
class ProductComanda(models.Model):
id = models.AutoField(primary_key=True)
comanda = models.ForeignKey(Comanda, on_delete=models.CASCADE)
data_time = models.DateTimeField(auto_now_add=True)
product = models.ForeignKey(Product, on_delete=models.CASCADE)
applicant = models.CharField(max_length=255, null=True, blank=True)

View File

@@ -0,0 +1,12 @@
{% extends "base.html" %}
{% block 'title' %}
Type Pay
{% endblock %}
{% block 'body' %}
Body Type Pay
{% endblock %}

View File

@@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

View File

@@ -0,0 +1,10 @@
from django.urls import path
from . import views
urlpatterns = [
path('', views.comandas, name='comandas'),
]

View File

@@ -0,0 +1,6 @@
from django.shortcuts import render
# Create your views here.
def comandas(request):
return render(request, 'comandas.html')