lecoffre-ressources/src/Notary/OfficeFolderAnchor.ts
2023-09-26 16:39:25 +02:00

52 lines
1.2 KiB
TypeScript

import Resource from "../Resource";
import { Expose, Type } from "class-transformer";
import EBlockchainName from "./EBlockchainName";
import EAnchoringStatus from "./EAnchoringStatus";
import OfficeFolder from "./OfficeFolder";
import { IsDate } from "class-validator";
export default class OfficeFolderAnchor extends Resource {
@Expose()
public uid?: string;
@Expose()
public hash_sources?: string[];
@Expose()
public root_hash?: string;
@Expose()
public blockchain?: EBlockchainName | string = EBlockchainName.TEZOS;
@Expose()
public status?: EAnchoringStatus | string = EAnchoringStatus.QUEUED;
@Expose()
public anchor_nb_try?: number = 0;
@Expose()
public tx_id: string | null = null;
@Expose()
public tx_link: string | null = null;
@Expose()
public tx_hash: string | null = null;
@Expose()
@Type(() => OfficeFolder)
public folder?: OfficeFolder | null = null;
@Expose()
@IsDate()
public anchored_at?: Date | null = null;
@Expose()
@IsDate()
public created_at?: Date | null = null;
@Expose()
@IsDate()
public updated_at?: Date | null = null;
}