Coder Social home page Coder Social logo

Comments (5)

vinczedani avatar vinczedani commented on July 20, 2024

Hi @pgsfredda
It is a good idea to add this functionality to typegoose, We would appreciate it if you could create a pull request. If not, we will try to do it ourselves when we some free time for the project.
Cheers,
Daniel

from typegoose.

pgsfredda avatar pgsfredda commented on July 20, 2024

Of course but it would be the first time for me creating a pull request.
I'll try the solution by me and when I'm ready I'll create the request.
Thank you!

from typegoose.

pgsfredda avatar pgsfredda commented on July 20, 2024

Hi.
I tried to add expires field in the interface BasePropOptions in the ts and d.ts of prop file as listed below.
It seems work correctly! The saved rows are deleted after the time indicated in the expires field (string for time notation and number for milliseconds as with mongoose).

export interface BasePropOptions {
  required?: RequiredType;
  enum?: string[] | object;
  default?: any;
  unique?: boolean;
  index?: boolean;
  expires?: string | number;
}

from typegoose.

vinczedani avatar vinczedani commented on July 20, 2024

Hi @pgsfredda

Can you please create a pull request about this, with a test covering the new feature.

Cheers,
Daniel

from typegoose.

hasezoey avatar hasezoey commented on July 20, 2024

because of

expires?: string | number;

this can be closed

@Ben305

from typegoose.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.