regen with uuids
This commit is contained in:
parent
33cc2ef5f0
commit
7d632fe501
@ -5,8 +5,8 @@ use sea_orm::entity::prelude::*;
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel)]
|
||||
#[sea_orm(table_name = "block_list")]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key)]
|
||||
pub id: i64,
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub uuid: Vec<u8>,
|
||||
#[sea_orm(unique)]
|
||||
pub address: String,
|
||||
pub description: String,
|
||||
|
@ -6,9 +6,9 @@ use sea_orm::entity::prelude::*;
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel)]
|
||||
#[sea_orm(table_name = "secondary_user")]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key)]
|
||||
pub id: i64,
|
||||
pub user_id: i64,
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub uuid: Vec<u8>,
|
||||
pub user_id: Vec<u8>,
|
||||
pub address: String,
|
||||
pub description: String,
|
||||
pub email: String,
|
||||
@ -20,7 +20,7 @@ pub enum Relation {
|
||||
#[sea_orm(
|
||||
belongs_to = "super::user::Entity",
|
||||
from = "Column::UserId",
|
||||
to = "super::user::Column::Id",
|
||||
to = "super::user::Column::Uuid",
|
||||
on_update = "NoAction",
|
||||
on_delete = "NoAction"
|
||||
)]
|
||||
|
@ -5,8 +5,8 @@ use sea_orm::entity::prelude::*;
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel)]
|
||||
#[sea_orm(table_name = "user")]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key)]
|
||||
pub id: i64,
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub uuid: Vec<u8>,
|
||||
#[sea_orm(unique)]
|
||||
pub address: String,
|
||||
pub description: String,
|
||||
|
@ -5,9 +5,9 @@ use sea_orm::entity::prelude::*;
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel)]
|
||||
#[sea_orm(table_name = "user_keys")]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key)]
|
||||
pub id: i64,
|
||||
pub user_id: i64,
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub uuid: Vec<u8>,
|
||||
pub user_uuid: Vec<u8>,
|
||||
#[sea_orm(unique)]
|
||||
pub api_key: String,
|
||||
pub description: String,
|
||||
@ -19,8 +19,8 @@ pub struct Model {
|
||||
pub enum Relation {
|
||||
#[sea_orm(
|
||||
belongs_to = "super::user::Entity",
|
||||
from = "Column::UserId",
|
||||
to = "super::user::Column::Id",
|
||||
from = "Column::UserUuid",
|
||||
to = "super::user::Column::Uuid",
|
||||
on_update = "NoAction",
|
||||
on_delete = "NoAction"
|
||||
)]
|
||||
|
Loading…
Reference in New Issue
Block a user