You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.4 KiB

//
// CourseModel.h
// tongxin
//
// Created by ecell on 2021/11/24.
// Copyright © 2021 xTT. All rights reserved.
//
/**
Course协议即可
*/
#import <Foundation/Foundation.h>
#import "GWPCourseListView.h"
#import "MJExtension.h"
@interface CourseModel : NSObject<Course>
/** 课程名 */
@property (nonatomic, copy) NSString *courseName;
/** 课程显示时的文字属性,用来控制颜色、大小等 */
@property (nonatomic, strong) NSDictionary *nameAttribute;
/** 一周中的第几天?即周几 */
@property (nonatomic, assign) NSUInteger dayIndex;
/** 开始时间(第几节开始) */
@property (nonatomic, assign) NSUInteger startCourseIndex;
/** 结束时间(第几节结束) */
@property (nonatomic, assign) NSUInteger endCourseIndex;
/** 位置Index */
@property (nonatomic, assign) NSUInteger sortIndex;
+ (instancetype)courseWithName:(NSString *)name
dayIndex:(NSUInteger)dayIndex
startCourseIndex:(NSUInteger)startCourseIndex
endCourseIndex:(NSUInteger)endCourseIndex;
+ (instancetype)courseWithName:(NSString *)name
nameAttribute:(NSDictionary*)nameAttribute
dayIndex:(NSUInteger)dayIndex
startCourseIndex:(NSUInteger)startCourseIndex
endCourseIndex:(NSUInteger)endCourseIndex;
- (BOOL)isSameCourse:(CourseModel *)course;
@end