# 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
        ("svn", "svn"),
        ("git", "git"),
        ("file", "file"),
    )

    name = models.CharField(u"项目名称", max_length=50, unique=True, null=False, blank=False)
    description = models.CharField(u"项目描述", max_length=255, null=True, blank=True)
    language_type = models.CharField(u"语言类型", choices=LANGUAGE_TYPES, max_length=30, null=True, blank=True)
    app_type = models.CharField(u"程序类型", choices=APP_TYPE, max_length=30, null=True, blank=True)
    server_type = models.CharField(u"服务器类型", choices=SERVER_TYPE, max_length=30, null=True, blank=True)
    app_arch = models.CharField(u"程序框架", choices=APP_ARCH, max_length=30, null=True, blank=True)
    source_type = models.CharField(max_length=255, choices=SOURCE_TYPE, verbose_name=u"源类型", blank=True)
    source_address = models.CharField(max_length=255, verbose_name=u"源地址", null=True, blank=True)
    appPath = models.CharField(u"程序部署路径", max_length=255, null=True, blank=True)
    configPath = models.CharField(u"配置文件路径", max_length=255, null=True, blank=True)
    product = models.ForeignKey(
            Product,
            null=True,
            blank=True,
            on_delete=models.SET_NULL,
            verbose_name=u"所属产品线"
    )
    owner = models.ForeignKey(
            AppOwner,
            null=True,
            blank=True,
            on_delete=models.SET_NULL,
            verbose_name=u"项目负责人"
    )
    serverList = models.ManyToManyField(

# 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

        ("svn", "svn"),
        ("git", "git"),
        ("file", "file"),
    )

    name = models.CharField(u"项目名称", max_length=50, unique=True, null=False, blank=False)
    description = models.CharField(u"项目描述", max_length=255, null=True, blank=True)
    language_type = models.CharField(u"语言类型", choices=LANGUAGE_TYPES, max_length=30, null=True, blank=True)
    app_type = models.CharField(u"程序类型", choices=APP_TYPE, max_length=30, null=True, blank=True)
    server_type = models.CharField(u"服务器类型", choices=SERVER_TYPE, max_length=30, null=True, blank=True)
    app_arch = models.CharField(u"程序框架", choices=APP_ARCH, max_length=30, null=True, blank=True)
    source_type = models.CharField(max_length=255, choices=SOURCE_TYPE, verbose_name=u"源类型", blank=True)
    source_address = models.CharField(max_length=255, verbose_name=u"源地址", null=True, blank=True)
    appPath = models.CharField(u"程序部署路径", max_length=255, null=True, blank=True)
    configPath = models.CharField(u"配置文件路径", max_length=255, null=True, blank=True)
    product = models.ForeignKey(
            Product,
            null=True,
            blank=True,
            on_delete=models.SET_NULL,
            verbose_name=u"所属产品线"
    )
    owner = models.ForeignKey(
            AppOwner,
            null=True,
            blank=True,
            on_delete=models.SET_NULL,
            verbose_name=u"项目负责人"
    )
    serverList = models.ManyToManyField(

            Host,