# Path: cmdb/models.py
# class Host(models.Model):
#     hostname = models.CharField(max_length=50, verbose_name=u"主机名", unique=True)
#     ip = models.GenericIPAddressField(u"管理IP", max_length=15)
#     other_ip = models.CharField(u"其它IP", max_length=100, null=True, blank=True)
#     group = models.ForeignKey(HostGroup, verbose_name=u"设备组", on_delete=models.SET_NULL, null=True, blank=True)
#     asset_no = models.CharField(u"资产编号", max_length=50, null=True, blank=True)
#     asset_type = models.CharField(u"设备类型", choices=ASSET_TYPE, max_length=30, null=True, blank=True)
#     status = models.CharField(u"设备状态", choices=ASSET_STATUS, max_length=30, null=True, blank=True)
#     os = models.CharField(u"操作系统", max_length=100, null=True, blank=True)
#     vendor = models.CharField(u"设备厂商", max_length=50, null=True, blank=True)
#     cpu_model = models.CharField(u"CPU型号", max_length=100, null=True, blank=True)
#     cpu_num = models.CharField(u"CPU数量", max_length=100, null=True, blank=True)
#     memory = models.CharField(u"内存大小", max_length=30, null=True, blank=True)
#     disk = models.CharField(u"硬盘信息", max_length=255, null=True, blank=True)
#     sn = models.CharField(u"SN号 码", max_length=60, blank=True)
#     idc = models.ForeignKey(Idc, verbose_name=u"所在机房", on_delete=models.SET_NULL, null=True, blank=True)
#     position = models.CharField(u"所在位置", max_length=100, null=True, blank=True)
#     memo = models.TextField(u"备注信息", max_length=200, null=True, blank=True)
# 
#     def __unicode__(self):
#         return self.hostname


from django.db import models
from cmdb.models import Host
class Project(models.Model):
    LANGUAGE_TYPES = (
        ("Java", "Java"),
        ("PHP", "PHP"),
        ("Python", "Python"),
        ("C#", "C#"),
        ("Html", "Html"),
        ("Javascript", "Javascript"),
        ("C/C++", "C/C++"),
        ("Ruby", "Ruby"),
        ("Other", "Other"),
    )

    APP_TYPE = (
        ("Frontend", "Frontend"),
        ("Middleware", "Middleware"),
        ("Backend", "Backend"),
    )

    SERVER_TYPE = (
        ("Tomcat", "Tomcat"),
        ("Weblogic", "Weblogic"),
        ("JETTY", "JETTY"),
        ("Nginx", "Nginx"),
        ("Gunicorn", "Gunicorn"),
        ("Uwsgi", "Uwsgi"),
        ("Apache", "Apache"),
        ("IIS", "IIS"),
    )


# Path: cmdb/models.py
# class Host(models.Model):
#     hostname = models.CharField(max_length=50, verbose_name=u"主机名", unique=True)
#     ip = models.GenericIPAddressField(u"管理IP", max_length=15)
#     other_ip = models.CharField(u"其它IP", max_length=100, null=True, blank=True)
#     group = models.ForeignKey(HostGroup, verbose_name=u"设备组", on_delete=models.SET_NULL, null=True, blank=True)
#     asset_no = models.CharField(u"资产编号", max_length=50, null=True, blank=True)
#     asset_type = models.CharField(u"设备类型", choices=ASSET_TYPE, max_length=30, null=True, blank=True)
#     status = models.CharField(u"设备状态", choices=ASSET_STATUS, max_length=30, null=True, blank=True)
#     os = models.CharField(u"操作系统", max_length=100, null=True, blank=True)
#     vendor = models.CharField(u"设备厂商", max_length=50, null=True, blank=True)
#     cpu_model = models.CharField(u"CPU型号", max_length=100, null=True, blank=True)
#     cpu_num = models.CharField(u"CPU数量", max_length=100, null=True, blank=True)
#     memory = models.CharField(u"内存大小", max_length=30, null=True, blank=True)
#     disk = models.CharField(u"硬盘信息", max_length=255, null=True, blank=True)
#     sn = models.CharField(u"SN号 码", max_length=60, blank=True)
#     idc = models.ForeignKey(Idc, verbose_name=u"所在机房", on_delete=models.SET_NULL, null=True, blank=True)
#     position = models.CharField(u"所在位置", max_length=100, null=True, blank=True)
#     memo = models.TextField(u"备注信息", max_length=200, null=True, blank=True)
# 
#     def __unicode__(self):
#         return self.hostname


# Path: appconf/models.py
from django.db import models
from cmdb.models import Host

class Project(models.Model):
    LANGUAGE_TYPES = (
        ("Java", "Java"),
        ("PHP", "PHP"),
        ("Python", "Python"),
        ("C#", "C#"),
        ("Html", "Html"),
        ("Javascript", "Javascript"),
        ("C/C++", "C/C++"),
        ("Ruby", "Ruby"),
        ("Other", "Other"),
    )

    APP_TYPE = (
        ("Frontend", "Frontend"),
        ("Middleware", "Middleware"),
        ("Backend", "Backend"),
    )

    SERVER_TYPE = (
        ("Tomcat", "Tomcat"),
        ("Weblogic", "Weblogic"),
        ("JETTY", "JETTY"),
        ("Nginx", "Nginx"),
        ("Gunicorn", "Gunicorn"),
        ("Uwsgi", "Uwsgi"),
        ("Apache", "Apache"),
        ("IIS", "IIS"),
    )


    APP_ARCH = (