37010-vm/core/models.py
Flatlogic Bot ac6e16f3bd ai agent
2025-12-17 05:03:15 +00:00

15 lines
539 B
Python

from django.db import models
from django.contrib.auth.models import User
# Create your models here.
class Agent(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE, null=True, blank=True) # Allow null user for now
name = models.CharField(max_length=255)
description = models.TextField(blank=True)
published = models.BooleanField(default=False)
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
def __str__(self):
return self.name