long groupId;
@Column(name="serviceName")
String serviceName;
- @Column(name="methodName")
- String methodName;
+ @Column(name="methodIndex")
+ int methodIndex;
public GroupPermission() {
}
this.serviceName = serviceName;
}
- public String getMethodName() {
- return methodName;
+ public int getMethodIndex() {
+ return methodIndex;
}
- public void setMethodName(String methodName) {
- this.methodName = methodName;
+ public void setMethodIndex(int methodIndex) {
+ this.methodIndex = methodIndex;
}
-
-
}
/* Unique Ids sequence generator */
drop sequence SEQ_GEN_SEQUENCE;
-create sequence SEQ_GEN_SEQUENCE START WITH 100 INCREMENT BY 50;
+create sequence SEQ_GEN_SEQUENCE START WITH 1000 INCREMENT BY 50;
DROP TABLE IF EXISTS GROUP_ CASCADE;
id bigint NOT NULL PRIMARY KEY,
groupId bigint references GROUP_(id),
serviceName varchar(255) not null,
- methodName varchar(255) not null
+ methodIndex int not null
);
/* METADATA */
profile_id bigint REFERENCES profile (id)
);
--- The 50 first id are reserved for initial data
-INSERT INTO users (id,username,userpassword) VALUES (0,'admin','edf123');
+-- The 1000 first ids are reserved for initial data
+INSERT INTO users (id,username,userpassword) VALUES (1,'admin','edf123');
INSERT INTO group_ (id,groupname) VALUES (1,'admins');
-INSERT into usergroup(id,groupid,userid) VALUES (2,1,0);
-
+INSERT into usergroup(id,groupid,userid) VALUES (2,1,1);
+INSERT INTO grouppermissions (id,groupid,servicename,methodname) VALUES (3, 1, 'UserService','CREATEUSER');