from django.db import models

from account.models import User

# 群表
from folder.models import Folder


class Group(models.Model):
    # 群id
    group_id = models.AutoField(primary_key=True)
    # 群名
    group_name = models.CharField(max_length=50, blank=False)
    # 群管理员
    creator = models.CharField(max_length=50, blank=False)
    # 群文件夹
    folder = models.ForeignKey(Folder, on_delete=models.CASCADE, related_name='group_folder')
    # 群成员(多对多）
    member = models.ManyToManyField(User)

