Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
desd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
kj2-drupisz
desd
Commits
ace31df0
Commit
ace31df0
authored
1 year ago
by
Brody Wilton
Committed by
Brody Wilton
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Add models for User, UserType, Logs, Feedback and bills
parent
c330d2f5
Branches
Branches containing commit
No related tags found
3 merge requests
!12
dashboard waiting for user logic final and data for tables. changed index....
,
!11
dashboard waiting for user logic final and data for tables. changed index....
,
!6
Brodybranch
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
myproject/myapp/models.py
+46
-0
46 additions, 0 deletions
myproject/myapp/models.py
with
46 additions
and
0 deletions
myproject/myapp/models.py
+
46
−
0
View file @
ace31df0
from
django.db
import
models
# Usertypes
# ---------
# 0 - Basic User
# 1 - Admin
# 2 - ML Engineer
# 3 - Accountant
# Create your models here.
class
User
(
models
.
Model
):
"""
* User model
"""
username
=
models
.
CharField
(
max_length
=
150
)
password
=
models
.
CharField
(
max_length
=
16
)
email
=
models
.
EmailField
(
max_length
=
200
)
usertype
=
models
.
ForeignKey
(
"
UserType
"
)
class
UserType
(
models
.
Model
):
"""
* Usertype model
"""
usertype
=
models
.
CharField
(
max_length
=
15
)
class
Logs
(
models
.
Model
):
"""
* Logs model
"""
user_id
=
models
.
ForeignKey
(
"
User
"
)
content
=
models
.
CharField
(
max_length
=
2000
)
date
=
models
.
DateTimeField
()
class
Feedback
(
models
.
Model
):
"""
* Feedback Model
"""
user_id
=
models
.
ForeignKey
(
"
User
"
)
user_id
=
models
.
IntegerField
()
content
=
models
.
CharField
(
max_length
=
2000
)
class
Bills
(
models
.
Model
):
"""
* Bill/receipts Model
"""
user_id
=
models
.
ForeignKey
(
"
User
"
)
date
=
models
.
DateTimeField
()
paid
=
models
.
BooleanField
(
default
=
False
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment