mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-21 20:25:45 +08:00
add: team unit add type wiki
This commit is contained in:
@@ -31,7 +31,7 @@ class Team < ApplicationRecord
|
||||
|
||||
validates :name, uniqueness: {scope: :organization_id}
|
||||
|
||||
enum authorize: {common: 0, read: 1, write: 2, admin: 3, owner: 4}
|
||||
enum authorize: {read: 1, write: 2, admin: 3, owner: 4}
|
||||
|
||||
def self.build(organization_id, name, nickname, description, authorize, includes_all_project, can_create_org_project)
|
||||
self.create!(organization_id: organization_id,
|
||||
|
||||
@@ -20,7 +20,7 @@ class TeamUnit < ApplicationRecord
|
||||
belongs_to :organization
|
||||
belongs_to :team
|
||||
|
||||
enum unit_type: {code: 1, issues: 2, pulls: 3, releases: 4}
|
||||
enum unit_type: {code: 1, issues: 2, pulls: 3, wiki: 4, releases: 5}
|
||||
|
||||
validates :unit_type, uniqueness: { scope: [:organization_id, :team_id]}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user