PHP Class Model\Invite

Inheritance: extends Core\Model
显示文件 Open project: sendya/shadowsocks-panel Class Usage Examples

Public Properties

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 改主键

Public Methods

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

Method Details

addInvite() public static method

Add a invite
public static addInvite ( $uid, string $plan = 'A', boolean $isTransfer = false ) : boolean
$uid
$plan string
$isTransfer boolean
return boolean

getInviteArray() public static method

invite状态 (0-未使用, 1-已用, -1过期)
public static getInviteArray ( $status )

getInviteById() public static method

public static getInviteById ( $id )

getInviteByInviteCode() public static method

Get a invite object by inviteCode
public static getInviteByInviteCode ( $invite ) : mixed
$invite
return mixed

getInvitesByUid() public static method

Get invites by uid
public static getInvitesByUid ( integer $uid, string $status = "" ) : array
$uid integer
$status string
return array

Property Details

$dateLine public_oe property

邀请码归属用户uid -1代表公共邀请码
public $dateLine

$expiration public_oe property

创建该 invite 时间 mysql:datetime
public $expiration

$id public_oe property

public $id

$invite public_oe property

invite 创建者ip
public $invite

$inviteIp public_oe property

invite 有效期 (单位:天)
public $inviteIp

$plan public_oe property

使用该 invite 时间 mysql:datetime
public $plan

$regDateLine public_oe property

使用该邀请码注册的用户uid
public $regDateLine

$reguid public_oe property

邀请码
public $reguid

$status public_oe property

Invite type
public $status

$uid public_oe property

改主键
public $uid