Skip to content

Commit

Permalink
Add event field for sponsoring restriction
Browse files Browse the repository at this point in the history
Closes #207
  • Loading branch information
dominikglandorf authored and florianschmidt1994 committed Apr 2, 2018
1 parent 4bd100a commit 3411f2e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/backend/model/event/Event.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class Event : BasicEntity {
lateinit var city: String
var isCurrent: Boolean = false
var isOpenForRegistration: Boolean = false
var allowNewSponsoring: Boolean = false

@OneToMany(mappedBy = "event")
var teams: MutableList<Team> = ArrayList()
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/backend/model/event/TeamSummaryProjection.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@ interface TeamSummaryProjection {

@Value("#{target.event.title}")
fun getEventTitle(): String

@Value("#{target.event.allowNewSponsoring}")
fun getEventAllowNewSponsoring(): Boolean
}
2 changes: 2 additions & 0 deletions src/main/java/backend/view/EventView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class EventView() {
var isCurrent: Boolean = false

var isOpenForRegistration: Boolean = false
var allowNewSponsoring: Boolean = false

@NotNull
var duration: Int = 36
Expand All @@ -43,5 +44,6 @@ class EventView() {
this.duration = event.duration
this.isCurrent = event.isCurrent
this.isOpenForRegistration = event.isOpenForRegistration
this.allowNewSponsoring = event.allowNewSponsoring
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE event
ADD allow_new_sponsoring TINYINT(1) NOT NULL DEFAULT 0

0 comments on commit 3411f2e

Please sign in to comment.