-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
130 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* istanbul ignore file */ | ||
|
||
import { ApiProperty } from '@nestjs/swagger'; | ||
import { | ||
Asset, | ||
CustomPermissionGroup, | ||
KnownPermissionGroup, | ||
PermissionGroupType, | ||
} from '@polymeshassociation/polymesh-sdk/types'; | ||
|
||
import { FromEntity } from '~/common/decorators'; | ||
|
||
export class AssetWithGroupModel { | ||
@ApiProperty({ | ||
description: 'The Asset ID to which the Identity has permissions', | ||
example: '3616b82e-8e10-80ae-dc95-2ea28b9db8b3', | ||
}) | ||
@FromEntity() | ||
readonly asset: Asset; | ||
|
||
@ApiProperty({ | ||
description: 'The assigned group details', | ||
example: { | ||
type: PermissionGroupType.Full, | ||
assetId: '3616b82e-8e10-80ae-dc95-2ea28b9db8b3', | ||
ticker: 'SOME_TICKER', | ||
}, | ||
}) | ||
@FromEntity() | ||
readonly group: KnownPermissionGroup | CustomPermissionGroup; | ||
|
||
constructor(model: AssetWithGroupModel) { | ||
Object.assign(this, model); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters