PHP Class Model\Invite

Inheritance: extends Core\Model
Afficher le fichier Open project: sendya/shadowsocks-panel Class Usage Examples

Méthodes publiques

Свойство 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 改主键

Méthodes publiques

Méthode 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 méthode

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

getInviteArray() public static méthode

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

getInviteById() public static méthode

public static getInviteById ( $id )

getInviteByInviteCode() public static méthode

Get a invite object by inviteCode
public static getInviteByInviteCode ( $invite ) : mixed
$invite
Résultat mixed

getInvitesByUid() public static méthode

Get invites by uid
public static getInvitesByUid ( integer $uid, string $status = "" ) : array
$uid integer
$status string
Résultat 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