Add create job endpoint
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
use super::_entities::jobs::{ActiveModel, Entity};
|
||||
use sea_orm::entity::prelude::*;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use chrono::NaiveDate;
|
||||
|
||||
pub type Jobs = Entity;
|
||||
|
||||
impl ActiveModelBehavior for ActiveModel {
|
||||
@@ -16,4 +18,15 @@ pub struct JobWithTechnologies {
|
||||
pub end_date: Option<Date>,
|
||||
pub technologies: Vec<String>,
|
||||
pub still_working: bool,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
pub struct CreateJobForm {
|
||||
pub position: String,
|
||||
pub company: String,
|
||||
pub start_date: NaiveDate,
|
||||
#[serde(default)]
|
||||
pub end_date: Option<NaiveDate>,
|
||||
pub technologies: String,
|
||||
pub still_working: bool,
|
||||
}
|
Reference in New Issue
Block a user