Skip to content
Snippets Groups Projects
Commit 3cd4b0c0 authored by michael.minelli's avatar michael.minelli
Browse files

Transfert shared models and types in this repo

parent 3b28c49f
No related branches found
No related tags found
No related merge requests found
import GitlabRepository from '../../shared/types/Gitlab/GitlabRepository';
import User from './User';
import Exercice from './Exercice';
interface Enonce {
name: string;
gitlabId: number;
gitlabLink: string;
gitlabCreationInfo: GitlabRepository;
gitlabLastInfo: GitlabRepository;
gitlabLastInfoDate: string;
published: boolean;
staff: Array<User>;
exercices: Array<Exercice>;
}
export default Enonce;
\ No newline at end of file
import GitlabRepository from '../../shared/types/Gitlab/GitlabRepository';
interface Exercice {
id: string;
enonceName: string;
name: string;
gitlabId: number;
gitlabLink: string;
gitlabCreationInfo: GitlabRepository;
gitlabLastInfo: GitlabRepository;
gitlabLastInfoDate: string;
}
export default Exercice;
\ No newline at end of file
interface User {
id: number;
firstName: string;
lastName: string;
mail: string;
gitlabId: number;
role: string;
isTeachingStaff: boolean;
deleted: boolean;
}
export default User;
enum ApiRoutes {
LOGIN = '/login',
TEST_SESSION = '/test_session',
GITLAB_CHECK_TEMPLATE_ACCESS = '/gitlab/project/{{id}}/checkTemplateAccess',
ENONCE_GET = '/enonces/{{nameOrUrl}}',
ENONCE_CREATE = '/enonces',
ENONCE_PUBLISH = '/enonces/{{nameOrUrl}}/publish',
ENONCE_UNPUBLISH = '/enonces/{{nameOrUrl}}/unpublish',
EXERCICE_CREATE = '/enonces/{{nameOrUrl}}/exercices',
}
export default ApiRoutes;
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment