From a4a52d352a36547fe01d3d9047859fa704acc4e8 Mon Sep 17 00:00:00 2001
From: raja <rafaelraja.sitorus@gmail.com>
Date: Fri, 28 Mar 2025 20:27:07 +0800
Subject: [PATCH] Create Subscriber model struct.

---
 .idea/.gitignore        |  8 ++++++++
 .idea/bambangshop.iml   |  9 +++++++++
 .idea/misc.xml          |  6 ++++++
 .idea/modules.xml       |  8 ++++++++
 src/model/mod.rs        |  1 +
 src/model/subscriber.rs | 13 +++++++++++++
 6 files changed, 45 insertions(+)
 create mode 100644 .idea/.gitignore
 create mode 100644 .idea/bambangshop.iml
 create mode 100644 .idea/misc.xml
 create mode 100644 .idea/modules.xml
 create mode 100644 src/model/subscriber.rs

diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..13566b8
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git a/.idea/bambangshop.iml b/.idea/bambangshop.iml
new file mode 100644
index 0000000..d6ebd48
--- /dev/null
+++ b/.idea/bambangshop.iml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$" />
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..6f29fee
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="21" project-jdk-type="JavaSDK">
+    <output url="file://$PROJECT_DIR$/out" />
+  </component>
+</project>
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..cfef350
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/.idea/bambangshop.iml" filepath="$PROJECT_DIR$/.idea/bambangshop.iml" />
+    </modules>
+  </component>
+</project>
\ No newline at end of file
diff --git a/src/model/mod.rs b/src/model/mod.rs
index 68024e1..e4371e0 100644
--- a/src/model/mod.rs
+++ b/src/model/mod.rs
@@ -1 +1,2 @@
 pub mod product;
+pub mod subscriber;
\ No newline at end of file
diff --git a/src/model/subscriber.rs b/src/model/subscriber.rs
new file mode 100644
index 0000000..759f458
--- /dev/null
+++ b/src/model/subscriber.rs
@@ -0,0 +1,13 @@
+use rocket::serde::{Deserialize, Serialize};
+use rocket::log;
+use rocket::serde::json::to_string;
+use rocket::tokio;
+use bambangshop::REQWEST_CLIENT;
+use crate::model::notification::Notification;
+
+#[derive(Debug, Clone, Deserialize, Serialize)]
+#[serde(crate = "rocket::serde")]
+pub struct Subscriber {
+    pub url: String,
+    pub name: String,
+}
\ No newline at end of file
-- 
GitLab