Initial
This commit is contained in:
76
listify-client/src/app/templates/templates.models.ts
Normal file
76
listify-client/src/app/templates/templates.models.ts
Normal file
@@ -0,0 +1,76 @@
|
||||
export type ListTemplateKind = 'packing' | 'shopping' | 'todo' | 'custom';
|
||||
|
||||
export interface ListTemplateItem {
|
||||
id: string;
|
||||
title: string;
|
||||
notes?: string;
|
||||
quantity?: number;
|
||||
required: boolean;
|
||||
position: number;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
export interface ListTemplate {
|
||||
id: string;
|
||||
ownerId: string;
|
||||
name: string;
|
||||
description?: string;
|
||||
kind: ListTemplateKind;
|
||||
items: ListTemplateItem[];
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
export interface UserListItem {
|
||||
id: string;
|
||||
sourceTemplateItemId?: string;
|
||||
title: string;
|
||||
notes?: string;
|
||||
quantity?: number;
|
||||
required: boolean;
|
||||
checked: boolean;
|
||||
position: number;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
export interface UserList {
|
||||
id: string;
|
||||
ownerId: string;
|
||||
sourceTemplateId?: string;
|
||||
name: string;
|
||||
description?: string;
|
||||
kind: ListTemplateKind;
|
||||
items: UserListItem[];
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
export interface UpdateListTemplateRequest {
|
||||
name?: string;
|
||||
description?: string;
|
||||
kind?: ListTemplateKind;
|
||||
}
|
||||
|
||||
export interface CreateListTemplateRequest {
|
||||
name: string;
|
||||
description?: string;
|
||||
kind?: ListTemplateKind;
|
||||
}
|
||||
|
||||
export interface AddListTemplateItemRequest {
|
||||
title: string;
|
||||
notes?: string;
|
||||
quantity?: number;
|
||||
required?: boolean;
|
||||
}
|
||||
|
||||
export interface ReorderListTemplateItemsRequest {
|
||||
itemIds: string[];
|
||||
}
|
||||
|
||||
export interface CreateListFromTemplateRequest {
|
||||
name?: string;
|
||||
description?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user