updated living space

This commit is contained in:
2025-11-26 16:10:15 +03:00
parent 2062aa7a1d
commit 3aebb79d36
38 changed files with 709 additions and 688 deletions

View File

@@ -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 {

View File

@@ -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;