mirror of
https://github.com/welton89/RRBEC.git
synced 2026-04-05 21:45:41 +00:00
first commit
This commit is contained in:
0
gestaoRaul/comandas/__init__.py
Normal file
0
gestaoRaul/comandas/__init__.py
Normal file
BIN
gestaoRaul/comandas/__pycache__/__init__.cpython-310.pyc
Normal file
BIN
gestaoRaul/comandas/__pycache__/__init__.cpython-310.pyc
Normal file
Binary file not shown.
BIN
gestaoRaul/comandas/__pycache__/admin.cpython-310.pyc
Normal file
BIN
gestaoRaul/comandas/__pycache__/admin.cpython-310.pyc
Normal file
Binary file not shown.
BIN
gestaoRaul/comandas/__pycache__/apps.cpython-310.pyc
Normal file
BIN
gestaoRaul/comandas/__pycache__/apps.cpython-310.pyc
Normal file
Binary file not shown.
BIN
gestaoRaul/comandas/__pycache__/models.cpython-310.pyc
Normal file
BIN
gestaoRaul/comandas/__pycache__/models.cpython-310.pyc
Normal file
Binary file not shown.
BIN
gestaoRaul/comandas/__pycache__/urls.cpython-310.pyc
Normal file
BIN
gestaoRaul/comandas/__pycache__/urls.cpython-310.pyc
Normal file
Binary file not shown.
BIN
gestaoRaul/comandas/__pycache__/views.cpython-310.pyc
Normal file
BIN
gestaoRaul/comandas/__pycache__/views.cpython-310.pyc
Normal file
Binary file not shown.
3
gestaoRaul/comandas/admin.py
Normal file
3
gestaoRaul/comandas/admin.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
6
gestaoRaul/comandas/apps.py
Normal file
6
gestaoRaul/comandas/apps.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class ComandasConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'comandas'
|
||||
30
gestaoRaul/comandas/migrations/0001_initial.py
Normal file
30
gestaoRaul/comandas/migrations/0001_initial.py
Normal 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')),
|
||||
],
|
||||
),
|
||||
]
|
||||
25
gestaoRaul/comandas/migrations/0002_productcomanda.py
Normal file
25
gestaoRaul/comandas/migrations/0002_productcomanda.py
Normal 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')),
|
||||
],
|
||||
),
|
||||
]
|
||||
0
gestaoRaul/comandas/migrations/__init__.py
Normal file
0
gestaoRaul/comandas/migrations/__init__.py
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
23
gestaoRaul/comandas/models.py
Normal file
23
gestaoRaul/comandas/models.py
Normal 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)
|
||||
12
gestaoRaul/comandas/templates/comandas.html
Normal file
12
gestaoRaul/comandas/templates/comandas.html
Normal file
@@ -0,0 +1,12 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
|
||||
|
||||
|
||||
{% block 'title' %}
|
||||
Type Pay
|
||||
{% endblock %}
|
||||
|
||||
{% block 'body' %}
|
||||
Body Type Pay
|
||||
{% endblock %}
|
||||
3
gestaoRaul/comandas/tests.py
Normal file
3
gestaoRaul/comandas/tests.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
10
gestaoRaul/comandas/urls.py
Normal file
10
gestaoRaul/comandas/urls.py
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
from django.urls import path
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
path('', views.comandas, name='comandas'),
|
||||
|
||||
|
||||
|
||||
]
|
||||
6
gestaoRaul/comandas/views.py
Normal file
6
gestaoRaul/comandas/views.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
||||
|
||||
def comandas(request):
|
||||
return render(request, 'comandas.html')
|
||||
Reference in New Issue
Block a user