Documentation ¶
Overview ¶
* @Descripttion: * @version: * @Author: fmy1993 * @Date: 2021-08-15 15:15:40 * @LastEditors: fmy1993 * @LastEditTime: 2021-08-15 16:32:08
Index ¶
Constants ¶
View Source
const ( CropKey = "crop-key" AccountKey = "account-key" RealEstateKey = "real-estate-key" SellingKey = "selling-key" SellingBuyKey = "selling-buy-key" DonatingKey = "donating-key" DonatingGranteeKey = "donating-grantee-key" )
Variables ¶
View Source
var DonatingStatusConstant = func() map[string]string { return map[string]string{ "donatingStart": "捐赠中", "cancelled": "已取消", "done": "完成", } }
DonatingStatusConstant 捐赠状态
View Source
var SellingStatusConstant = func() map[string]string { return map[string]string{ "saleStart": "销售中", "cancelled": "已取消", "expired": "已过期", "delivery": "交付中", "done": "完成", } }
SellingStatusConstant 销售状态
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { AccountId string `json:"accountId"` //账号ID UserName string `json:"userName"` //账号名 Balance float64 `json:"balance"` //余额 }
Account 账户,虚拟管理员和若干业主账号
type Crop ¶
type Crop struct { DataType string `json:"datatype"` // add column here Id string `json:"id"` HashInfo string `json:"hashinfo"` }
上链接口结构体
type Donating ¶
type Donating struct { ObjectOfDonating string `json:"objectOfDonating"` //捐赠对象(正在捐赠的房地产RealEstateID) Donor string `json:"donor"` //捐赠人(捐赠人AccountId) Grantee string `json:"grantee"` //受赠人(受赠人AccountId) CreateTime string `json:"createTime"` //创建时间 DonatingStatus string `json:"donatingStatus"` //捐赠状态 }
Donating 捐赠要约 需要确定ObjectOfDonating是否属于Donor 需要指定受赠人Grantee,并等待受赠人同意接收
type DonatingGrantee ¶
type DonatingGrantee struct { Grantee string `json:"grantee"` //受赠人(受赠人AccountId) CreateTime string `json:"createTime"` //创建时间 Donating Donating `json:"donating"` //捐赠对象 }
DonatingGrantee 供受赠人查询的
type RealEstate ¶
type RealEstate struct { RealEstateID string `json:"realEstateId"` //房地产ID Proprietor string `json:"proprietor"` //所有者(业主)(业主AccountId) Encumbrance bool `json:"encumbrance"` //是否作为担保 TotalArea float64 `json:"totalArea"` //总面积 LivingSpace float64 `json:"livingSpace"` //生活空间 }
RealEstate 房地产作为担保出售、捐赠或质押时Encumbrance为true,默认状态false。 仅当Encumbrance为false时,才可发起出售、捐赠或质押 Proprietor和RealEstateID一起作为复合键,保证可以通过Proprietor查询到名下所有的房产信息
type Selling ¶
type Selling struct { ObjectOfSale string `json:"objectOfSale"` //销售对象(正在出售的房地产RealEstateID) Seller string `json:"seller"` //发起销售人、卖家(卖家AccountId) Buyer string `json:"buyer"` //参与销售人、买家(买家AccountId) Price float64 `json:"price"` //价格 CreateTime string `json:"createTime"` //创建时间 SalePeriod int `json:"salePeriod"` //智能合约的有效期(单位为天) SellingStatus string `json:"sellingStatus"` //销售状态 }
Selling 销售要约 需要确定ObjectOfSale是否属于Seller 买家初始为空 Seller和ObjectOfSale一起作为复合键,保证可以通过seller查询到名下所有发起的销售
type SellingBuy ¶
type SellingBuy struct { Buyer string `json:"buyer"` //参与销售人、买家(买家AccountId) CreateTime string `json:"createTime"` //创建时间 Selling Selling `json:"selling"` //销售对象 }
SellingBuy 买家参与销售 销售对象不能是买家发起的 Buyer和CreateTime作为复合键,保证可以通过buyer查询到名下所有参与的销售
Click to show internal directories.
Click to hide internal directories.