horse, mdb: include id in lobby conversations
This commit is contained in:
+8
-7
@@ -89,13 +89,14 @@ func Umas(ctx context.Context, db *sqlitex.Pool) ([]horse.Uma, error) {
|
||||
func Conversations(ctx context.Context, db *sqlitex.Pool) ([]horse.Conversation, error) {
|
||||
return load(ctx, db, make([]horse.Conversation, 0, 1024), conversationSQL, func(s *sqlite.Stmt) horse.Conversation {
|
||||
return horse.Conversation{
|
||||
CharacterID: horse.CharacterID(s.ColumnInt(0)),
|
||||
Number: s.ColumnInt(1),
|
||||
Location: horse.LobbyConversationLocationID(s.ColumnInt(2)),
|
||||
Chara1: horse.CharacterID(s.ColumnInt(3)),
|
||||
Chara2: horse.CharacterID(s.ColumnInt(4)),
|
||||
Chara3: horse.CharacterID(s.ColumnInt(5)),
|
||||
ConditionType: s.ColumnInt(6),
|
||||
ID: s.ColumnInt32(0),
|
||||
CharacterID: horse.CharacterID(s.ColumnInt(1)),
|
||||
Number: s.ColumnInt(2),
|
||||
Location: horse.LobbyConversationLocationID(s.ColumnInt(3)),
|
||||
Chara1: horse.CharacterID(s.ColumnInt(4)),
|
||||
Chara2: horse.CharacterID(s.ColumnInt(5)),
|
||||
Chara3: horse.CharacterID(s.ColumnInt(6)),
|
||||
ConditionType: s.ColumnInt(7),
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -238,12 +238,14 @@ func TestConversations(t *testing.T) {
|
||||
}
|
||||
want := []horse.Conversation{
|
||||
{
|
||||
ID: 1,
|
||||
CharacterID: 1001,
|
||||
Number: 1,
|
||||
Location: 410,
|
||||
Chara1: 1001,
|
||||
},
|
||||
{
|
||||
ID: 2,
|
||||
CharacterID: 1001,
|
||||
Number: 2,
|
||||
Location: 510,
|
||||
@@ -251,6 +253,7 @@ func TestConversations(t *testing.T) {
|
||||
ConditionType: 1,
|
||||
},
|
||||
{
|
||||
ID: 3,
|
||||
CharacterID: 1001,
|
||||
Number: 3,
|
||||
Location: 310,
|
||||
@@ -258,6 +261,7 @@ func TestConversations(t *testing.T) {
|
||||
ConditionType: 1,
|
||||
},
|
||||
{
|
||||
ID: 76,
|
||||
CharacterID: 1001,
|
||||
Number: 4,
|
||||
Location: 120,
|
||||
@@ -266,6 +270,7 @@ func TestConversations(t *testing.T) {
|
||||
ConditionType: 2,
|
||||
},
|
||||
{
|
||||
ID: 77,
|
||||
CharacterID: 1001,
|
||||
Number: 5,
|
||||
Location: 520,
|
||||
@@ -274,6 +279,7 @@ func TestConversations(t *testing.T) {
|
||||
ConditionType: 3,
|
||||
},
|
||||
{
|
||||
ID: 126,
|
||||
CharacterID: 1001,
|
||||
Number: 6,
|
||||
Location: 430,
|
||||
@@ -283,12 +289,14 @@ func TestConversations(t *testing.T) {
|
||||
ConditionType: 1,
|
||||
},
|
||||
{
|
||||
ID: 4,
|
||||
CharacterID: 1002,
|
||||
Number: 1,
|
||||
Location: 310,
|
||||
Chara1: 1002,
|
||||
},
|
||||
{
|
||||
ID: 5,
|
||||
CharacterID: 1002,
|
||||
Number: 2,
|
||||
Location: 210,
|
||||
@@ -296,6 +304,7 @@ func TestConversations(t *testing.T) {
|
||||
ConditionType: 1,
|
||||
},
|
||||
{
|
||||
ID: 6,
|
||||
CharacterID: 1002,
|
||||
Number: 3,
|
||||
Location: 110,
|
||||
@@ -303,6 +312,7 @@ func TestConversations(t *testing.T) {
|
||||
ConditionType: 1,
|
||||
},
|
||||
{
|
||||
ID: 78,
|
||||
CharacterID: 1002,
|
||||
Number: 4,
|
||||
Location: 520,
|
||||
@@ -311,6 +321,7 @@ func TestConversations(t *testing.T) {
|
||||
ConditionType: 3,
|
||||
},
|
||||
{
|
||||
ID: 79,
|
||||
CharacterID: 1002,
|
||||
Number: 5,
|
||||
Location: 220,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
SELECT
|
||||
id,
|
||||
gallery_chara_id,
|
||||
disp_order,
|
||||
pos_id,
|
||||
|
||||
Reference in New Issue
Block a user