feat: support balance pay

This commit is contained in:
Rogee
2025-05-12 19:45:47 +08:00
parent f8678c1197
commit 1fa31a6b71
11 changed files with 186 additions and 41 deletions

View File

@@ -23,6 +23,7 @@ type postsTable struct {
DeletedAt postgres.ColumnTimestamp
Status postgres.ColumnInteger
Title postgres.ColumnString
HeadImages postgres.ColumnString
Description postgres.ColumnString
Content postgres.ColumnString
Price postgres.ColumnInteger
@@ -31,7 +32,6 @@ type postsTable struct {
Likes postgres.ColumnInteger
Tags postgres.ColumnString
Assets postgres.ColumnString
HeadImages postgres.ColumnString
AllColumns postgres.ColumnList
MutableColumns postgres.ColumnList
@@ -78,6 +78,7 @@ func newPostsTableImpl(schemaName, tableName, alias string) postsTable {
DeletedAtColumn = postgres.TimestampColumn("deleted_at")
StatusColumn = postgres.IntegerColumn("status")
TitleColumn = postgres.StringColumn("title")
HeadImagesColumn = postgres.StringColumn("head_images")
DescriptionColumn = postgres.StringColumn("description")
ContentColumn = postgres.StringColumn("content")
PriceColumn = postgres.IntegerColumn("price")
@@ -86,9 +87,8 @@ func newPostsTableImpl(schemaName, tableName, alias string) postsTable {
LikesColumn = postgres.IntegerColumn("likes")
TagsColumn = postgres.StringColumn("tags")
AssetsColumn = postgres.StringColumn("assets")
HeadImagesColumn = postgres.StringColumn("head_images")
allColumns = postgres.ColumnList{IDColumn, CreatedAtColumn, UpdatedAtColumn, DeletedAtColumn, StatusColumn, TitleColumn, DescriptionColumn, ContentColumn, PriceColumn, DiscountColumn, ViewsColumn, LikesColumn, TagsColumn, AssetsColumn, HeadImagesColumn}
mutableColumns = postgres.ColumnList{CreatedAtColumn, UpdatedAtColumn, DeletedAtColumn, StatusColumn, TitleColumn, DescriptionColumn, ContentColumn, PriceColumn, DiscountColumn, ViewsColumn, LikesColumn, TagsColumn, AssetsColumn, HeadImagesColumn}
allColumns = postgres.ColumnList{IDColumn, CreatedAtColumn, UpdatedAtColumn, DeletedAtColumn, StatusColumn, TitleColumn, HeadImagesColumn, DescriptionColumn, ContentColumn, PriceColumn, DiscountColumn, ViewsColumn, LikesColumn, TagsColumn, AssetsColumn}
mutableColumns = postgres.ColumnList{CreatedAtColumn, UpdatedAtColumn, DeletedAtColumn, StatusColumn, TitleColumn, HeadImagesColumn, DescriptionColumn, ContentColumn, PriceColumn, DiscountColumn, ViewsColumn, LikesColumn, TagsColumn, AssetsColumn}
)
return postsTable{
@@ -101,6 +101,7 @@ func newPostsTableImpl(schemaName, tableName, alias string) postsTable {
DeletedAt: DeletedAtColumn,
Status: StatusColumn,
Title: TitleColumn,
HeadImages: HeadImagesColumn,
Description: DescriptionColumn,
Content: ContentColumn,
Price: PriceColumn,
@@ -109,7 +110,6 @@ func newPostsTableImpl(schemaName, tableName, alias string) postsTable {
Likes: LikesColumn,
Tags: TagsColumn,
Assets: AssetsColumn,
HeadImages: HeadImagesColumn,
AllColumns: allColumns,
MutableColumns: mutableColumns,