omsmodel

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = sqlx.ErrNotFound

Functions

This section is empty.

Types

type OmsCartItem

type OmsCartItem struct {
	Id                int64     `db:"id"`
	ProductId         int64     `db:"product_id"`
	ProductSkuId      int64     `db:"product_sku_id"`
	MemberId          int64     `db:"member_id"`
	Quantity          int64     `db:"quantity"`            // 购买数量
	Price             float64   `db:"price"`               // 添加到购物车的价格
	ProductPic        string    `db:"product_pic"`         // 商品主图
	ProductName       string    `db:"product_name"`        // 商品名称
	ProductSubTitle   string    `db:"product_sub_title"`   // 商品副标题(卖点)
	ProductSkuCode    string    `db:"product_sku_code"`    // 商品sku条码
	MemberNickname    string    `db:"member_nickname"`     // 会员昵称
	CreateDate        time.Time `db:"create_date"`         // 创建时间
	ModifyDate        time.Time `db:"modify_date"`         // 修改时间
	DeleteStatus      int64     `db:"delete_status"`       // 是否删除
	ProductCategoryId int64     `db:"product_category_id"` // 商品分类
	ProductBrand      string    `db:"product_brand"`
	ProductSn         string    `db:"product_sn"`
	ProductAttr       string    `db:"product_attr"` // 商品销售属性:[{"key":"颜色","value":"颜色"},{"key":"容量","value":"4G"}]
}

type OmsCartItemModel

type OmsCartItemModel interface {
	FindAll(ctx context.Context, MemberId int64) (*[]OmsCartItem, error)
	FindAllByMemberIdAndProduct(ctx context.Context, MemberId, productId int64) (*OmsCartItem, error)
	DeleteByIds(ctx context.Context, memberId int64, ids []int64) error
	ClearCartItem(ctx context.Context, memberId int64) error
	CartItemUpdateQuantity(ctx context.Context, id, memberId, quantity int64) error
	// contains filtered or unexported methods
}

OmsCartItemModel is an interface to be customized, add more methods here, and implement the added methods in customOmsCartItemModel.

func NewOmsCartItemModel

func NewOmsCartItemModel(conn sqlx.SqlConn) OmsCartItemModel

NewOmsCartItemModel returns a model for the database table.

type OmsCompanyAddress

type OmsCompanyAddress struct {
	Id            int64  `db:"id"`
	AddressName   string `db:"address_name"`   // 地址名称
	SendStatus    int64  `db:"send_status"`    // 默认发货地址:0->否;1->是
	ReceiveStatus int64  `db:"receive_status"` // 是否默认收货地址:0->否;1->是
	Name          string `db:"name"`           // 收发货人姓名
	Phone         string `db:"phone"`          // 收货人电话
	Province      string `db:"province"`       // 省/直辖市
	City          string `db:"city"`           // 市
	Region        string `db:"region"`         // 区
	DetailAddress string `db:"detail_address"` // 详细地址
}

type OmsCompanyAddressModel

type OmsCompanyAddressModel interface {
	Count(ctx context.Context) (int64, error)
	FindAll(ctx context.Context, Current int64, PageSize int64) (*[]OmsCompanyAddress, error)
	DeleteByIds(ctx context.Context, ids []int64) error
	// contains filtered or unexported methods
}

OmsCompanyAddressModel is an interface to be customized, add more methods here, and implement the added methods in customOmsCompanyAddressModel.

func NewOmsCompanyAddressModel

func NewOmsCompanyAddressModel(conn sqlx.SqlConn) OmsCompanyAddressModel

NewOmsCompanyAddressModel returns a model for the database table.

type OmsOrder

type OmsOrder struct {
	Id                    int64     `db:"id"` // 订单id
	MemberId              int64     `db:"member_id"`
	CouponId              int64     `db:"coupon_id"`
	OrderSn               string    `db:"order_sn"`                // 订单编号
	CreateTime            time.Time `db:"create_time"`             // 提交时间
	MemberUsername        string    `db:"member_username"`         // 用户帐号
	TotalAmount           float64   `db:"total_amount"`            // 订单总金额
	PayAmount             float64   `db:"pay_amount"`              // 应付金额(实际支付金额)
	FreightAmount         float64   `db:"freight_amount"`          // 运费金额
	PromotionAmount       float64   `db:"promotion_amount"`        // 促销优化金额(促销价、满减、阶梯价)
	IntegrationAmount     float64   `db:"integration_amount"`      // 积分抵扣金额
	CouponAmount          float64   `db:"coupon_amount"`           // 优惠券抵扣金额
	DiscountAmount        float64   `db:"discount_amount"`         // 管理员后台调整订单使用的折扣金额
	PayType               int64     `db:"pay_type"`                // 支付方式:0->未支付;1->支付宝;2->微信
	SourceType            int64     `db:"source_type"`             // 订单来源:0->PC订单;1->app订单
	Status                int64     `db:"status"`                  // 订单状态:0->待付款;1->待发货;2->已发货;3->已完成;4->已关闭;5->无效订单
	OrderType             int64     `db:"order_type"`              // 订单类型:0->正常订单;1->秒杀订单
	DeliveryCompany       string    `db:"delivery_company"`        // 物流公司(配送方式)
	DeliverySn            string    `db:"delivery_sn"`             // 物流单号
	AutoConfirmDay        int64     `db:"auto_confirm_day"`        // 自动确认时间(天)
	Integration           int64     `db:"integration"`             // 可以获得的积分
	Growth                int64     `db:"growth"`                  // 可以活动的成长值
	PromotionInfo         string    `db:"promotion_info"`          // 活动信息
	BillType              int64     `db:"bill_type"`               // 发票类型:0->不开发票;1->电子发票;2->纸质发票
	BillHeader            string    `db:"bill_header"`             // 发票抬头
	BillContent           string    `db:"bill_content"`            // 发票内容
	BillReceiverPhone     string    `db:"bill_receiver_phone"`     // 收票人电话
	BillReceiverEmail     string    `db:"bill_receiver_email"`     // 收票人邮箱
	ReceiverName          string    `db:"receiver_name"`           // 收货人姓名
	ReceiverPhone         string    `db:"receiver_phone"`          // 收货人电话
	ReceiverPostCode      string    `db:"receiver_post_code"`      // 收货人邮编
	ReceiverProvince      string    `db:"receiver_province"`       // 省份/直辖市
	ReceiverCity          string    `db:"receiver_city"`           // 城市
	ReceiverRegion        string    `db:"receiver_region"`         // 区
	ReceiverDetailAddress string    `db:"receiver_detail_address"` // 详细地址
	Note                  string    `db:"note"`                    // 订单备注
	ConfirmStatus         int64     `db:"confirm_status"`          // 确认收货状态:0->未确认;1->已确认
	DeleteStatus          int64     `db:"delete_status"`           // 删除状态:0->未删除;1->已删除
	UseIntegration        int64     `db:"use_integration"`         // 下单时使用的积分
	PaymentTime           time.Time `db:"payment_time"`            // 支付时间
	DeliveryTime          time.Time `db:"delivery_time"`           // 发货时间
	ReceiveTime           time.Time `db:"receive_time"`            // 确认收货时间
	CommentTime           time.Time `db:"comment_time"`            // 评价时间
	ModifyTime            time.Time `db:"modify_time"`             // 修改时间
}

type OmsOrderItem

type OmsOrderItem struct {
	Id                int64   `db:"id"`
	OrderId           int64   `db:"order_id"` // 订单id
	OrderSn           string  `db:"order_sn"` // 订单编号
	ProductId         int64   `db:"product_id"`
	ProductPic        string  `db:"product_pic"`
	ProductName       string  `db:"product_name"`
	ProductBrand      string  `db:"product_brand"`
	ProductSn         string  `db:"product_sn"`
	ProductPrice      float64 `db:"product_price"`       // 销售价格
	ProductQuantity   int64   `db:"product_quantity"`    // 购买数量
	ProductSkuId      int64   `db:"product_sku_id"`      // 商品sku编号
	ProductSkuCode    string  `db:"product_sku_code"`    // 商品sku条码
	ProductCategoryId int64   `db:"product_category_id"` // 商品分类id
	PromotionName     string  `db:"promotion_name"`      // 商品促销名称
	PromotionAmount   float64 `db:"promotion_amount"`    // 商品促销分解金额
	CouponAmount      float64 `db:"coupon_amount"`       // 优惠券优惠分解金额
	IntegrationAmount float64 `db:"integration_amount"`  // 积分优惠分解金额
	RealAmount        float64 `db:"real_amount"`         // 该商品经过优惠后的分解金额
	GiftIntegration   int64   `db:"gift_integration"`
	GiftGrowth        int64   `db:"gift_growth"`
	ProductAttr       string  `db:"product_attr"` // 商品销售属性:[{"key":"颜色","value":"颜色"},{"key":"容量","value":"4G"}]
}

type OmsOrderItemModel

type OmsOrderItemModel interface {
	Count(ctx context.Context) (int64, error)
	FindAll(ctx context.Context, Current int64, PageSize int64, OrderId int64) (*[]OmsOrderItem, error)
	DeleteByIds(ctx context.Context, ids []int64) error
	FindProductListByOrderId(ctx context.Context, OrderId int64) (*[]OmsOrderItem, error)
	// contains filtered or unexported methods
}

OmsOrderItemModel is an interface to be customized, add more methods here, and implement the added methods in customOmsOrderItemModel.

func NewOmsOrderItemModel

func NewOmsOrderItemModel(conn sqlx.SqlConn) OmsOrderItemModel

NewOmsOrderItemModel returns a model for the database table.

type OmsOrderModel

type OmsOrderModel interface {
	Count(ctx context.Context, in *omsclient.OrderListReq) (int64, error)
	FindAll(ctx context.Context, in *omsclient.OrderListReq) (*[]OmsOrder, error)
	DeleteByIds(ctx context.Context, ids []int64) error
	FindListByMemberId(ctx context.Context, MemberId int64) (*[]OmsOrder, error)
	FindOneByMemberIdAndOrderId(ctx context.Context, memberId, orderId int64) (*OmsOrder, error)
	UpdateOrderStatus(ctx context.Context, confirmStatus, status, orderId int64) error
	QueryOrderList(ctx context.Context, in *omsclient.QueryOrderListReq) (*[]OmsOrder, error)
	// contains filtered or unexported methods
}

OmsOrderModel is an interface to be customized, add more methods here, and implement the added methods in customOmsOrderModel.

func NewOmsOrderModel

func NewOmsOrderModel(conn sqlx.SqlConn) OmsOrderModel

NewOmsOrderModel returns a model for the database table.

type OmsOrderOperateHistory

type OmsOrderOperateHistory struct {
	Id          int64          `db:"id"`
	OrderId     int64          `db:"order_id"`     // 订单id
	OperateMan  string         `db:"operate_man"`  // 操作人:用户;系统;后台管理员
	CreateTime  time.Time      `db:"create_time"`  // 操作时间
	OrderStatus int64          `db:"order_status"` // 订单状态:0->待付款;1->待发货;2->已发货;3->已完成;4->已关闭;5->无效订单
	Note        sql.NullString `db:"note"`         // 备注
}

type OmsOrderOperateHistoryModel

type OmsOrderOperateHistoryModel interface {
	Count(ctx context.Context) (int64, error)
	FindAll(ctx context.Context, Current int64, PageSize int64, OrderId int64) (*[]OmsOrderOperateHistory, error)
	DeleteByIds(ctx context.Context, ids []int64) error
	// contains filtered or unexported methods
}

OmsOrderOperateHistoryModel is an interface to be customized, add more methods here, and implement the added methods in customOmsOrderOperateHistoryModel.

func NewOmsOrderOperateHistoryModel

func NewOmsOrderOperateHistoryModel(conn sqlx.SqlConn) OmsOrderOperateHistoryModel

NewOmsOrderOperateHistoryModel returns a model for the database table.

type OmsOrderReturnApply

type OmsOrderReturnApply struct {
	Id               int64          `db:"id"`
	OrderId          int64          `db:"order_id"`           // 订单id
	CompanyAddressId int64          `db:"company_address_id"` // 收货地址表id
	ProductId        int64          `db:"product_id"`         // 退货商品id
	OrderSn          string         `db:"order_sn"`           // 订单编号
	CreateTime       time.Time      `db:"create_time"`        // 申请时间
	MemberUsername   string         `db:"member_username"`    // 会员用户名
	ReturnAmount     float64        `db:"return_amount"`      // 退款金额
	ReturnName       string         `db:"return_name"`        // 退货人姓名
	ReturnPhone      string         `db:"return_phone"`       // 退货人电话
	Status           int64          `db:"status"`             // 申请状态:0->待处理;1->退货中;2->已完成;3->已拒绝
	HandleTime       time.Time      `db:"handle_time"`        // 处理时间
	ProductPic       string         `db:"product_pic"`        // 商品图片
	ProductName      string         `db:"product_name"`       // 商品名称
	ProductBrand     string         `db:"product_brand"`      // 商品品牌
	ProductAttr      string         `db:"product_attr"`       // 商品销售属性:颜色:红色;尺码:xl;
	ProductCount     int64          `db:"product_count"`      // 退货数量
	ProductPrice     float64        `db:"product_price"`      // 商品单价
	ProductRealPrice float64        `db:"product_real_price"` // 商品实际支付单价
	Reason           string         `db:"reason"`             // 原因
	Description      string         `db:"description"`        // 描述
	ProofPics        string         `db:"proof_pics"`         // 凭证图片,以逗号隔开
	HandleNote       string         `db:"handle_note"`        // 处理备注
	HandleMan        string         `db:"handle_man"`         // 处理人员
	ReceiveMan       string         `db:"receive_man"`        // 收货人
	ReceiveTime      time.Time      `db:"receive_time"`       // 收货时间
	ReceiveNote      sql.NullString `db:"receive_note"`       // 收货备注
}

type OmsOrderReturnApplyModel

type OmsOrderReturnApplyModel interface {
	Count(ctx context.Context, in *omsclient.OrderReturnApplyListReq) (int64, error)
	FindAll(ctx context.Context, in *omsclient.OrderReturnApplyListReq) (*[]OmsOrderReturnApply, error)
	DeleteByIds(ctx context.Context, ids []int64) error
	// contains filtered or unexported methods
}

OmsOrderReturnApplyModel is an interface to be customized, add more methods here, and implement the added methods in customOmsOrderReturnApplyModel.

func NewOmsOrderReturnApplyModel

func NewOmsOrderReturnApplyModel(conn sqlx.SqlConn) OmsOrderReturnApplyModel

NewOmsOrderReturnApplyModel returns a model for the database table.

type OmsOrderReturnReason

type OmsOrderReturnReason struct {
	Id         int64     `db:"id"`
	Name       string    `db:"name"` // 退货类型
	Sort       int64     `db:"sort"`
	Status     int64     `db:"status"`      // 状态:0->不启用;1->启用
	CreateTime time.Time `db:"create_time"` // 添加时间
}

type OmsOrderReturnReasonModel

type OmsOrderReturnReasonModel interface {
	Count(ctx context.Context, in *omsclient.OrderReturnReasonListReq) (int64, error)
	FindAll(ctx context.Context, in *omsclient.OrderReturnReasonListReq) (*[]OmsOrderReturnReason, error)
	DeleteByIds(ctx context.Context, ids []int64) error
	// contains filtered or unexported methods
}

OmsOrderReturnReasonModel is an interface to be customized, add more methods here, and implement the added methods in customOmsOrderReturnReasonModel.

func NewOmsOrderReturnReasonModel

func NewOmsOrderReturnReasonModel(conn sqlx.SqlConn) OmsOrderReturnReasonModel

NewOmsOrderReturnReasonModel returns a model for the database table.

type OmsOrderSetting

type OmsOrderSetting struct {
	Id                  int64 `db:"id"`
	FlashOrderOvertime  int64 `db:"flash_order_overtime"`  // 秒杀订单超时关闭时间(分)
	NormalOrderOvertime int64 `db:"normal_order_overtime"` // 正常订单超时时间(分)
	ConfirmOvertime     int64 `db:"confirm_overtime"`      // 发货后自动确认收货时间(天)
	FinishOvertime      int64 `db:"finish_overtime"`       // 自动完成交易时间,不能申请售后(天)
	CommentOvertime     int64 `db:"comment_overtime"`      // 订单完成后自动好评时间(天)
}

type OmsOrderSettingModel

type OmsOrderSettingModel interface {
	Count(ctx context.Context) (int64, error)
	FindAll(ctx context.Context, Current int64, PageSize int64) (*[]OmsOrderSetting, error)
	DeleteByIds(ctx context.Context, ids []int64) error
	// contains filtered or unexported methods
}

OmsOrderSettingModel is an interface to be customized, add more methods here, and implement the added methods in customOmsOrderSettingModel.

func NewOmsOrderSettingModel

func NewOmsOrderSettingModel(conn sqlx.SqlConn) OmsOrderSettingModel

NewOmsOrderSettingModel returns a model for the database table.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL