Django backend for WorkX project
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

models.py 447 B

123456789101112131415
  1. from django.contrib.auth.models import User
  2. from django.db import models
  3. from project.models import Project
  4. from client.models import Client
  5. class Representative(models.Model):
  6. user = models.ForeignKey(User)
  7. phone = models.CharField(max_length=15)
  8. role = models.CharField(max_length=15)
  9. projects = models.ManyToManyField(Project)
  10. clients = models.ManyToManyField(Client)
  11. def __str__(self):
  12. return self.user.name