FlowGaragePoints.php 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?php
  2. namespace common\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "{{%FLOW_GARAGE_POINTS}}".
  6. *
  7. * @property string $ID
  8. * @property string $USER_ID 会员ID
  9. * @property string $CALC_ID 奖金结算表ID
  10. * @property string $AMOUNT 金额
  11. * @property string $TOTAL 当前总金额
  12. * @property int $IS_INCR 是否增加
  13. * @property string $REMARK 备注
  14. * @property string $ADMIN_NAME 操作人名称
  15. * @property int $PERIOD_NUM 所在期数
  16. * @property int $CALC_MONTH 所在结算月
  17. * @property string $P_MONTH 表分区的日期索引
  18. * @property int $CREATED_AT 创建时间
  19. * @property int $DELETED 是否删除
  20. * @property int $DELETED_AT 删除时间
  21. * @property int $SORT 排序
  22. * @property string $TRANSFER_SN 转账流水号
  23. */
  24. class FlowGaragePoints extends \common\components\ActiveRecord
  25. {
  26. const INCR_REDUCE = 0; // 减少
  27. const INCR_ADD = 1; // 增加
  28. const INCR_FREEZE = 2; // 冻结
  29. const INCR_UNFREEZE = 3; // 解冻
  30. /**
  31. * @inheritdoc
  32. */
  33. public static function tableName()
  34. {
  35. return '{{%FLOW_GARAGE_POINTS}}';
  36. }
  37. /**
  38. * @inheritdoc
  39. */
  40. public function rules()
  41. {
  42. return [
  43. [['USER_ID', 'REMARK', 'PERIOD_NUM', 'CALC_MONTH', 'P_MONTH', 'CREATED_AT'], 'required'],
  44. [['AMOUNT', 'TOTAL'], 'number'],
  45. [['IS_INCR', 'PERIOD_NUM', 'CALC_MONTH', 'CREATED_AT', 'DELETED', 'DELETED_AT', 'SORT'], 'integer'],
  46. [['ID', 'USER_ID', 'CALC_ID', 'ADMIN_NAME', 'TRANSFER_SN'], 'string', 'max' => 32],
  47. [['REMARK'], 'string', 'max' => 255],
  48. [['ID'], 'unique'],
  49. ];
  50. }
  51. /**
  52. * @inheritdoc
  53. */
  54. public function attributeLabels()
  55. {
  56. return [
  57. 'ID' => 'ID',
  58. 'USER_ID' => '会员ID',
  59. 'CALC_ID' => '结算表ID',
  60. 'AMOUNT' => '交易金额',
  61. 'TOTAL' => '当前总金额',
  62. 'IS_INCR' => '是否增加',
  63. 'REMARK' => '备注',
  64. 'ADMIN_NAME' => '操作人名称',
  65. 'PERIOD_NUM' => '所在期数',
  66. 'CALC_MONTH' => '所在结算月',
  67. 'P_MONTH' => '表分区的日期索引',
  68. 'CREATED_AT' => '创建时间',
  69. 'DELETED' => '是否删除',
  70. 'DELETED_AT' => '删除时间',
  71. 'SORT' => '排序',
  72. 'TRANSFER_SN' => '转账流水号',
  73. 'ORDER_SN' => '订单号',
  74. ];
  75. }
  76. }