Spaces:
Sleeping
Sleeping
change role id to string and set default value
Browse files
backend/src/entities/role.entity.ts
CHANGED
@@ -8,7 +8,7 @@ import{
|
|
8 |
@Entity('role')
|
9 |
export class RoleEntity extends BaseEntity{
|
10 |
@PrimaryGeneratedColumn('uuid')
|
11 |
-
id:
|
12 |
|
13 |
@Column({ nullable: false})
|
14 |
role_name: string;
|
|
|
8 |
@Entity('role')
|
9 |
export class RoleEntity extends BaseEntity{
|
10 |
@PrimaryGeneratedColumn('uuid')
|
11 |
+
id: string;
|
12 |
|
13 |
@Column({ nullable: false})
|
14 |
role_name: string;
|
backend/src/entities/user.entity.ts
CHANGED
@@ -34,9 +34,8 @@ export class UserEntity extends BaseEntity {
|
|
34 |
@Column({ nullable: true, unique: true })
|
35 |
email: string;
|
36 |
|
37 |
-
@
|
38 |
-
|
39 |
-
role_id: number;
|
40 |
|
41 |
@Column()
|
42 |
hash_password: string;
|
|
|
34 |
@Column({ nullable: true, unique: true })
|
35 |
email: string;
|
36 |
|
37 |
+
@Column({ default: 'f3750930-48ab-4c30-8681-d50e68e2bda7' })
|
38 |
+
role_id: string;
|
|
|
39 |
|
40 |
@Column()
|
41 |
hash_password: string;
|