1.13.0 • Published 4 months ago

@andes/core v1.13.0

Weekly downloads
19
License
MIT
Repository
-
Last release
4 months ago

@andes/core

ResourceBase example

interface IPersona extends Document {
    nombre: String;
    active: Boolean;
}

const schema = new mongoose.Schema({ 
    nombre: String, active: Boolean 
});

PersonaModel = mongoose.model('personas', schema);

class Personas extends ResourceBase<IPersona> {
    Model = PersonaModel;
    searchFileds = {
        active: MongoQuery.equalMatch,
        nombre: (text: string) => new RegExp(`^${text}`),
        apellido: MongoQuery.partialString,
        search: ['nombre', 'apellido']
    };
}

const personaResource = new Personas();

const persona: IPersona = personaResource.create(...);
1.13.0

4 months ago

1.11.0

7 months ago

1.10.0

1 year ago

1.9.1

1 year ago

1.9.0

1 year ago

1.8.0

2 years ago

1.7.0

2 years ago

1.6.0

2 years ago

1.5.0

3 years ago

1.4.0

3 years ago

1.3.0

3 years ago

1.2.0

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago