insert Member

@Modifying(clearAutomatically = true )
@Query(value = "INSERT IGNORE INTO " + GROUP_MEMBERS_TABLE + "( " + IDENTIFIER_KEY + "," + NAME_KEY + "," + EMAIL_KEY + "," + PROFILE_PIC_KEY + "," + SURNAME_KEY + "," + MEMBER_ROLE_KEY + "," + INVITATION_STATUS_KEY + "," + GROUP_MEMBER_KEY + ") VALUES " + "( " + ":" + IDENTIFIER_KEY + "," + ":" + NAME_KEY + "," + ":" + EMAIL_KEY + "," + ":" + PROFILE_PIC_KEY + "," + ":" + SURNAME_KEY + "," + ":#{#" + MEMBER_ROLE_KEY + ".name()}," + ":#{#" + INVITATION_STATUS_KEY + ".name()}," + ":" + GROUP_MEMBER_KEY + ")", nativeQuery = true )
abstract fun insertMember(@Param(value = "id") memberId: String, @Param(value = "name") name: String, @Param(value = "email") email: String, @Param(value = "profile_pic") profilePic: String, @Param(value = "surname") surname: String, @Param(value = "role") role: Role, @Param(value = "invitation_status") invitationStatus: InvitationStatus, @Param(value = "group_member") groupId: String)

Method to execute the query to add a member in a com.tecknobit.pandoro.services.groups.entity.Group

Parameters

memberId

: the identifier of the member to add

name

: the name of the member

email

: the email of the member

profilePic

: the profile pic of the member

surname

: the surname of the member

role

: the role of the member

invitationStatus

: the invitation status of the member

groupId

: the identifier of the group where add the member