let's make party = owner (#40)

Co-authored-by: ggmaleva <ggmaleva@yandex.ru>
This commit is contained in:
Gregory 2022-09-16 16:21:27 +03:00 committed by GitHub
parent d18e24fc78
commit 982428de58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,13 +19,13 @@ public class OrganizationConverter {
public OrganizationEntity toEntity(Organization organization, String ownerId) {
String orgId = UUID.randomUUID().toString();
String partyId = UUID.randomUUID().toString();
return OrganizationEntity.builder()
.id(orgId)
.createdAt(LocalDateTime.now())
.name(organization.getName())
.owner(ownerId)
.party(partyId)
// TODO [ggmaleva]: replace on unique id after introduce separate token generator
.party(ownerId)
.metadata(jsonMapper.toJson(organization.getMetadata()))
.build();
}