Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

文件或文件夹分享至群组或用户 #71

Open
dongli opened this issue Nov 17, 2015 · 1 comment
Open

文件或文件夹分享至群组或用户 #71

dongli opened this issue Nov 17, 2015 · 1 comment

Comments

@dongli
Copy link
Collaborator

dongli commented Nov 17, 2015

中间表暂时命名为link

    create_table :links do |t|
      t.references :host,     polymorphic: true, null: false, index: true # 挂靠的对象(如群组、用户)
      t.references :user,                        null: false, index: true # 所属的用户
      t.references :linkable, polymorphic: true, null: false              # 被链接的对象
      t.belongs_to :folder,                      null: false              # 被链接到的文件夹
      t.string     :expired_at                                            # 过期时间
      t.string     :status                                                # 状态
      t.integer    :position                                              # 位置(预留字段)

      t.timestamps null: false
    end
@tianlu1677
Copy link
Owner

加个字段 叫描述,或者简介,可选

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants