mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-14 06:11:16 +00:00
Add contact and share app
This commit is contained in:
19
share/models.py
Normal file
19
share/models.py
Normal file
@@ -0,0 +1,19 @@
|
||||
from django.db import models
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
class UserShare(models.Model):
|
||||
"""Record a repo shared to a user."""
|
||||
|
||||
from_user = models.ForeignKey(User, related_name="myshare_items")
|
||||
to_user = models.ForeignKey(User, related_name="share2me_items")
|
||||
repo_id = models.CharField(max_length=36)
|
||||
|
||||
|
||||
class GroupShare(models.Model):
|
||||
"""A repo shared to a group."""
|
||||
|
||||
group_id = models.CharField(max_length=36)
|
||||
repo_id = models.CharField(max_length=36)
|
||||
|
||||
class Meta:
|
||||
unique_together = ("group_id", "repo_id")
|
Reference in New Issue
Block a user