feat: improve store and model typing
This commit is contained in:
parent
c9e85cb52b
commit
3766b5e51b
98 changed files with 1050 additions and 507 deletions
|
|
@ -1,19 +1,33 @@
|
|||
import AbstractModel from './abstractModel'
|
||||
import UserModel from './user'
|
||||
import UserModel, { type IUser } from './user'
|
||||
import {colorIsDark} from '@/helpers/color/colorIsDark'
|
||||
|
||||
const DEFAULT_LABEL_BACKGROUND_COLOR = 'e8e8e8'
|
||||
export default class LabelModel extends AbstractModel {
|
||||
|
||||
export interface ILabel {
|
||||
id: number
|
||||
title: string
|
||||
hexColor: string
|
||||
description: string
|
||||
createdBy: UserModel
|
||||
createdBy: IUser
|
||||
listId: number
|
||||
textColor: string
|
||||
|
||||
created: Date
|
||||
updated: Date
|
||||
}
|
||||
|
||||
export default class LabelModel extends AbstractModel implements ILabel {
|
||||
declare id: number
|
||||
declare title: string
|
||||
declare hexColor: string
|
||||
declare description: string
|
||||
declare createdBy: IUser
|
||||
declare listId: number
|
||||
declare textColor: string
|
||||
|
||||
created: Date
|
||||
updated: Date
|
||||
|
||||
constructor(data) {
|
||||
super(data)
|
||||
|
|
|
|||
Reference in a new issue