const EmployeurDto = require("./EmployeurDto")
/**
* @swagger
* components:
* schemas:
* newAdmin:
* type: object
* properties:
* login:
* type: string
* description: L'email de l'administrateur a créer.
* example: hassani.ayoub1@gmail.com
* firstname:
* type: string
* description: le Nom de l'admin.
* example: HASSANI
* lastname:
* type: string
* description: le Prénom de l'admin.
* example: ayoub
* Admin:
* allOf:
* - type: object
* properties:
* id:
* type: integer
* description: The user ID.
* example: 0
* - $ref: '#/components/schemas/newAdmin'
*/
/**
* @memberof Myintranet.DTOS
*/
class AdminDto {
/**
* Cree un Admin DTO
* @param {Myintranet.Database.User} admin the USER
*/
constructor(admin) {
this.id = admin.id
this.login = admin.login
this.firstname = admin.firstname
this.lastname = admin.lastname
this.createdAt = admin.createdAt
this.phone = admin.phone
this.Employeurs = admin.Employeurs.map((employeur) => {
return new EmployeurDto(employeur);
});
}
}
module.exports = AdminDto;