mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-23 19:37:23 +08:00
attendance card
This commit is contained in:
@@ -21,4 +21,10 @@ class Attendance extends NexusModel
|
||||
30 => 1000
|
||||
];
|
||||
|
||||
|
||||
public function logs(): \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
{
|
||||
return $this->hasMany(AttendanceLog::class, 'uid', 'uid');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
class AttendanceLog extends NexusModel
|
||||
{
|
||||
protected $table = 'attendance_logs';
|
||||
|
||||
protected $fillable = ['uid', 'points', 'date', 'is_retroactive'];
|
||||
|
||||
public $timestamps = true;
|
||||
|
||||
}
|
||||
+1
-1
@@ -41,7 +41,7 @@ class User extends Authenticatable
|
||||
const CLASS_SYSOP = "15";
|
||||
const CLASS_STAFF_LEADER = "16";
|
||||
|
||||
public static $classes = [
|
||||
public static array $classes = [
|
||||
self::CLASS_PEASANT => ['text' => 'Peasant'],
|
||||
self::CLASS_USER => ['text' => 'User', 'min_seed_points' => 0],
|
||||
self::CLASS_POWER_USER => ['text' => 'Power User', 'min_seed_points' => 40000],
|
||||
|
||||
Reference in New Issue
Block a user