You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
517 B
30 lines
517 B
export enum EntityType {
|
|
User = 'users',
|
|
Group = 'groups',
|
|
}
|
|
|
|
export interface Entity {
|
|
[key: string]: string | number | boolean | object | any[]
|
|
id: string
|
|
created: number
|
|
}
|
|
|
|
export type Group = Entity & {
|
|
name: string
|
|
}
|
|
|
|
export type User = Entity & {
|
|
name: string
|
|
group?: Group
|
|
about?: string
|
|
imageUrl?: string
|
|
coverImageUrl?: string
|
|
}
|
|
|
|
export interface EntityCollection {
|
|
[id: string]: Entity
|
|
}
|
|
|
|
export interface EntityStore {
|
|
[type: string]: EntityCollection
|
|
}
|