mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
feat(backend): all db node properties (#8635)
Co-authored-by: Wolfgang Huß <wolle.huss@pjannto.com>
This commit is contained in:
parent
4eff0fb497
commit
f3788b84a5
11
backend/src/db/types/Category.ts
Normal file
11
backend/src/db/types/Category.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import { Integer, Node } from 'neo4j-driver'
|
||||
|
||||
export interface CategoryDbProperties {
|
||||
createdAt: string
|
||||
icon: string
|
||||
id: string
|
||||
name: string
|
||||
slug: string
|
||||
}
|
||||
|
||||
export type Category = Node<Integer, CategoryDbProperties>
|
||||
13
backend/src/db/types/Comment.ts
Normal file
13
backend/src/db/types/Comment.ts
Normal file
@ -0,0 +1,13 @@
|
||||
import { Integer, Node } from 'neo4j-driver'
|
||||
|
||||
export interface CommentDbProperties {
|
||||
content: string
|
||||
contentExcerpt: string
|
||||
createdAt: string
|
||||
deleted: boolean
|
||||
disabled: boolean
|
||||
id: string
|
||||
updatedAt: string
|
||||
}
|
||||
|
||||
export type Comment = Node<Integer, CommentDbProperties>
|
||||
10
backend/src/db/types/EmailAddress.ts
Normal file
10
backend/src/db/types/EmailAddress.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import { Integer, Node } from 'neo4j-driver'
|
||||
|
||||
export interface EmailAddressDbProperties {
|
||||
createdAt: string
|
||||
email: string
|
||||
nonce: string
|
||||
verifiedAt: string
|
||||
}
|
||||
|
||||
export type EmailAddress = Node<Integer, EmailAddressDbProperties>
|
||||
12
backend/src/db/types/Event.ts
Normal file
12
backend/src/db/types/Event.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import { Integer, Node } from 'neo4j-driver'
|
||||
|
||||
import { PostDbProperties } from './Post'
|
||||
|
||||
export interface EventDbProperties extends PostDbProperties {
|
||||
eventIsOnline: boolean
|
||||
eventLocationName: string
|
||||
eventStart: string
|
||||
eventVenue: string
|
||||
}
|
||||
|
||||
export type Event = Node<Integer, EventDbProperties>
|
||||
19
backend/src/db/types/Group.ts
Normal file
19
backend/src/db/types/Group.ts
Normal file
@ -0,0 +1,19 @@
|
||||
import { Integer, Node } from 'neo4j-driver'
|
||||
|
||||
export interface GroupDbProperties {
|
||||
about: string
|
||||
actionRadius: string
|
||||
createdAt: string
|
||||
deleted: boolean
|
||||
description: string
|
||||
descriptionExcerpt: string
|
||||
disabled: boolean
|
||||
groupType: string
|
||||
id: string
|
||||
locationName?: string
|
||||
name: string
|
||||
slug: string
|
||||
updatedAt: string
|
||||
}
|
||||
|
||||
export type Group = Node<Integer, GroupDbProperties>
|
||||
12
backend/src/db/types/Image.ts
Normal file
12
backend/src/db/types/Image.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import { Integer, Node } from 'neo4j-driver'
|
||||
|
||||
export interface ImageDbProperties {
|
||||
alt: string
|
||||
aspectRatio: number
|
||||
createdAt: string
|
||||
sensitive: boolean
|
||||
type: string
|
||||
url: string
|
||||
}
|
||||
|
||||
export type Image = Node<Integer, ImageDbProperties>
|
||||
8
backend/src/db/types/InviteCode.ts
Normal file
8
backend/src/db/types/InviteCode.ts
Normal file
@ -0,0 +1,8 @@
|
||||
import { Integer, Node } from 'neo4j-driver'
|
||||
|
||||
export interface InviteCodeDbProperties {
|
||||
code: string
|
||||
createdAt: string
|
||||
}
|
||||
|
||||
export type InviteCode = Node<Integer, InviteCodeDbProperties>
|
||||
20
backend/src/db/types/Location.ts
Normal file
20
backend/src/db/types/Location.ts
Normal file
@ -0,0 +1,20 @@
|
||||
import { Integer, Node } from 'neo4j-driver'
|
||||
|
||||
export interface LocationDbProperties {
|
||||
id: string
|
||||
lat: number
|
||||
lng: number
|
||||
name: string
|
||||
nameDE: string
|
||||
nameEN: string
|
||||
nameES: string
|
||||
nameFR: string
|
||||
nameIT: string
|
||||
nameNL: string
|
||||
namePL: string
|
||||
namePT: string
|
||||
nameRU: string
|
||||
type: string
|
||||
}
|
||||
|
||||
export type Location = Node<Integer, LocationDbProperties>
|
||||
13
backend/src/db/types/Message.ts
Normal file
13
backend/src/db/types/Message.ts
Normal file
@ -0,0 +1,13 @@
|
||||
import { Integer, Node } from 'neo4j-driver'
|
||||
|
||||
export interface MessageDbProperties {
|
||||
content: string
|
||||
createdAt: string
|
||||
distributed: boolean
|
||||
id: string
|
||||
indexId: number
|
||||
saved: boolean
|
||||
seen: boolean
|
||||
}
|
||||
|
||||
export type Message = Node<Integer, MessageDbProperties>
|
||||
21
backend/src/db/types/Post.ts
Normal file
21
backend/src/db/types/Post.ts
Normal file
@ -0,0 +1,21 @@
|
||||
import { Integer, Node } from 'neo4j-driver'
|
||||
|
||||
export interface PostDbProperties {
|
||||
clickedCount: number
|
||||
content: string
|
||||
contentExcerpt: string
|
||||
createdAt: string
|
||||
deleted: boolean
|
||||
disabled: boolean
|
||||
id: string
|
||||
language: string
|
||||
postType: string // this is a PostType[] in the graphql, mapped from the labels
|
||||
slug: string
|
||||
sortDate: string
|
||||
title: string
|
||||
updatedAt: string
|
||||
viewedTeaserCount: number
|
||||
}
|
||||
|
||||
export type Post = Node<Integer, PostDbProperties>
|
||||
export type Article = Node<Integer, PostDbProperties>
|
||||
11
backend/src/db/types/Report.ts
Normal file
11
backend/src/db/types/Report.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import { Integer, Node } from 'neo4j-driver'
|
||||
|
||||
export interface ReportDbProperties {
|
||||
closed: boolean
|
||||
createdAt: string
|
||||
id: string
|
||||
rule: string
|
||||
updatedAt: string
|
||||
}
|
||||
|
||||
export type Report = Node<Integer, ReportDbProperties>
|
||||
10
backend/src/db/types/Tag.ts
Normal file
10
backend/src/db/types/Tag.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import { Integer, Node } from 'neo4j-driver'
|
||||
|
||||
export interface TagDbProperties {
|
||||
deleted: boolean
|
||||
disabled: boolean
|
||||
id: string
|
||||
updatedAt: string
|
||||
}
|
||||
|
||||
export type Tag = Node<Integer, TagDbProperties>
|
||||
Loading…
x
Reference in New Issue
Block a user