Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

哈哈哈 (Amplication build j0zqazd4) #17

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .amplication/ignored/server/.env
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ DB_URL=postgres://admin:admin@localhost:5432/my-db
DB_USER=admin
DB_PASSWORD=admin
DB_PORT=5432
DB_NAME=my-db
JWT_SECRET_KEY=Change_ME!!!
JWT_EXPIRATION=2d
2 changes: 2 additions & 0 deletions admin-ui/src/api/user/User.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ export type User = {
lastName: string | null;
username: string;
roles: JsonValue;
age: string | null;
course: string | null;
};
2 changes: 2 additions & 0 deletions admin-ui/src/api/user/UserCreateInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ export type UserCreateInput = {
username: string;
password: string;
roles: InputJsonValue;
age?: string | null;
course?: string | null;
};
2 changes: 2 additions & 0 deletions admin-ui/src/api/user/UserOrderByInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ export type UserOrderByInput = {
username?: SortOrder;
password?: SortOrder;
roles?: SortOrder;
age?: SortOrder;
course?: SortOrder;
};
2 changes: 2 additions & 0 deletions admin-ui/src/api/user/UserUpdateInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ export type UserUpdateInput = {
username?: string;
password?: string;
roles?: InputJsonValue;
age?: string | null;
course?: string | null;
};
2 changes: 2 additions & 0 deletions admin-ui/src/api/user/UserWhereInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ export type UserWhereInput = {
firstName?: StringNullableFilter;
lastName?: StringNullableFilter;
username?: StringFilter;
age?: StringNullableFilter;
course?: StringNullableFilter;
};
2 changes: 2 additions & 0 deletions admin-ui/src/user/UserCreate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ export const UserCreate = (props: CreateProps): React.ReactElement => {
optionText="label"
optionValue="value"
/>
<TextInput label="age" source="age" />
<TextInput label="course" source="course" />
</SimpleForm>
</Create>
);
Expand Down
2 changes: 2 additions & 0 deletions admin-ui/src/user/UserEdit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ export const UserEdit = (props: EditProps): React.ReactElement => {
optionText="label"
optionValue="value"
/>
<TextInput label="age" source="age" />
<TextInput label="course" source="course" />
</SimpleForm>
</Edit>
);
Expand Down
2 changes: 2 additions & 0 deletions admin-ui/src/user/UserList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export const UserList = (props: ListProps): React.ReactElement => {
<TextField label="Last Name" source="lastName" />
<TextField label="Username" source="username" />
<TextField label="Roles" source="roles" />
<TextField label="age" source="age" />
<TextField label="course" source="course" />
</Datagrid>
</List>
);
Expand Down
2 changes: 2 additions & 0 deletions admin-ui/src/user/UserShow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ export const UserShow = (props: ShowProps): React.ReactElement => {
<TextField label="Last Name" source="lastName" />
<TextField label="Username" source="username" />
<TextField label="Roles" source="roles" />
<TextField label="age" source="age" />
<TextField label="course" source="course" />
</SimpleShowLayout>
</Show>
);
Expand Down
73 changes: 0 additions & 73 deletions server/package.json

This file was deleted.

2 changes: 2 additions & 0 deletions server/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ model User {
username String @unique
password String
roles Json
age String?
course String?
}
49 changes: 0 additions & 49 deletions server/scripts/seed.ts

This file was deleted.

53 changes: 0 additions & 53 deletions server/src/app.module.ts

This file was deleted.

2 changes: 1 addition & 1 deletion server/src/swagger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const swaggerDocumentOptions = new DocumentBuilder()
.setDescription(
'\n\n## Congratulations! Your service resource is ready.\n \nPlease note that all endpoints are secured with JWT Bearer authentication.\nBy default, your service resource comes with one user with the username "admin" and password "admin".\nLearn more in [our docs](https://docs.amplication.com)'
)
.setVersion("1104a18s")
.setVersion("cl1rt26k")
.addBearerAuth()
.build();

Expand Down
22 changes: 22 additions & 0 deletions server/src/user/base/User.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,28 @@ class User {
@IsJSON()
@Field(() => GraphQLJSON)
roles!: JsonValue;

@ApiProperty({
required: false,
type: String,
})
@IsString()
@IsOptional()
@Field(() => String, {
nullable: true,
})
age!: string | null;

@ApiProperty({
required: false,
type: String,
})
@IsString()
@IsOptional()
@Field(() => String, {
nullable: true,
})
course!: string | null;
}

export { User as User };
22 changes: 22 additions & 0 deletions server/src/user/base/UserCreateInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,28 @@ class UserCreateInput {
@IsJSON()
@Field(() => GraphQLJSON)
roles!: InputJsonValue;

@ApiProperty({
required: false,
type: String,
})
@IsString()
@IsOptional()
@Field(() => String, {
nullable: true,
})
age?: string | null;

@ApiProperty({
required: false,
type: String,
})
@IsString()
@IsOptional()
@Field(() => String, {
nullable: true,
})
course?: string | null;
}

export { UserCreateInput as UserCreateInput };
18 changes: 18 additions & 0 deletions server/src/user/base/UserOrderByInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,24 @@ class UserOrderByInput {
nullable: true,
})
roles?: SortOrder;

@ApiProperty({
required: false,
enum: ["asc", "desc"],
})
@Field(() => SortOrder, {
nullable: true,
})
age?: SortOrder;

@ApiProperty({
required: false,
enum: ["asc", "desc"],
})
@Field(() => SortOrder, {
nullable: true,
})
course?: SortOrder;
}

export { UserOrderByInput as UserOrderByInput };
22 changes: 22 additions & 0 deletions server/src/user/base/UserUpdateInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,28 @@ class UserUpdateInput {
nullable: true,
})
roles?: InputJsonValue;

@ApiProperty({
required: false,
type: String,
})
@IsString()
@IsOptional()
@Field(() => String, {
nullable: true,
})
age?: string | null;

@ApiProperty({
required: false,
type: String,
})
@IsString()
@IsOptional()
@Field(() => String, {
nullable: true,
})
course?: string | null;
}

export { UserUpdateInput as UserUpdateInput };
Loading