from django.db import models


class APIDatabase(models.Model):
    """
    API数据库
    """
    api_database_title = models.CharField("API数据库名称", max_length=200, null=False)
    api_host = models.CharField("API_Host", max_length=200, null=False)
    api_port = models.CharField("端口号", max_length=200, null=False)
    user = models.CharField("用户名", max_length=200, null=False)
    password = models.CharField("密码", max_length=200, null=False)
    database = models.CharField("数据库表名", max_length=200, null=False)
    create_time = models.DateTimeField("创建时间", auto_now_add=True)
    updata_time = models.DateTimeField("更新时间", auto_now_add=True)

    def __str__(self):
        return self.api_database_title
