feat: register INSERT now uses status='registered' + registration_time=NOW()
This commit is contained in:
@@ -141,6 +141,7 @@ pub struct StorageStatus {
|
||||
#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum VideoStatus {
|
||||
Registered,
|
||||
Pending,
|
||||
Processing,
|
||||
Completed,
|
||||
@@ -150,6 +151,7 @@ pub enum VideoStatus {
|
||||
impl VideoStatus {
|
||||
pub fn as_str(&self) -> &'static str {
|
||||
match self {
|
||||
VideoStatus::Registered => "registered",
|
||||
VideoStatus::Pending => "pending",
|
||||
VideoStatus::Processing => "processing",
|
||||
VideoStatus::Completed => "completed",
|
||||
@@ -159,6 +161,7 @@ impl VideoStatus {
|
||||
|
||||
pub fn from_db_str(s: &str) -> Option<Self> {
|
||||
match s {
|
||||
"registered" => Some(VideoStatus::Registered),
|
||||
"pending" => Some(VideoStatus::Pending),
|
||||
"processing" => Some(VideoStatus::Processing),
|
||||
"completed" => Some(VideoStatus::Completed),
|
||||
|
||||
Reference in New Issue
Block a user