This commit is contained in:
1 parent
d74db2096c
commit
8c763786c1
25 files changed
+3614
-407
No files matched your search
@@ -0,0 +1,31 @@
|
||||
use jiff::Timestamp;
|
||||
|
||||
use crate::gitea::WebhookType;
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, toasty::Embed)]
|
||||
pub enum JobStatus {
|
||||
Pending,
|
||||
Processing,
|
||||
}
|
||||
|
||||
#[derive(Debug, toasty::Model)]
|
||||
pub struct Job {
|
||||
#[key]
|
||||
#[auto]
|
||||
pub id: u64,
|
||||
|
||||
#[unique]
|
||||
pub event_id: u64,
|
||||
|
||||
pub repo: String,
|
||||
pub pr: u64,
|
||||
|
||||
#[column(type = jsonb)]
|
||||
pub payload: toasty::Json<WebhookType>,
|
||||
|
||||
#[index]
|
||||
pub status: JobStatus,
|
||||
|
||||
#[auto]
|
||||
pub created_at: Timestamp,
|
||||
}
|
||||
Reference in new issue
Block a user