butler_ddochi/butler/models.py
icurfer af57b56e69
All checks were successful
Build And Test / build-and-push (push) Successful in 4m23s
공지사항관리 기능 분리 및 개선
2025-01-25 18:02:49 +09:00

18 lines
822 B
Python

from django.db import models
from django.conf import settings
from django.urls import reverse
class IPManagementRecord(models.Model):
network_nm = models.CharField(max_length=100) # NETWORK_NM
ip_addrs = models.CharField(max_length=50) # IP_ADDRS
svr_nm = models.CharField(max_length=100) # SVR_NM
contents = models.TextField(blank=True, null=True) # DESC
remark = models.TextField(blank=True, null=True) # REMARK
created_at = models.DateTimeField(auto_now_add=True) # 생성 시간 자동 기록
updated_at = models.DateTimeField(auto_now=True) # 수정 시간 자동 기록
author = models.ForeignKey(settings.AUTH_USER_MODEL, null=True, on_delete=models.CASCADE)
def __str__(self):
return f'{self.network_nm} {self.ip_addrs} {self.svr_nm} {self.contents}'