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-05-25 11:19:39 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
88a10bc2f2d4bbff2981c9a502e8d39beef8361c
88a10bc2
1 parent
ecb9d00f
모델 설계
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 @
88a10bc
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