Basic rest implementation for connecting user to sales-person
This commit is contained in:
parent
e3ec694876
commit
bf94ec33de
10 changed files with 181 additions and 1 deletions
|
|
@ -53,6 +53,7 @@ pub trait PermissionService {
|
|||
) -> Result<(), ServiceError>;
|
||||
|
||||
async fn create_user(&self, user: &str, context: Self::Context) -> Result<(), ServiceError>;
|
||||
async fn user_exists(&self, user: &str, context: Self::Context) -> Result<bool, ServiceError>;
|
||||
async fn delete_user(&self, user: &str, context: Self::Context) -> Result<(), ServiceError>;
|
||||
async fn get_all_users(&self, context: Self::Context) -> Result<Arc<[User]>, ServiceError>;
|
||||
|
||||
|
|
|
|||
|
|
@ -56,4 +56,15 @@ pub trait SalesPersonService {
|
|||
context: Self::Context,
|
||||
) -> Result<SalesPerson, ServiceError>;
|
||||
async fn delete(&self, id: Uuid, context: Self::Context) -> Result<(), ServiceError>;
|
||||
async fn get_assigned_user(
|
||||
&self,
|
||||
sales_person_id: Uuid,
|
||||
context: Self::Context,
|
||||
) -> Result<Option<Arc<str>>, ServiceError>;
|
||||
async fn set_user(
|
||||
&self,
|
||||
sales_person_id: Uuid,
|
||||
user_id: Option<Arc<str>>,
|
||||
context: Self::Context,
|
||||
) -> Result<(), ServiceError>;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue