Skip to content

Commit

Permalink
refactor(contest):change id to uuid and change use
Browse files Browse the repository at this point in the history
r to users
  • Loading branch information
zou-y-t committed Mar 7, 2024
1 parent b7dce50 commit e510d0d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 85 deletions.
87 changes: 3 additions & 84 deletions src/generated/graphql.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4991,34 +4991,6 @@ export type Mutation_RootInsert_Honor_Type_OneArgs = {
};


/** mutation root */
export type Mutation_RootInsert_Honor_TimeArgs = {
objects: Array<Honor_Time_Insert_Input>;
on_conflict?: InputMaybe<Honor_Time_On_Conflict>;
};


/** mutation root */
export type Mutation_RootInsert_Honor_Time_OneArgs = {
object: Honor_Time_Insert_Input;
on_conflict?: InputMaybe<Honor_Time_On_Conflict>;
};


/** mutation root */
export type Mutation_RootInsert_Honor_TypeArgs = {
objects: Array<Honor_Type_Insert_Input>;
on_conflict?: InputMaybe<Honor_Type_On_Conflict>;
};


/** mutation root */
export type Mutation_RootInsert_Honor_Type_OneArgs = {
object: Honor_Type_Insert_Input;
on_conflict?: InputMaybe<Honor_Type_On_Conflict>;
};


/** mutation root */
export type Mutation_RootInsert_Info_NoticeArgs = {
objects: Array<Info_Notice_Insert_Input>;
Expand Down Expand Up @@ -7511,52 +7483,6 @@ export type Query_RootHonor_Type_By_PkArgs = {
};


export type Query_RootHonor_TimeArgs = {
distinct_on?: InputMaybe<Array<Honor_Time_Select_Column>>;
limit?: InputMaybe<Scalars['Int']['input']>;
offset?: InputMaybe<Scalars['Int']['input']>;
order_by?: InputMaybe<Array<Honor_Time_Order_By>>;
where?: InputMaybe<Honor_Time_Bool_Exp>;
};


export type Query_RootHonor_Time_AggregateArgs = {
distinct_on?: InputMaybe<Array<Honor_Time_Select_Column>>;
limit?: InputMaybe<Scalars['Int']['input']>;
offset?: InputMaybe<Scalars['Int']['input']>;
order_by?: InputMaybe<Array<Honor_Time_Order_By>>;
where?: InputMaybe<Honor_Time_Bool_Exp>;
};


export type Query_RootHonor_Time_By_PkArgs = {
activateIn: Scalars['Int']['input'];
};


export type Query_RootHonor_TypeArgs = {
distinct_on?: InputMaybe<Array<Honor_Type_Select_Column>>;
limit?: InputMaybe<Scalars['Int']['input']>;
offset?: InputMaybe<Scalars['Int']['input']>;
order_by?: InputMaybe<Array<Honor_Type_Order_By>>;
where?: InputMaybe<Honor_Type_Bool_Exp>;
};


export type Query_RootHonor_Type_AggregateArgs = {
distinct_on?: InputMaybe<Array<Honor_Type_Select_Column>>;
limit?: InputMaybe<Scalars['Int']['input']>;
offset?: InputMaybe<Scalars['Int']['input']>;
order_by?: InputMaybe<Array<Honor_Type_Order_By>>;
where?: InputMaybe<Honor_Type_Bool_Exp>;
};


export type Query_RootHonor_Type_By_PkArgs = {
type_name: Scalars['String']['input'];
};


export type Query_RootInfo_NoticeArgs = {
distinct_on?: InputMaybe<Array<Info_Notice_Select_Column>>;
limit?: InputMaybe<Scalars['Int']['input']>;
Expand Down Expand Up @@ -9850,7 +9776,7 @@ export type User_Pk_Columns_Input = {
/** select columns of table "user" */
export enum User_Select_Column {
/** column name */
Id = '_id',
_Id = '_id',
/** column name */
Class = 'class',
/** column name */
Expand Down Expand Up @@ -9912,7 +9838,7 @@ export type User_Sum_Fields = {
/** update columns of table "user" */
export enum User_Update_Column {
/** column name */
Id = '_id',
_Id = '_id',
/** column name */
Class = 'class',
/** column name */
Expand Down Expand Up @@ -10945,7 +10871,6 @@ export type GetApprovedMentorApplicationsQueryVariables = Exact<{
}>;



export type GetApprovedMentorApplicationsQuery = { __typename?: 'query_root', mentor_application: Array<{ __typename?: 'mentor_application', id: any, statement: string, status: string, created_at: any, updated_at: any, student_byuuid?: { __typename?: 'users', uuid: any, realname?: string | null } | null, mentor_byuuid?: { __typename?: 'users', uuid: any, realname?: string | null } | null }> };

export type SubscribeToMessagesSubscriptionVariables = Exact<{
Expand Down Expand Up @@ -11022,13 +10947,11 @@ export type GetMentorApplicationsQueryVariables = Exact<{

export type GetMentorApplicationsQuery = { __typename?: 'query_root', mentor_application: Array<{ __typename?: 'mentor_application', id: any, statement: string, status: string, chat_status: boolean, created_at: any, updated_at: any, student_byuuid?: { __typename?: 'users', realname?: string | null, department?: string | null, email: string, phone?: string | null } | null, mentor_byuuid?: { __typename?: 'users', realname?: string | null, department?: string | null, mentor_available?: { __typename?: 'mentor_available', available: boolean } | null } | null }> };


export type GetMentorApplicationsForCounselorsQueryVariables = Exact<{ [key: string]: never; }>;


export type GetMentorApplicationsForCounselorsQuery = { __typename?: 'query_root', mentor_application: Array<{ __typename?: 'mentor_application', id: any, statement: string, status: string, created_at: any, updated_at: any, student_byuuid?: { __typename?: 'users', uuid: any, realname?: string | null, class?: string | null, department?: string | null, email: string, phone?: string | null } | null, mentor_byuuid?: { __typename?: 'users', realname?: string | null, department?: string | null, mentor_available?: { __typename?: 'mentor_available', available: boolean } | null } | null }> };


export type GetMentorAvailableQueryVariables = Exact<{
uuid: Scalars['uuid']['input'];
}>;
Expand All @@ -11044,7 +10967,6 @@ export type ChangeMentorAvailableMutationVariables = Exact<{

export type ChangeMentorAvailableMutation = { __typename?: 'mutation_root', insert_mentor_available_one?: { __typename?: 'mentor_available', mentor_uuid: any, available: boolean } | null };


export type UpdateMentorApplicationStatusMutationVariables = Exact<{
id: Scalars['uuid']['input'];
status: Scalars['String']['input'];
Expand Down Expand Up @@ -11103,21 +11025,18 @@ export type UpsertMentorInfoMutationVariables = Exact<{

export type UpsertMentorInfoMutation = { __typename?: 'mutation_root', insert_mentor_info_one?: { __typename?: 'mentor_info', mentor_uuid: any } | null };


export type GetMentorInfoQueryVariables = Exact<{
mentor_uuid: Scalars['uuid']['input'];
}>;


export type GetMentorInfoQuery = { __typename?: 'query_root', mentor_info_by_pk?: { __typename?: 'mentor_info', achievement?: string | null, background?: string | null, field?: string | null, intro?: string | null, mentor_uuid: any, userByMentorUuid: { __typename?: 'users', realname?: string | null, email: string } } | null };


export type GetFreshmanListQueryVariables = Exact<{ [key: string]: never; }>;


export type GetFreshmanListQuery = { __typename?: 'query_root', users: Array<{ __typename?: 'users', uuid: any, student_no?: string | null, mentor_application_as_student: Array<{ __typename?: 'mentor_application', student_uuid?: any | null, mentor_uuid?: any | null, statement: string }> }> };


export type GetIdByNameQueryVariables = Exact<{
name: Scalars['String']['input'];
}>;
Expand Down Expand Up @@ -15850,4 +15769,4 @@ export function useUpdateProfileMutation(baseOptions?: Apollo.MutationHookOption
}
export type UpdateProfileMutationHookResult = ReturnType<typeof useUpdateProfileMutation>;
export type UpdateProfileMutationResult = Apollo.MutationResult<UpdateProfileMutation>;
export type UpdateProfileMutationOptions = Apollo.BaseMutationOptions<UpdateProfileMutation, UpdateProfileMutationVariables>;
export type UpdateProfileMutationOptions = Apollo.BaseMutationOptions<UpdateProfileMutation, UpdateProfileMutationVariables>;
2 changes: 1 addition & 1 deletion src/graphql/contest/contest.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ query IsTeamMember($user_uuid: uuid!, $contest_id: uuid!) {
where: {
user_uuid: { _eq: $user_uuid }
_and: {
team_as_contest_team_member: { contest_id: { _eq: $contest_uuid } }
team_as_contest_team_member: { contest_id: { _eq: $contest_id } }
}
}
) {
Expand Down

0 comments on commit e510d0d

Please sign in to comment.