Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-CloudComputing
/
C_Team_KhuDrive
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
권주희
2020-06-06 14:33:42 +0900
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
9ae81c84445fa179f19b2f2d6d3a2f5932f139b9
9ae81c84
2 parents
ecb9d00f
88a10bc2
Merge branch 'feature/item_model_create' into 'develop'
모델 설계 See merge request
!2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
0 deletions
backend/khudrive/api/models.py
backend/khudrive/api/models.py
View file @
9ae81c8
from
django.db
import
models
# Create your models here.
class
Item
(
models
.
Model
):
item_id
=
models
.
IntegerField
(
primary_key
=
True
)
is_folder
=
models
.
BooleanField
(
default
=
False
)
name
=
models
.
CharField
(
max_length
=
50
)
path
=
models
.
TextField
()
parent
=
models
.
ForiegnKey
(
related_naem
=
'items'
,
on_delete
=
models
.
CASCADE
)
#related_name
user_id
=
models
.
IntegerField
()
size
=
models
.
IntegerField
()
is_deleted
=
models
.
BooleanField
(
default
=
False
)
created_time
=
models
.
DateTimeField
(
blank
=
False
)
updated_time
=
models
.
DateTimeField
()
status
=
models
.
BooleanField
()
#file = models.FileField(upload_to = \path)
class
Meta
:
ordering
=
[
'item_id'
]
class
SharedItem
(
models
.
Model
):
item_id
=
models
.
IntegerField
()
#file_id?
valid
=
models
.
DateTimeFIeld
()
password
=
models
.
CharField
(
max_length
=
20
)
class
Meta
:
ordering
=
[
'item_id'
]
class
User
(
models
.
Model
):
int_id
=
models
.
IntegerField
()
user_id
=
models
.
CharField
(
max_length
=
50
)
name
=
models
.
CharField
(
max_length
=
50
)
password
=
models
.
CharField
(
max_length
=
20
)
total_size
=
models
.
IntegerField
()
current_size
=
models
.
IntegerField
()
class
Meta
:
ordering
=
[
'int_id'
]
...
...
Please
register
or
login
to post a comment