Skip to content

Commit

Permalink
add project members
Browse files Browse the repository at this point in the history
  • Loading branch information
nicokant committed Jul 3, 2024
1 parent c881a75 commit f3ba5be
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Generated by Django 5.0.6 on 2024-07-03 08:55

import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
(
"genlab_bestilling",
"0010_alter_analysisorder_markers_alter_order_sample_types_and_more",
),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]

operations = [
migrations.AddField(
model_name="project",
name="members",
field=models.ManyToManyField(
blank=True, related_name="projects_member", to=settings.AUTH_USER_MODEL
),
),
migrations.AddField(
model_name="project",
name="owner",
field=models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
related_name="projects_owned",
to=settings.AUTH_USER_MODEL,
),
),
]
10 changes: 10 additions & 0 deletions src/genlab_bestilling/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,16 @@ class Project(models.Model):
samples_owner = models.ForeignKey(
"Organization", on_delete=models.PROTECT, blank=True, null=True
)
owner = models.ForeignKey(
"users.User",
on_delete=models.SET_NULL,
null=True,
blank=True,
related_name="projects_owned",
)
members = models.ManyToManyField(
"users.User", blank=True, related_name="projects_member"
)
area = models.ForeignKey("Area", on_delete=models.PROTECT)
species = models.ManyToManyField("Species", blank=True, related_name="projects")
sample_types = models.ManyToManyField("SampleType", blank=True)
Expand Down

0 comments on commit f3ba5be

Please sign in to comment.