Skip to content

Commit

Permalink
feat: add 4 new schemas (#16)
Browse files Browse the repository at this point in the history
Co-authored-by: Shardendu Mishra <shardendumishrabrave@gmail.com>
  • Loading branch information
Vishesh-Dwivedi-Git and MishraShardendu22 authored Jan 26, 2025
1 parent cfdfea2 commit 7a9db08
Show file tree
Hide file tree
Showing 5 changed files with 193 additions and 0 deletions.
47 changes: 47 additions & 0 deletions src/sanity/schemaTypes/Finance.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import { defineField, defineType } from 'sanity';

export const Finance = defineType({
title: 'finance',
name: 'Finance',
type: 'document',
fields: [
defineField({
name: 'title',
title: 'Group Title',
type: 'string',
description:
'Title of the profile group, e.g., "Members" or "Special Invitee".',
}),
defineField({
name: 'profiles',
title: 'Profiles',
type: 'array',
of: [
{
type: 'object',
fields: [
defineField({
name: 'content',
title: 'Content',
type: 'array',
of: [{ type: 'string' }],
description: 'Roles or descriptions for the profile.',
}),
defineField({
name: 'imageURL',
title: 'Image URL',
type: 'string',
description: 'URL of the profile image (can be empty).',
}),
defineField({
name: 'title',
title: 'Profile Name',
type: 'string',
description: 'Name of the person.',
}),
],
},
],
}),
],
});
46 changes: 46 additions & 0 deletions src/sanity/schemaTypes/building_and_works.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import { defineField, defineType } from 'sanity';

export const building_and_works = defineType({
title: 'Building and Works',
name: 'buildingAndWorks',
type: 'document',
fields: [
defineField({
name: 'title',
title: 'Title',
type: 'string',
description: 'Group title (optional)',
}),
defineField({
name: 'profiles',
title: 'Profiles',
type: 'array',
of: [
{
type: 'object',
fields: [
defineField({
name: 'content',
title: 'Content',
type: 'array',
of: [{ type: 'string' }],
description: 'Roles or descriptions for the profile',
}),
defineField({
name: 'imageURL',
title: 'Image URL',
type: 'url',
description: 'Profile image URL (optional)',
}),
defineField({
name: 'title',
title: 'Profile Name',
type: 'string',
description: 'Name of the person',
}),
],
},
],
}),
],
});
46 changes: 46 additions & 0 deletions src/sanity/schemaTypes/cgc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import { defineField, defineType } from 'sanity';

export const cgc = defineType({
title: 'cgc',
name: 'Cgc',
type: 'document',
fields: [
defineField({
name: 'title',
title: 'Title',
type: 'string',
description: 'Group title (can be empty)',
}),
defineField({
name: 'profiles',
title: 'Profiles',
type: 'array',
of: [
{
type: 'object',
fields: [
defineField({
name: 'content',
title: 'Content',
type: 'array',
of: [{ type: 'string' }],
description: 'Roles or descriptions for the profile',
}),
defineField({
name: 'imageURL',
title: 'Image URL',
type: 'string',
description: 'URL of the profile image',
}),
defineField({
name: 'title',
title: 'Profile Name',
type: 'string',
description: 'Name of the person',
}),
],
},
],
}),
],
});
8 changes: 8 additions & 0 deletions src/sanity/schemaTypes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ import {
ContactData,
ContactInf,
} from './generalInfo/ContactInfo';
import { building_and_works } from './building_and_works';
import { cgc } from './cgc';
import { Finance } from './Finance';
import { student_coordinators } from './student_coordinators';

export const schema: { types: SchemaTypeDefinition[] } = {
types: [
Expand Down Expand Up @@ -82,5 +86,9 @@ export const schema: { types: SchemaTypeDefinition[] } = {
MainCarouselImage,
ProgramCards,
ProgramsType,
building_and_works,
cgc,
Finance,
student_coordinators,
],
};
46 changes: 46 additions & 0 deletions src/sanity/schemaTypes/student_coordinators.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import { defineField, defineType } from 'sanity';

export const student_coordinators = defineType({
title: 'student_coordinators',
name: 'student_Coordinators',
type: 'document',
fields: [
defineField({
name: 'title',
title: 'Title',
type: 'string',
description: 'Group title (can be empty)',
}),
defineField({
name: 'profiles',
title: 'Profiles',
type: 'array',
of: [
{
type: 'object',
fields: [
defineField({
name: 'content',
title: 'Content',
type: 'array',
of: [{ type: 'string' }],
description: 'Roles or descriptions for the profile',
}),
defineField({
name: 'imageURL',
title: 'Image URL',
type: 'string',
description: 'Profile image URL',
}),
defineField({
name: 'title',
title: 'Profile Name',
type: 'string',
description: 'Name of the person',
}),
],
},
],
}),
],
});

0 comments on commit 7a9db08

Please sign in to comment.