test_field_signature_mixin.py 文件源码

python
阅读 17 收藏 0 点赞 0 评论 0

项目:fleaker 作者: croscon 项目源码 文件源码
def folder_model(database):
    class Folder(FieldSignatureMixin, ArchivedMixin):
        # This class represents a Folder in a file system. Two Folders with
        # the same name cannot exist in the same Folder. If the Folder has
        # no Parent Folder, it exists in the top level of the file system.
        name = peewee.CharField(max_length=255, null=False)
        parent_folder = peewee.ForeignKeyField('self', null=True)

        class Meta:
            signature_fields = ('name', 'parent_folder')

    Folder._meta.database = database.database
    Folder.create_table(True)

    return Folder
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号