chore: 移除Welds库依赖并简化项目结构
- 移除对Welds库的依赖及相关数据模型定义以简化项目结构。
This commit is contained in:
13
src/main.rs
13
src/main.rs
@@ -7,23 +7,10 @@ use axum::{
|
|||||||
use chrono::{prelude::*, Duration, ParseError};
|
use chrono::{prelude::*, Duration, ParseError};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use std::{env, ops::Deref, sync::Arc};
|
use std::{env, ops::Deref, sync::Arc};
|
||||||
use welds::prelude::*;
|
|
||||||
|
|
||||||
mod db;
|
mod db;
|
||||||
mod generate;
|
mod generate;
|
||||||
|
|
||||||
#[derive(WeldsModel)]
|
|
||||||
#[welds(table = "authorize")]
|
|
||||||
pub struct Authorize {
|
|
||||||
#[welds(primary_key)]
|
|
||||||
pub id: i32,
|
|
||||||
pub project: String,
|
|
||||||
pub key: String,
|
|
||||||
pub device_id: String,
|
|
||||||
pub expire: String,
|
|
||||||
pub insert_time: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
// 根据操作系统选择数据库路径
|
// 根据操作系统选择数据库路径
|
||||||
|
|||||||
Reference in New Issue
Block a user