mirror of
https://github.com/valitydev/org-manager.git
synced 2024-11-06 00:15:23 +00:00
let's make party != owner (#43)
Co-authored-by: ggmaleva <ggmaleva@yandex.ru>
This commit is contained in:
parent
0dbc9bc294
commit
e4979f66c1
@ -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)
|
||||
// TODO [ggmaleva]: replace on unique id after introduce separate token generator
|
||||
.party(ownerId)
|
||||
.party(partyId)
|
||||
.metadata(jsonMapper.toJson(organization.getMetadata()))
|
||||
.build();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user