# -*- coding: utf-8 -*-
# @Time : 2022/5/24 21:12
# @Author : wangyinghao
# @Site : 
# @File : api_management.py
# @Software: PyCharm
from django.db import models
from django.utils import timezone
IS_ROOT = 0


class ApiManagement(models.Model):
    name = models.CharField('name', blank=False, default="", max_length=200)
    description = models.TextField('description', blank=True, default='')
    parent = models.IntegerField('父节点', blank=False, default=IS_ROOT)
    yapi_id = models.CharField("YAPIID", blank=True, max_length=2000, null=True)
    create_time = models.DateTimeField(auto_now_add=True, blank=True, null=True)
    update_time = models.DateTimeField(auto_now_add=True, blank=True, null=True)

    def __str__(self):
        return self.name
