fix: VisitSession 时间戳恢复 NOT NULL,测试补显式时间(修正计划的测试笔误)

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
浅念
2026-09-15 11:46:51 +08:00
parent 79f2a89e0a
commit 462852c3f3
3 changed files with 7 additions and 7 deletions
+2 -3
View File
@@ -56,9 +56,8 @@ class VisitSession(models.Model):
site = models.ForeignKey(Site, on_delete=models.CASCADE, related_name="sessions")
visitor = models.ForeignKey(Visitor, on_delete=models.CASCADE, related_name="sessions")
session_id = models.CharField(max_length=64)
# null=True:会话可先建行后回填时间(ended_at 为空表示会话进行中)
started_at = models.DateTimeField(null=True, blank=True)
ended_at = models.DateTimeField(null=True, blank=True)
started_at = models.DateTimeField()
ended_at = models.DateTimeField()
referrer_domain = models.CharField(max_length=200, blank=True, default="")
utm = models.JSONField(default=dict, blank=True)
landing_path = models.CharField(max_length=500, blank=True, default="")