Skip to content
Snippets Groups Projects
Select Git revision
  • d17a9b95f22a9826b13ce706b689a63a19ca3867
  • main default protected
  • k8s
  • msa-part-4
  • msa-part-3
  • msa-part-2
  • msa-part-1
7 results

go.work

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    Todo.js 380 B
    import mongoose from 'mongoose';
    
    const TodoSchema = new mongoose.Schema(
      {
        username: { type: String },
        author: { type: mongoose.Schema.Types.ObjectID, ref: 'User' },
        task: { type: String, required: true, default: '' },
        status: { type: String, required: true, default: 'OPEN' },
      },
      { timestamps: true }
    );
    
    export default mongoose.model('Todo', TodoSchema);