Added transaction feature, fixed some mistakes
This commit is contained in:
@@ -6,8 +6,8 @@ type Family struct {
|
||||
ID int64
|
||||
Name string
|
||||
OwnerID int64
|
||||
TelegramChatID int64
|
||||
TelegramChatName string
|
||||
TelegramChatID *int64
|
||||
TelegramChatName *string
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
@@ -29,37 +29,27 @@ type FamilyMember struct {
|
||||
JoinedAt time.Time
|
||||
}
|
||||
|
||||
type FamilyThread struct {
|
||||
ID int64
|
||||
FamilyID int64
|
||||
Type string
|
||||
Title string
|
||||
TelegramTopicID int64
|
||||
IsSystem bool
|
||||
CreatedBy int64
|
||||
CreatedAt time.Time
|
||||
}
|
||||
|
||||
type CreateFamilyRequest struct {
|
||||
Name string `json:"name"`
|
||||
OwnerID int64 `json:"owner_id"`
|
||||
TelegramChatID int64 `json:"telegram_chat_id"`
|
||||
TelegramChatName string `json:"telegram_chat_name"`
|
||||
Name string `json:"name"`
|
||||
OwnerID int64 `json:"owner_id"`
|
||||
TelegramChatID *int64 `json:"telegram_chat_id"`
|
||||
TelegramChatName *string `json:"telegram_chat_name"`
|
||||
}
|
||||
|
||||
type UpdateFamilyRequest struct {
|
||||
Name *string `json:"name"`
|
||||
TelegramChatName string `json:"telegram_chat_name"`
|
||||
TelegramChatID *int64 `json:"telegram_chat_id"`
|
||||
TelegramChatName *string `json:"telegram_chat_name"`
|
||||
}
|
||||
|
||||
type FamilyResponse struct {
|
||||
ID int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
OwnerID int64 `json:"owner_id"`
|
||||
TelegramChatID int64 `json:"telegram_chat_id"`
|
||||
TelegramChatName string `json:"telegram_chat_name"`
|
||||
CreatedAt string `json:"created_at"`
|
||||
UpdatedAt string `json:"updated_at"`
|
||||
ID int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
OwnerID int64 `json:"owner_id"`
|
||||
TelegramChatID *int64 `json:"telegram_chat_id"`
|
||||
TelegramChatName *string `json:"telegram_chat_name"`
|
||||
CreatedAt string `json:"created_at"`
|
||||
UpdatedAt string `json:"updated_at"`
|
||||
}
|
||||
|
||||
func (response *FamilyResponse) ModelToResponse(f *Family) FamilyResponse {
|
||||
|
||||
Reference in New Issue
Block a user