Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
GeoInt_SIDT
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mario Chirinos Colunga
GeoInt_SIDT
Commits
fbc513f5
Commit
fbc513f5
authored
Aug 03, 2018
by
Renán Sosa Guillen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
models for cart management
parent
dad98aad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
models.py
catalog/models.py
+16
-0
No files found.
catalog/models.py
View file @
fbc513f5
...
...
@@ -3,6 +3,7 @@
## Create your models here.
from
__future__
import
unicode_literals
from
django.contrib.auth.models
import
User
from
django.db
import
models
...
...
@@ -42,3 +43,18 @@ class Product_l2a(models.Model):
prod_l1c
=
models
.
ForeignKey
(
Product_l1c
,
on_delete
=
models
.
CASCADE
)
identifier
=
models
.
CharField
(
max_length
=
50
)
file_path
=
models
.
CharField
(
max_length
=
50
)
class
CartProduct
(
models
.
Model
):
user
=
models
.
ForeignKey
(
User
,
on_delete
=
models
.
CASCADE
)
add_date
=
models
.
DateTimeField
(
auto_now
=
True
)
prod_uuid
=
models
.
CharField
(
max_length
=
50
)
prod_num
=
models
.
IntegerField
()
prod_l1c
=
models
.
ForeignKey
(
Product_l1c
,
on_delete
=
models
.
CASCADE
,
null
=
True
)
purchased
=
models
.
NullBooleanField
()
class
Purchase
(
models
.
Model
):
user
=
models
.
ForeignKey
(
User
,
on_delete
=
models
.
CASCADE
)
pur_date
=
models
.
DateTimeField
(
auto_now
=
True
)
## transaction date
prod_list
=
models
.
ManyToManyField
(
Product_l1c
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment