Property | Type | Description | |
---|---|---|---|
$dateLine | 邀请码归属用户uid -1代表公共邀请码 | ||
$expiration | 创建该 invite 时间 mysql:datetime | ||
$id | |||
$invite | invite 创建者ip | ||
$inviteIp | invite 有效期 (单位:天) | ||
$plan | 使用该 invite 时间 mysql:datetime | ||
$regDateLine | 使用该邀请码注册的用户uid | ||
$reguid | 邀请码 | ||
$status | Invite type | ||
$uid | 改主键 |
Method | Description | |
---|---|---|
addInvite ( $uid, string $plan = 'A', boolean $isTransfer = false ) : boolean | Add a invite | |
getInviteArray ( $status ) | invite状态 (0-未使用, 1-已用, -1过期) | |
getInviteById ( $id ) | ||
getInviteByInviteCode ( $invite ) : mixed | Get a invite object by inviteCode | |
getInvitesByUid ( integer $uid, string $status = "" ) : array | Get invites by uid |
public static getInviteArray ( $status ) |
public static getInviteByInviteCode ( $invite ) : mixed | ||
$invite | ||
return | mixed |