diff --git a/src/domain/course.rs b/src/domain/course.rs index 71a2e08..eef1e83 100644 --- a/src/domain/course.rs +++ b/src/domain/course.rs @@ -34,17 +34,7 @@ impl CourseId { self.0.to_string() } - /// The inner uuid, for binding the id through the runtime-checked - /// builders ([`crate::db::page::Param`]) whose values are raw uuids. - pub(crate) fn uuid(&self) -> uuid::Uuid { - self.0 - } } - -#[derive(Debug, Clone, PartialEq, Eq, sqlx::Type)] -#[sqlx(transparent)] -pub struct CourseTitle(String); - impl CourseTitle { pub fn try_new(value: &str) -> Result { validate_required("title", value, MAX_COURSE_TITLE_LEN)?; diff --git a/src/domain/course_session.rs b/src/domain/course_session.rs index 56df9ff..7e8a2dd 100644 --- a/src/domain/course_session.rs +++ b/src/domain/course_session.rs @@ -35,17 +35,7 @@ impl CourseSessionId { self.0.to_string() } - /// The inner uuid, for binding the id through the runtime-checked - /// builders ([`crate::db::page::Param`]) whose values are raw uuids. - pub(crate) fn uuid(&self) -> uuid::Uuid { - self.0 - } } - -#[derive(Debug, Clone, PartialEq, Eq, sqlx::Type)] -#[sqlx(transparent)] -pub struct SessionTopic(String); - impl SessionTopic { pub fn try_new(value: &str) -> Result { validate_optional("topic", value, MAX_SESSION_TOPIC_LEN)?; diff --git a/src/domain/subject.rs b/src/domain/subject.rs index 5b553f3..00718b2 100644 --- a/src/domain/subject.rs +++ b/src/domain/subject.rs @@ -41,17 +41,7 @@ impl SubjectId { self.0.to_string() } - /// The inner uuid, for binding the id through the runtime-checked - /// builders ([`crate::db::page::Param`]) whose values are raw uuids. - pub(crate) fn uuid(&self) -> Uuid { - self.0 - } } - -#[derive(Debug, Clone, PartialEq, Eq, Type)] -#[sqlx(transparent)] -pub struct SubjectName(String); - impl SubjectName { pub fn try_new(value: &str) -> Result { validate_required("name", value, MAX_SUBJECT_NAME_LEN)?; diff --git a/src/domain/term.rs b/src/domain/term.rs index dbd259b..cb09148 100644 --- a/src/domain/term.rs +++ b/src/domain/term.rs @@ -41,17 +41,7 @@ impl TermId { self.0.to_string() } - /// The inner uuid, for binding the id through the runtime-checked - /// builders ([`crate::db::page::Param`]) whose values are raw uuids. - pub(crate) fn uuid(&self) -> Uuid { - self.0 - } } - -/// The answer every link to a term that is not there gets — the claim is a -/// conditional write on the term row, so a term a delete already removed -/// matches nothing and the caller says exactly what the link resolver's -/// pre-flight lookup ([`crate::service::term::resolve`]) would have. pub fn gone_error() -> AppError { AppError::Validation(ValidationError::Invalid { field: "term_id",