mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-12 13:24:52 +00:00
Add file shared link, and modify url viewing file
This commit is contained in:
@@ -1,8 +1,21 @@
|
||||
import datetime
|
||||
from django.db import models
|
||||
|
||||
class AnonymousShare(models.Model):
|
||||
"""
|
||||
Model used for sharing repo to unregistered email.
|
||||
"""
|
||||
repo_owner = models.EmailField(max_length=255)
|
||||
repo_id = models.CharField(max_length=36)
|
||||
anonymous_email = models.EmailField(max_length=255)
|
||||
token = models.CharField(max_length=25, unique=True)
|
||||
|
||||
|
||||
class FileShare(models.Model):
|
||||
"""
|
||||
Model used for file share link.
|
||||
"""
|
||||
username = models.EmailField(max_length=255)
|
||||
repo_id = models.CharField(max_length=36, db_index=True)
|
||||
path = models.TextField()
|
||||
token = models.CharField(max_length=10, unique=True)
|
||||
ctime = models.DateTimeField(default=datetime.datetime.now)
|
||||
|
Reference in New Issue
Block a user