Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
knowledge_graph
Overview
Overview
Details
Activity
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sun Long
knowledge_graph
Commits
1255b132
Commit
1255b132
authored
Mar 05, 2022
by
lyh3024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add models
Change-Id: Ie62a982ddce58aafc2edfff3876143b3fdd3b8b4
parent
c959fb01
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
0 deletions
+40
-0
models.py
domain/models.py
+17
-0
settings.py
knowledge_graph/settings.py
+4
-0
models.py
route/models.py
+19
-0
No files found.
domain/models.py
View file @
1255b132
from
django.db
import
models
from
neomodel
import
StructuredNode
,
StringProperty
# Create your models here.
class
RequestIP
(
StructuredNode
):
request_ip
=
StringProperty
(
required
=
True
)
class
DnsIP
(
StructuredNode
):
dns_ip
=
StringProperty
(
required
=
True
)
class
DomainName
(
StructuredNode
):
domain_name
=
StringProperty
(
required
=
True
)
class
Ipv4Address
(
StructuredNode
):
ipv4_address
=
StringProperty
(
required
=
True
)
knowledge_graph/settings.py
View file @
1255b132
...
...
@@ -37,6 +37,10 @@ INSTALLED_APPS = [
'django.contrib.sessions'
,
'django.contrib.messages'
,
'django.contrib.staticfiles'
,
'block.apps.BlockConfig'
,
'domain.apps.DomainConfig'
,
'route.apps.RouteConfig'
,
'django_neomodel'
]
MIDDLEWARE
=
[
...
...
route/models.py
View file @
1255b132
from
django.db
import
models
from
neomodel
import
StructuredNode
,
StringProperty
,
IntegerProperty
# Create your models here.
class
RouteIp
(
StructuredNode
):
ip
=
StringProperty
()
country
=
StringProperty
()
region
=
StringProperty
()
city
=
StringProperty
()
isp
=
StringProperty
()
in_degree
=
IntegerProperty
()
out_degree
=
IntegerProperty
()
class
FirstIp
(
RouteIp
):
pass
class
EndIp
(
RouteIp
):
pass
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