mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-13 00:06:01 +08:00
[ADD]组织模块相关代码
This commit is contained in:
11
db/migrate/20210111065934_create_organization_users.rb
Normal file
11
db/migrate/20210111065934_create_organization_users.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
class CreateOrganizationUsers < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :organization_users do |t|
|
||||
t.references :user
|
||||
t.references :organization
|
||||
t.boolean :is_creator, comment: "是否为创建者", default: false
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
15
db/migrate/20210111065954_create_organization_extensions.rb
Normal file
15
db/migrate/20210111065954_create_organization_extensions.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
class CreateOrganizationExtensions < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :organization_extensions do |t|
|
||||
t.references :organization
|
||||
t.string :description, comment: "组织描述"
|
||||
t.string :website, comment: "组织官方网站"
|
||||
t.string :location, comment: "组织地区"
|
||||
t.boolean :repo_admin_change_team_access, comment: "项目管理员是否可以添加或移除团队的访问权限", default: false
|
||||
t.integer :visibility, comment: "组织可见性", default: 0
|
||||
t.integer :max_repo_creation, comment: "组织最大仓库数", default: -1
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
17
db/migrate/20210111093008_create_teams.rb
Normal file
17
db/migrate/20210111093008_create_teams.rb
Normal file
@@ -0,0 +1,17 @@
|
||||
class CreateTeams < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :teams do |t|
|
||||
t.references :organization
|
||||
t.string :name, comment: "团队名称"
|
||||
t.string :description, comment: "团队描述"
|
||||
t.integer :authorize, comment: "团队权限", default: 0
|
||||
t.integer :num_projects, comment: "团队项目数量", default: 0
|
||||
t.integer :num_users, comment: "团队成员数量", default: 0
|
||||
t.boolean :includes_all_project, comment: "团队是否拥有所有项目", default: false
|
||||
t.boolean :can_create_org_project, comment: "团队是否能创建项目", default: false
|
||||
t.integer :gtid, comment: "团队在gitea里的id"
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
11
db/migrate/20210111093016_create_team_projects.rb
Normal file
11
db/migrate/20210111093016_create_team_projects.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
class CreateTeamProjects < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :team_projects do |t|
|
||||
t.references :organization
|
||||
t.references :project
|
||||
t.references :team
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
10
db/migrate/20210111093024_create_team_users.rb
Normal file
10
db/migrate/20210111093024_create_team_users.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
class CreateTeamUsers < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :team_users do |t|
|
||||
t.references :organization
|
||||
t.references :team
|
||||
t.references :user
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
11
db/migrate/20210111093200_create_team_units.rb
Normal file
11
db/migrate/20210111093200_create_team_units.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
class CreateTeamUnits < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :team_units do |t|
|
||||
t.references :organization
|
||||
t.references :team
|
||||
t.integer :unit_type, comment: "访问单元类型"
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user