Skip to content

Commit

Permalink
Add ttl, proxy, active flag in Record model
Browse files Browse the repository at this point in the history
  • Loading branch information
yash22arora committed Jun 19, 2024
1 parent a66f482 commit 97ed67f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions server/src/api/models/record.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ interface IRecord extends Document {
name: string;
content: string;
type: TRecordType;
ttl: number;
proxied: boolean;
isActive: boolean;
created_at: Date;
updated_at: Date;
}
Expand All @@ -31,6 +34,9 @@ const recordSchema: Schema<IRecord> = new mongoose.Schema({
name: { type: String, required: true, unique: true },
content: { type: String, required: true },
type: { type: String, required: true },
ttl: { type: Number, required: true, default: 1 },
proxied: { type: Boolean, required: true, default: false },
isActive: { type: Boolean, required: true, default: false },
created_at: { type: Date, default: Date.now },
updated_at: { type: Date, default: Date.now },
});
Expand Down

0 comments on commit 97ed67f

Please sign in to comment.