This repository has been archived on 2024-02-08. You can view files and clone it, but cannot push or open issues or pull requests.
frontend/src/models/userShareBase.ts

21 lines
582 B
TypeScript

import AbstractModel from './abstractModel'
import {RIGHTS, type Right} from '@/constants/rights'
import type {IUserShareBase} from '@/modelTypes/IUserShareBase'
import type {IUser} from '@/modelTypes/IUser'
export default class UserShareBaseModel extends AbstractModel<IUserShareBase> implements IUserShareBase {
userId: IUser['id'] = ''
right: Right = RIGHTS.READ
created: Date = null
updated: Date = null
constructor(data: Partial<IUserShareBase>) {
super()
this.assignData(data)
this.created = new Date(this.created)
this.updated = new Date(this.updated)
}
}