import { Guid } from '@common/types/guid'; import { UserInfoListingModel } from '../user/user-info-listing'; import { LockTargetType } from '@app/core/common/enum/lock-target-type'; import { User } from '../user/user'; // old model export class LockModel { id: Guid; target: Guid; lockedBy: UserInfoListingModel; lockedAt: Date; touchedAt: Date; constructor(targetId: string, lockedBy: any) { this.lockedAt = new Date(); this.touchedAt = new Date(); this.target = Guid.parse(targetId); this.lockedBy = lockedBy; } } export interface Lock{ id: Guid; target: Guid; targetType: LockTargetType; lockedBy: User; lockedAt: Date; touchedAt: Date; hash: String; } // Persist export interface LockPersist{ id: Guid; target: Guid; targetType: LockTargetType; lockedBy: User; hash: String; }