chore: synchronize local fixes to gitea
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import mongoose, { Schema, Document } from 'mongoose';
|
||||
|
||||
export interface IProject extends Document {
|
||||
name: string;
|
||||
client: string;
|
||||
startDate?: Date | null;
|
||||
endDate?: Date | null;
|
||||
technician?: string | null;
|
||||
environment?: string | null;
|
||||
organizationId?: string;
|
||||
weightKg?: number | null;
|
||||
status: 'active' | 'archived';
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
}
|
||||
|
||||
const ProjectSchema: Schema = new Schema({
|
||||
name: { type: String, required: true },
|
||||
client: { type: String, required: true },
|
||||
organizationId: { type: String, index: true },
|
||||
startDate: { type: Date },
|
||||
endDate: { type: Date },
|
||||
technician: { type: String },
|
||||
environment: { type: String },
|
||||
weightKg: { type: Number },
|
||||
status: { type: String, enum: ['active', 'archived'], default: 'active', index: true },
|
||||
}, { timestamps: true });
|
||||
|
||||
export default mongoose.models.Project || mongoose.model<IProject>('Project', ProjectSchema);
|
||||
Reference in New Issue
Block a user