biz

package
v0.0.0-...-31c84d2 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2022 License: GPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Building

type Building struct {
	Units []Unit
}

type CommListResp

type CommListResp struct {
	List interface{}
}

type Community

type Community struct {
	ID int `db:"id"`
	// Comment: 小区名字
	Name string `db:"name"`
	// Comment: 省份id
	ProvinceID int `db:"province_id"`
	// Comment: 市/州id
	CityID int `db:"city_id"`
	// Comment: 区/县id
	AreaID int `db:"area_id"`
	// Comment: 面积
	AreaNum int `db:"area_num"`
	// Comment: 管理员id
	AdminID int `db:"admin_id"`
	// Comment: 小区编码
	Number int `db:"number"`
	// Comment: 状态,1入驻审核2入驻成功3取消入驻
	State int `db:"state"`
	// Comment: 开始时间
	StartTime time.Time `db:"start_time"`
	// Comment: 结束时间
	EndTime   time.Time `db:"end_time"`
	CreatedAt time.Time `db:"created_at"`
	UpdatedAt time.Time `db:"updated_at"`
	DeletedAt time.Time `db:"deleted_at"`
}

type CommunityRepo

type CommunityRepo interface {
	Add(ctx context.Context, co Community) (Community, error)
	List(ctx context.Context, co ListCommunityReq) (*[]Community, error)
	Update(ctx context.Context, co *Community) (bool, error)
}

type CommunityUseCase

type CommunityUseCase struct {
	// contains filtered or unexported fields
}

func NewCommunityUseCase

func NewCommunityUseCase(repo CommunityRepo) *CommunityUseCase

func (*CommunityUseCase) Add

func (*CommunityUseCase) List

func (*CommunityUseCase) Update

func (c *CommunityUseCase) Update(ctx context.Context, co *Community) (bool, error)

type House

type House struct {
	Floor          int     //楼层
	Kind           int     //1住宅2 办公室3 宿舍
	FloorAge       int     //建筑面积
	CarpetArea     int     //室内面积
	State          int     //房屋状态 1未交房 2已交房 3装修中 4 已装修 5已交房 6 已入住
	FineDecoration int     //是否精装修
	Remark         string  //备注信息
	HouseType      int     //房屋户型
	Number         int     //房屋编号
	UnitId         int     //单元
	RateNum        float32 //计费比率
	Rent           int
}

type ListCommunityReq

type ListCommunityReq struct {
	Community
	PageReq
}

type ListShopsReq

type ListShopsReq struct {
	VillageId int
	State     int
	Id        int
}

type ListShopsResp

type ListShopsResp struct {
	List []Shop
	Num  int
}

type ListUnitsReq

type ListUnitsReq struct {
	CommunityId int
}

type ListUnitsResp

type ListUnitsResp struct {
	Data []Building
}

type PageReq

type PageReq struct {
	Page     int `json:"page"`
	PageSize int `json:"page_size"`
}

type Shop

type Shop struct {
	// ID of the ent.
	ID int `json:"id,omitempty"`
	// FloorID holds the value of the "floor_id" field.
	FloorID string `json:"floor_id,omitempty"`
	// RoomNum holds the value of the "room_num" field.
	RoomNum int `json:"room_num,omitempty"`
	// Layer holds the value of the "layer" field.
	Layer int `json:"layer,omitempty"`
	// BuiltUpArea holds the value of the "built_up_area" field.
	BuiltUpArea float32 `json:"built_up_area,omitempty"`
	// CommunityID holds the value of the "community_id" field.
	CommunityID int `json:"community_id,omitempty"`
	// FeeRate holds the value of the "fee_rate" field.
	FeeRate float32 `json:"fee_rate,omitempty"`
	// RoomArea holds the value of the "room_area" field.
	RoomArea float32 `json:"room_area,omitempty"`
	// Rent holds the value of the "rent" field.
	Rent float32 `json:"rent,omitempty"`
	// Remark holds the value of the "remark" field.
	Remark string `json:"remark,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt time.Time `json:"deleted_at,omitempty"`
}

Shop is the model entity for the Shop schema.

type ShopUseCase

type ShopUseCase struct {
	// contains filtered or unexported fields
}

func NewShopUseCase

func NewShopUseCase(repo ShopsRepo) *ShopUseCase

func (*ShopUseCase) CreateShop

func (uc *ShopUseCase) CreateShop(ctx context.Context, s *Shop) (*Shop, error)

func (*ShopUseCase) ListShop

func (uc *ShopUseCase) ListShop(ctx context.Context, pageNum, pageSize, villageId int) (*ListShopsResp, error)

func (*ShopUseCase) UpdateShop

func (uc *ShopUseCase) UpdateShop(ctx context.Context, s *Shop) (*Shop, error)

type ShopsRepo

type ShopsRepo interface {
	CreateShop(ctx context.Context, s *Shop) (*Shop, error)
	UpdateShop(ctx context.Context, s *Shop) (*Shop, error)
	ListShop(ctx context.Context, pageNum, pageSize, villageId int) (*ListShopsResp, error)
}

type Unit

type Unit struct {
	// contains filtered or unexported fields
}

type UnitRepo

type UnitRepo interface {
	Add(ctx context.Context, co Community) (Community, error)
	List(ctx context.Context, co ListCommunityReq) (*[]Community, error)
	Update(ctx context.Context, co *Community) (bool, error)
}

type UnitS

type UnitS struct {
	ID int `db:"id"`
	// Comment: 小区名字
	Name string `db:"name"`
	// CommId 单元id
	CommId    int       `db:"comm_id"`
	CreatedAt time.Time `db:"created_at"`
	UpdatedAt time.Time `db:"updated_at"`
	DeletedAt time.Time `db:"deleted_at"`
}

Jump to

Keyboard shortcuts

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