seperated backend and frontend

This commit is contained in:
2025-11-14 19:10:12 +03:00
parent 45f6b7a1ef
commit 42983eab65
150 changed files with 26903 additions and 9078 deletions

View File

@@ -0,0 +1,49 @@
import { gql } from "graphql-tag";
export const personTypeDefs = gql`
scalar Date
type Person {
_id: ID!
firstName: String!
surname: String!
middleName: String!
sexCode: String!
personRef: String!
personTag: String!
fatherName: String!
motherName: String!
countryCode: String!
nationalIdentityId: String!
birthPlace: String!
birthDate: Date!
taxNo: String!
birthname: String!
}
input CreatePersonInput {
firstName: String!
surname: String!
middleName: String!
sexCode: String!
personRef: String!
personTag: String!
fatherName: String!
motherName: String!
countryCode: String!
nationalIdentityId: String!
birthPlace: String!
birthDate: Date!
taxNo: String!
birthname: String!
}
type Query {
persons: [Person!]!
person(id: ID!): Person
}
type Mutation {
createPerson(input: CreatePersonInput!): Person!
}
`;

View File

@@ -0,0 +1,75 @@
import { gql } from "graphql-tag";
export const userTypeDefs = gql`
"""Represents a single token entry with a prefix and value"""
type CollectionTokenItem {
prefix: String!
token: String!
}
"""Represents the collection of tokens assigned to a user"""
type CollectionToken {
tokens: [CollectionTokenItem!]!
default: String!
}
type Person {
_id: ID!
firstName: String!
surname: String!
middleName: String!
}
"""User model with references and metadata"""
type User {
_id: ID
uuid: String!
expiresAt: String
resetToken: String
password: String!
history: [String!]
tag: String!
email: String!
phone: String!
collectionTokens: CollectionToken!
person: Person!
type: ID
createdAt: String
updatedAt: String
}
"""Input type for a single token entry"""
input CollectionTokenItemInput {
prefix: String!
token: String!
}
"""Input type for a user's token collection"""
input CollectionTokenInput {
tokens: [CollectionTokenItemInput!]!
default: String!
}
"""Input for creating a new user"""
input CreateUserInput {
password: String!
history: [String!]
tag: String!
email: String!
phone: String!
collectionTokens: CollectionTokenInput!
person: ID!
type: ID
}
"""Queries"""
type Query {
users: [User!]!
user(id: ID!): User
}
"""Mutations"""
type Mutation {
createUser(input: CreateUserInput!): User!
}
`;