浏览代码

refactor documents model

blezz-tech 2 月之前
父节点
当前提交
d8f45f424d
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      models/documents.py

+ 2 - 2
models/documents.py

@@ -87,13 +87,13 @@ class Documents(models.Model):
     )
 
     # FK
-    company_id = models.ForeignKey(
+    company = models.ForeignKey(
         Company,
         on_delete=models.DO_NOTHING,
         null=True,
         help_text="идентификатор компании, к которой относится документ, если таковая есть (может не быть)"
     )
-    user_id = models.ForeignKey(
+    user = models.ForeignKey(
         get_user_model(),
         related_name="user_id_doc",
         on_delete=models.DO_NOTHING,