From e3bb6a1d1ff2dc48f0f5100ef5bec0bd7bf658cd Mon Sep 17 00:00:00 2001 From: Marcel Date: Sun, 24 Mar 2024 18:52:35 +0100 Subject: [PATCH] fixed stuff --- bin/chef/src/service/record/model.rs | 4 ++-- lib/entity/src/models/record_a.rs | 2 +- lib/entity/src/models/record_aaaa.rs | 2 +- lib/migration/src/m20231010_000001_create_table.rs | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bin/chef/src/service/record/model.rs b/bin/chef/src/service/record/model.rs index cde2244..ef859fc 100644 --- a/bin/chef/src/service/record/model.rs +++ b/bin/chef/src/service/record/model.rs @@ -45,7 +45,7 @@ impl RecordRequestTrait for RecordARequest { fn into_active_model(self, id: ActiveValue) -> record_a::ActiveModel { record_a::ActiveModel { id, - address: ActiveValue::Set(self.addr.to_string()), + addr: ActiveValue::Set(self.addr.to_string()), } } } @@ -54,7 +54,7 @@ impl RecordRequestTrait for RecordAaaaRequest { fn into_active_model(self, id: ActiveValue) -> record_aaaa::ActiveModel { record_aaaa::ActiveModel { id, - address: ActiveValue::Set(self.addr.to_string()), + addr: ActiveValue::Set(self.addr.to_string()), } } } diff --git a/lib/entity/src/models/record_a.rs b/lib/entity/src/models/record_a.rs index f6f849f..31ab8ca 100644 --- a/lib/entity/src/models/record_a.rs +++ b/lib/entity/src/models/record_a.rs @@ -8,7 +8,7 @@ use serde::{Deserialize, Serialize}; pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: Uuid, - pub address: String, + pub addr: String, } #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] diff --git a/lib/entity/src/models/record_aaaa.rs b/lib/entity/src/models/record_aaaa.rs index b3be638..4001421 100644 --- a/lib/entity/src/models/record_aaaa.rs +++ b/lib/entity/src/models/record_aaaa.rs @@ -8,7 +8,7 @@ use serde::{Deserialize, Serialize}; pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: Uuid, - pub address: String, + pub addr: String, } #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] diff --git a/lib/migration/src/m20231010_000001_create_table.rs b/lib/migration/src/m20231010_000001_create_table.rs index df7e118..f3f2cf1 100644 --- a/lib/migration/src/m20231010_000001_create_table.rs +++ b/lib/migration/src/m20231010_000001_create_table.rs @@ -59,13 +59,13 @@ impl MigrationTrait for Migration { ); create table record_a( - id uuid not null primary key references record(id), - address varchar(15) not null + id uuid not null primary key references record(id), + addr varchar(15) not null ); create table record_aaaa( - id uuid not null primary key references record(id), - address varchar(41) not null + id uuid not null primary key references record(id), + addr varchar(41) not null ); create table record_cname(