comparison lib/types.h @ 19:de4bf839b565

misc: revamp SQL
author David Demelier <markand@malikania.fr>
date Fri, 15 Jul 2022 11:11:48 +0200
parents 600204c31bf0
children f98ea578b1ef
comparison
equal deleted inserted replaced
18:600204c31bf0 19:de4bf839b565
19 #ifndef SCI_TYPES_H 19 #ifndef SCI_TYPES_H
20 #define SCI_TYPES_H 20 #define SCI_TYPES_H
21 21
22 #include <sys/types.h> 22 #include <sys/types.h>
23 #include <stddef.h> 23 #include <stddef.h>
24 #include <stdint.h>
24 25
25 #include <jansson.h> 26 #include <jansson.h>
26 27
27 struct job { 28 struct job {
28 int id; 29 intmax_t id;
29 int project_id; 30 int project_id;
30 const char *tag; 31 const char *tag;
31 }; 32 };
32 33
33 struct jobresult { 34 struct jobresult {
34 int id; 35 intmax_t id;
35 int job_id; 36 int job_id;
36 int worker_id; 37 int worker_id;
37 int exitcode; 38 int exitcode;
38 const char *log; 39 const char *log;
39 }; 40 };
40 41
41 struct worker { 42 struct worker {
42 int id; 43 intmax_t id;
43 const char *name; 44 const char *name;
44 const char *desc; 45 const char *desc;
45 }; 46 };
46 47
47 struct project { 48 struct project {
48 int id; 49 intmax_t id;
49 const char *name; 50 const char *name;
50 const char *desc; 51 const char *desc;
51 const char *url; 52 const char *url;
52 const char *script; 53 const char *script;
53 }; 54 };