added functionality for user subscriptions
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
// defined shared characteristics for DB entities
|
||||
interface DBEntity {
|
||||
id?: number
|
||||
}
|
||||
|
||||
interface HasHistory extends DBEntity {
|
||||
datecreated?: string
|
||||
datemodified?: string
|
||||
@@ -7,15 +12,13 @@ interface CanDeactivate extends DBEntity {
|
||||
active?: boolean
|
||||
}
|
||||
|
||||
interface DBEntity {
|
||||
id?: number
|
||||
}
|
||||
|
||||
// data models
|
||||
export interface IUser extends HasHistory, CanDeactivate {
|
||||
firstname: string
|
||||
lastname: string
|
||||
handle: string
|
||||
email: string
|
||||
isadmin: boolean
|
||||
password?: string
|
||||
}
|
||||
|
||||
@@ -28,7 +31,7 @@ export interface IRecipe extends HasHistory, CanDeactivate {
|
||||
name: string
|
||||
description?: string
|
||||
preptime: string
|
||||
authoruserid?: IUser["id"]
|
||||
authoruserid: IUser["id"]
|
||||
}
|
||||
|
||||
export interface IIngredient extends HasHistory {
|
||||
@@ -39,10 +42,10 @@ export interface IIngredient extends HasHistory {
|
||||
export interface ICollection extends HasHistory, CanDeactivate {
|
||||
name: string
|
||||
ismaincollection: boolean
|
||||
ownerid?: IUser["id"]
|
||||
ownerid: IUser["id"]
|
||||
}
|
||||
|
||||
export interface IGroceryList extends HasHistory, CanDeactivate {
|
||||
name: string
|
||||
ownerid?: IUser["id"]
|
||||
ownerid: IUser["id"]
|
||||
}
|
||||
Reference in New Issue
Block a user