Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Codecrew
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
30
Merge Requests
2
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 00b9aeba
authored
Jan 10, 2015
by
Tuomas Riihimäki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add 'enteredEventAdmin' to GroupMembership
1 parent
eed117f3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
code/moya-beans/ejbModule/fi/codecrew/moya/beans/BootstrapBean.java
code/moya-database/src/main/java/fi/codecrew/moya/model/GroupMembership.java
code/moya-beans/ejbModule/fi/codecrew/moya/beans/BootstrapBean.java
View file @
00b9aeb
...
@@ -241,6 +241,12 @@ public class BootstrapBean implements BootstrapBeanLocal {
...
@@ -241,6 +241,12 @@ public class BootstrapBean implements BootstrapBeanLocal {
"ALTER TABLE maps ADD COLUMN mime_type TEXT default 'image/png'"
,
"ALTER TABLE maps ADD COLUMN mime_type TEXT default 'image/png'"
,
});
});
dbUpdates
.
add
(
new
String
[]
{
"ALTER TABLE group_memberships ADD COLUMN entered_event_admin_id INTEGER"
,
"ALTER TABLE group_memberships ADD CONSTRAINT FK_group_memberships_entered_event_admin_id FOREIGN KEY (entered_event_admin_id) REFERENCES event_users (id)"
,
});
}
}
public
BootstrapBean
()
{
public
BootstrapBean
()
{
...
...
code/moya-database/src/main/java/fi/codecrew/moya/model/GroupMembership.java
View file @
00b9aeb
...
@@ -79,10 +79,22 @@ public class GroupMembership extends GenericEntity {
...
@@ -79,10 +79,22 @@ public class GroupMembership extends GenericEntity {
@ManyToOne
@ManyToOne
private
EventUser
user
;
private
EventUser
user
;
/**
* When user has redeemed ticket at the door
*/
@Column
(
name
=
"entered_event"
)
@Column
(
name
=
"entered_event"
)
@Temporal
(
TemporalType
.
TIMESTAMP
)
@Temporal
(
TemporalType
.
TIMESTAMP
)
private
Calendar
enteredEvent
;
private
Calendar
enteredEvent
;
/**
* User who has given the entrance to the event (ie who has set the
* enteredEvent field to not null)
*
*/
@ManyToOne
()
@JoinColumn
(
name
=
"entered_event_admin_id"
)
private
EventUser
enteredEventAdmin
;
public
GroupMembership
()
{
public
GroupMembership
()
{
}
}
...
@@ -125,9 +137,9 @@ public class GroupMembership extends GenericEntity {
...
@@ -125,9 +137,9 @@ public class GroupMembership extends GenericEntity {
this
.
placeGroup
=
groupsId
;
this
.
placeGroup
=
groupsId
;
}
}
/**
/**
* When user has selected place from map, it will be put on this.
* When user has selected place from map, it will be put on this.
*
* @return
* @return
*/
*/
public
Place
getPlaceReservation
()
{
public
Place
getPlaceReservation
()
{
...
@@ -169,10 +181,10 @@ public class GroupMembership extends GenericEntity {
...
@@ -169,10 +181,10 @@ public class GroupMembership extends GenericEntity {
return
inviteToken
;
return
inviteToken
;
}
}
/**
/**
*
*
* PlaceProduct is part of membership BEFORE user has selected place.
* PlaceProduct is part of membership BEFORE user has selected place.
*
* @return
* @return
*/
*/
public
Product
getPlaceProduct
()
{
public
Product
getPlaceProduct
()
{
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment