1
0

accessrights.jdl: UserRoleAssignments entity*Id required

Merge branch 'jhipster-generated'
This commit is contained in:
Michael Hoennig
2019-05-07 13:08:26 +02:00
22 changed files with 97 additions and 59 deletions

View File

@ -25,10 +25,13 @@ public class UserRoleAssignment implements Serializable {
@SequenceGenerator(name = "sequenceGenerator")
private Long id;
@Column(name = "entity_type_id")
@NotNull
@Size(max = 32)
@Column(name = "entity_type_id", length = 32, nullable = false)
private String entityTypeId;
@Column(name = "entity_object_id")
@NotNull
@Column(name = "entity_object_id", nullable = false)
private Long entityObjectId;
@NotNull

View File

@ -12,8 +12,8 @@ enum UserRole {
}
entity UserRoleAssignment {
entityTypeId String,
entityObjectId Long,
entityTypeId String required maxlength(32),
entityObjectId Long required,
assignedRole UserRole required
}

View File

@ -14,7 +14,7 @@
<!--
Added the entity Customer.
-->
<changeSet id="20190430152136-1" author="jhipster">
<changeSet id="20190507105332-1" author="jhipster">
<createTable tableName="customer">
<column name="id" type="bigint" autoIncrement="${autoIncrement}">
<constraints primaryKey="true" nullable="false"/>

View File

@ -14,7 +14,7 @@
<!--
Added the entity Membership.
-->
<changeSet id="20190430152137-1" author="jhipster">
<changeSet id="20190507105333-1" author="jhipster">
<createTable tableName="membership">
<column name="id" type="bigint" autoIncrement="${autoIncrement}">
<constraints primaryKey="true" nullable="false"/>

View File

@ -6,7 +6,7 @@
<!--
Added the constraints for entity Membership.
-->
<changeSet id="20190430152137-2" author="jhipster">
<changeSet id="20190507105333-2" author="jhipster">
<addForeignKeyConstraint baseColumnNames="customer_id"
baseTableName="membership"

View File

@ -14,7 +14,7 @@
<!--
Added the entity Share.
-->
<changeSet id="20190430152138-1" author="jhipster">
<changeSet id="20190507105334-1" author="jhipster">
<createTable tableName="share">
<column name="id" type="bigint" autoIncrement="${autoIncrement}">
<constraints primaryKey="true" nullable="false"/>

View File

@ -6,7 +6,7 @@
<!--
Added the constraints for entity Share.
-->
<changeSet id="20190430152138-2" author="jhipster">
<changeSet id="20190507105334-2" author="jhipster">
<addForeignKeyConstraint baseColumnNames="membership_id"
baseTableName="share"

View File

@ -14,7 +14,7 @@
<!--
Added the entity Asset.
-->
<changeSet id="20190430152139-1" author="jhipster">
<changeSet id="20190507105335-1" author="jhipster">
<createTable tableName="asset">
<column name="id" type="bigint" autoIncrement="${autoIncrement}">
<constraints primaryKey="true" nullable="false"/>

View File

@ -6,7 +6,7 @@
<!--
Added the constraints for entity Asset.
-->
<changeSet id="20190430152139-2" author="jhipster">
<changeSet id="20190507105335-2" author="jhipster">
<addForeignKeyConstraint baseColumnNames="membership_id"
baseTableName="asset"

View File

@ -14,7 +14,7 @@
<!--
Added the entity SepaMandate.
-->
<changeSet id="20190430152140-1" author="jhipster">
<changeSet id="20190507105336-1" author="jhipster">
<createTable tableName="sepa_mandate">
<column name="id" type="bigint" autoIncrement="${autoIncrement}">
<constraints primaryKey="true" nullable="false"/>

View File

@ -6,7 +6,7 @@
<!--
Added the constraints for entity SepaMandate.
-->
<changeSet id="20190430152140-2" author="jhipster">
<changeSet id="20190507105336-2" author="jhipster">
<addForeignKeyConstraint baseColumnNames="customer_id"
baseTableName="sepa_mandate"

View File

@ -16,17 +16,17 @@
<!--
Added the entity UserRoleAssignment.
-->
<changeSet id="20190430154711-1" author="jhipster">
<changeSet id="20190507105342-1" author="jhipster">
<createTable tableName="user_role_assignment">
<column name="id" type="bigint" autoIncrement="${autoIncrement}">
<constraints primaryKey="true" nullable="false"/>
</column>
<column name="entity_type_id" type="varchar(255)">
<constraints nullable="true" />
<column name="entity_type_id" type="varchar(32)">
<constraints nullable="false" />
</column>
<column name="entity_object_id" type="bigint">
<constraints nullable="true" />
<constraints nullable="false" />
</column>
<column name="assigned_role" type="varchar(255)">

View File

@ -6,7 +6,7 @@
<!--
Added the constraints for entity UserRoleAssignment.
-->
<changeSet id="20190430154711-2" author="jhipster">
<changeSet id="20190507105342-2" author="jhipster">
<addForeignKeyConstraint baseColumnNames="user_id"
baseTableName="user_role_assignment"

View File

@ -12,12 +12,32 @@
<div class="form-group">
<label class="form-control-label" jhiTranslate="hsadminNgApp.userRoleAssignment.entityTypeId" for="field_entityTypeId">Entity Type Id</label>
<input type="text" class="form-control" name="entityTypeId" id="field_entityTypeId"
[(ngModel)]="userRoleAssignment.entityTypeId" />
[(ngModel)]="userRoleAssignment.entityTypeId" required maxlength="32"/>
<div [hidden]="!(editForm.controls.entityTypeId?.dirty && editForm.controls.entityTypeId?.invalid)">
<small class="form-text text-danger"
[hidden]="!editForm.controls.entityTypeId?.errors?.required" jhiTranslate="entity.validation.required">
This field is required.
</small>
<small class="form-text text-danger"
[hidden]="!editForm.controls.entityTypeId?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 32 }">
This field cannot be longer than 32 characters.
</small>
</div>
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="hsadminNgApp.userRoleAssignment.entityObjectId" for="field_entityObjectId">Entity Object Id</label>
<input type="number" class="form-control" name="entityObjectId" id="field_entityObjectId"
[(ngModel)]="userRoleAssignment.entityObjectId" />
[(ngModel)]="userRoleAssignment.entityObjectId" required/>
<div [hidden]="!(editForm.controls.entityObjectId?.dirty && editForm.controls.entityObjectId?.invalid)">
<small class="form-text text-danger"
[hidden]="!editForm.controls.entityObjectId?.errors?.required" jhiTranslate="entity.validation.required">
This field is required.
</small>
<small class="form-text text-danger"
[hidden]="!editForm.controls.entityObjectId?.errors?.number" jhiTranslate="entity.validation.number">
This field should be a number.
</small>
</div>
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="hsadminNgApp.userRoleAssignment.assignedRole" for="field_assignedRole">Assigned Role</label>