-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
196 changed files
with
6,162 additions
and
277 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"dependencies": { | ||
"@apollo/client": "^3.5.8", | ||
"@tailwindcss/aspect-ratio": "^0.4.0", | ||
"@tailwindcss/forms": "^0.4.0", | ||
"@tailwindcss/typography": "^0.5.1" | ||
}, | ||
"devDependencies": { | ||
"@urql/svelte": "^1.3.3", | ||
"graphql": "^16.3.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from graphene import ObjectType, Schema | ||
from graphene_django import DjangoObjectType | ||
from product.api import query as product_query | ||
from order.api import query as order_query | ||
from users.api import query as user_query | ||
|
||
class query(product_query, user_query, order_query, ObjectType): | ||
pass | ||
|
||
schema = Schema(query=query) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Generated by Django 3.0 on 2022-02-02 13:55 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
('product', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='sale_pricing', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(max_length=100, verbose_name='name to identify in backend')), | ||
('percent_off', models.IntegerField(blank=True, null=True, verbose_name='percent off')), | ||
('sale_price', models.BigIntegerField(blank=True, null=True, verbose_name='sale price')), | ||
('minimum_amount_of_products', models.IntegerField(blank=True, null=True, verbose_name='minimum amount of this product')), | ||
('minimum_order_amount', models.BigIntegerField(blank=True, null=True, verbose_name='minimum order amount')), | ||
('expires', models.DateTimeField(blank=True, null=True, verbose_name='sale expires')), | ||
('uuid', models.UUIDField(verbose_name='product uuid')), | ||
('products', models.ManyToManyField(to='product.product', verbose_name='product on sale')), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='coupon', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(max_length=100, verbose_name='name to identify in backend')), | ||
('code', models.CharField(max_length=36, verbose_name='coupon code')), | ||
('expires', models.DateTimeField(blank=True, null=True, verbose_name='coupon expiration date')), | ||
('maximum_uses', models.BigIntegerField(blank=True, null=True, verbose_name='maximum allowed uses for this code')), | ||
('per_user', models.IntegerField(blank=True, null=True, verbose_name='uses per customer')), | ||
('uses', models.BigIntegerField(default=0, verbose_name='uses so far')), | ||
('products', models.ManyToManyField(to='product.product', verbose_name='products for this coupon')), | ||
], | ||
), | ||
] |
18 changes: 18 additions & 0 deletions
18
starter_backend/discount/migrations/0002_auto_20220202_1438.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 3.1.14 on 2022-02-02 14:38 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('discount', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='sale_pricing', | ||
name='sale_price', | ||
field=models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True, verbose_name='sale price'), | ||
), | ||
] |
40 changes: 40 additions & 0 deletions
40
starter_backend/discount/migrations/0003_auto_20220202_1449.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Generated by Django 3.1.14 on 2022-02-02 14:49 | ||
|
||
from django.db import migrations, models | ||
import uuid | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('product', '0003_auto_20220202_1443'), | ||
('discount', '0002_auto_20220202_1438'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='coupon', | ||
name='name', | ||
field=models.CharField(blank=True, max_length=100, null=True, verbose_name='name to identify in backend'), | ||
), | ||
migrations.AlterField( | ||
model_name='coupon', | ||
name='products', | ||
field=models.ManyToManyField(blank=True, to='product.product', verbose_name='products for this coupon'), | ||
), | ||
migrations.AlterField( | ||
model_name='sale_pricing', | ||
name='name', | ||
field=models.CharField(blank=True, max_length=100, null=True, verbose_name='name to identify in backend'), | ||
), | ||
migrations.AlterField( | ||
model_name='sale_pricing', | ||
name='products', | ||
field=models.ManyToManyField(blank=True, to='product.product', verbose_name='product on sale'), | ||
), | ||
migrations.AlterField( | ||
model_name='sale_pricing', | ||
name='uuid', | ||
field=models.UUIDField(default=uuid.uuid4, editable=False, verbose_name='product uuid'), | ||
), | ||
] |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions
4
...ter.project_slug}}-backend/order/admin.py → starter_backend/order/admin.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
from django.contrib import admin | ||
from .models import ( | ||
order, | ||
) | ||
|
||
# Register your models here. | ||
admin.site.register(order) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from graphene import relay, ObjectType | ||
from graphene_django import DjangoObjectType | ||
from graphene_django.filter import DjangoFilterConnectionField | ||
from .models import * | ||
|
||
class orderType(DjangoObjectType): | ||
class Meta: | ||
model = order | ||
filter_fields = { | ||
'uuid': ['exact'], | ||
'customer': ['exact'], | ||
'status': ['exact'], | ||
'products': ['exact', 'icontains'], | ||
'amount_charged': ['exact', 'lt', 'lte', 'gt', 'gte'], | ||
'shipping_address': ['exact'], | ||
"shipping": ['exact'], | ||
'placed_on': ['exact', 'lt', 'lte', 'gt', 'gte'], | ||
} | ||
|
||
interfaces = (relay.Node, ) | ||
|
||
class query(ObjectType): | ||
order = relay.node.Field(orderType) | ||
all_orders = DjangoFilterConnectionField(orderType) |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Generated by Django 3.0 on 2022-02-02 13:55 | ||
|
||
from django.db import migrations, models | ||
import uuid | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='order', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('uuid', models.UUIDField(default=uuid.UUID('a8e6b398-0a78-4443-b454-efc7d49e0e78'), help_text='uuid field gives each order a unique identifier', unique=True, verbose_name='uuid field')), | ||
('placed_on', models.DateTimeField(auto_now_add=True, help_text='when this order was placed', verbose_name='placed on')), | ||
('draft', models.BooleanField(default=False, verbose_name='order is a draft')), | ||
('shippping', models.BooleanField(default=False, verbose_name='shipping')), | ||
('amount_charged', models.BigIntegerField(help_text='amount for charged for order', verbose_name='amount charged')), | ||
('pre_tax_amount', models.BigIntegerField(help_text='order total before tax', verbose_name='pre tax amount')), | ||
('tax_amount', models.BigIntegerField(help_text='amount charged for taxes', verbose_name='taxes charged')), | ||
('shipping_amount', models.BigIntegerField(help_text='amount charged for shipping', verbose_name='shipping charged')), | ||
('gift', models.BooleanField(default=False, help_text='is this order a gift', verbose_name='gift')), | ||
('gift_from', models.CharField(blank=True, help_text='who is this gift from', max_length=250, null=True, verbose_name='gift from')), | ||
('gift_to', models.CharField(blank=True, help_text='who is this gift for', max_length=250, null=True, verbose_name='gift to')), | ||
('gift_message', models.CharField(blank=True, help_text='message for gift', max_length=250, null=True, verbose_name='gift message')), | ||
('status', models.CharField(choices=[('draft', 'draft'), ('paid', 'paid'), ('processing', 'processing'), ('shipped', 'shipped'), ('in transit', 'in transit'), ('delivered', 'delivered'), ('picked up', 'picked up'), ('error', 'error')], default='paid', max_length=50, verbose_name='order status')), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='wish_list', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(default='wish list', max_length=100, verbose_name='name')), | ||
('get_notifications', models.BooleanField(default=False, verbose_name='get notifications')), | ||
], | ||
), | ||
] |
Oops, something went wrong.