Commit 1255b132 by lyh3024

add models

Change-Id: Ie62a982ddce58aafc2edfff3876143b3fdd3b8b4
parent c959fb01
from django.db import models from django.db import models
from neomodel import StructuredNode, StringProperty
# Create your models here. # 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)
...@@ -37,6 +37,10 @@ INSTALLED_APPS = [ ...@@ -37,6 +37,10 @@ INSTALLED_APPS = [
'django.contrib.sessions', 'django.contrib.sessions',
'django.contrib.messages', 'django.contrib.messages',
'django.contrib.staticfiles', 'django.contrib.staticfiles',
'block.apps.BlockConfig',
'domain.apps.DomainConfig',
'route.apps.RouteConfig',
'django_neomodel'
] ]
MIDDLEWARE = [ MIDDLEWARE = [
......
from django.db import models from django.db import models
from neomodel import StructuredNode, StringProperty, IntegerProperty
# Create your models here. # 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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment