mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-11 17:17:26 +01:00
Refactor frontend data models
This commit is contained in:
parent
5723bd8dd8
commit
66b2d90c50
120 changed files with 640 additions and 706 deletions
53
src-ui/src/app/data/custom-field.ts
Normal file
53
src-ui/src/app/data/custom-field.ts
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
import { ObjectWithId } from './object-with-id'
|
||||
|
||||
export enum CustomFieldDataType {
|
||||
String = 'string',
|
||||
Url = 'url',
|
||||
Date = 'date',
|
||||
Boolean = 'boolean',
|
||||
Integer = 'integer',
|
||||
Float = 'float',
|
||||
Monetary = 'monetary',
|
||||
DocumentLink = 'documentlink',
|
||||
}
|
||||
|
||||
export const DATA_TYPE_LABELS = [
|
||||
{
|
||||
id: CustomFieldDataType.Boolean,
|
||||
name: $localize`Boolean`,
|
||||
},
|
||||
{
|
||||
id: CustomFieldDataType.Date,
|
||||
name: $localize`Date`,
|
||||
},
|
||||
{
|
||||
id: CustomFieldDataType.Integer,
|
||||
name: $localize`Integer`,
|
||||
},
|
||||
{
|
||||
id: CustomFieldDataType.Float,
|
||||
name: $localize`Number`,
|
||||
},
|
||||
{
|
||||
id: CustomFieldDataType.Monetary,
|
||||
name: $localize`Monetary`,
|
||||
},
|
||||
{
|
||||
id: CustomFieldDataType.String,
|
||||
name: $localize`Text`,
|
||||
},
|
||||
{
|
||||
id: CustomFieldDataType.Url,
|
||||
name: $localize`Url`,
|
||||
},
|
||||
{
|
||||
id: CustomFieldDataType.DocumentLink,
|
||||
name: $localize`Document Link`,
|
||||
},
|
||||
]
|
||||
|
||||
export interface CustomField extends ObjectWithId {
|
||||
data_type: CustomFieldDataType
|
||||
name: string
|
||||
created?: Date
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue