attendance card

This commit is contained in:
xiaomlove
2022-04-03 16:03:47 +08:00
parent 4172f7c07c
commit 9af8e5e442
100 changed files with 2806 additions and 65 deletions
+6
View File
@@ -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');
}
}
+13
View File
@@ -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
View File
@@ -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],