updated living space
This commit is contained in:
@@ -75,6 +75,23 @@ export class Base {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ObjectType({ isAbstract: true })
|
||||
export class CreatedBase {
|
||||
|
||||
@Field()
|
||||
@Prop({ default: () => new Date(Date.now()), required: false })
|
||||
createdAt?: Date;
|
||||
|
||||
@Field()
|
||||
@Prop({ default: () => new Date(Date.now()), required: false })
|
||||
updatedAt?: Date;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ObjectType({ isAbstract: true })
|
||||
export class ExpiryBase {
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
|
||||
import { Document, Types } from 'mongoose';
|
||||
import { ObjectType, Field, ID, Int } from '@nestjs/graphql';
|
||||
import { Base } from '@/models/base.model';
|
||||
import { Base, CreatedBase } from '@/models/base.model';
|
||||
import { Person } from '@/models/person.model';
|
||||
import { Company } from '@/models/company.model';
|
||||
import { BuildTypes } from './build-types.model';
|
||||
@@ -119,7 +119,7 @@ export class BuildInfo {
|
||||
|
||||
@ObjectType()
|
||||
@Schema({ timestamps: true })
|
||||
export class Build {
|
||||
export class Build extends CreatedBase {
|
||||
|
||||
@Field()
|
||||
readonly _id: string;
|
||||
|
||||
Reference in New Issue
Block a user