From a2e4f348d9f561927692c64c27fb8a56068449f0 Mon Sep 17 00:00:00 2001 From: jake Date: Wed, 7 Oct 2020 19:36:36 -0600 Subject: [PATCH] add character options flags to postgres --- src/entity/gateway/postgres/migrations/V0001__initial.sql | 1 + src/entity/gateway/postgres/models.rs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/entity/gateway/postgres/migrations/V0001__initial.sql b/src/entity/gateway/postgres/migrations/V0001__initial.sql index 16ecbb0..6f9bba7 100644 --- a/src/entity/gateway/postgres/migrations/V0001__initial.sql +++ b/src/entity/gateway/postgres/migrations/V0001__initial.sql @@ -47,6 +47,7 @@ create table player_character ( config bytea not null, infoboard varchar(172) not null, guildcard varchar(172) not null, + option_flags integer not null, power smallint not null, mind smallint not null, diff --git a/src/entity/gateway/postgres/models.rs b/src/entity/gateway/postgres/models.rs index eb2554f..fb1ccb6 100644 --- a/src/entity/gateway/postgres/models.rs +++ b/src/entity/gateway/postgres/models.rs @@ -206,6 +206,7 @@ pub struct PgCharacter { config: Vec, infoboard: String, guildcard: String, + option_flags: i32, power: i16, mind: i16, @@ -254,6 +255,7 @@ impl Into for PgCharacter { guildcard: CharacterGuildCard { description: self.guildcard, }, + option_flags: self.option_flags as u32, materials: CharacterMaterials { power: self.power as u32, mind: self.mind as u32,